Skip to content

Instantly share code, notes, and snippets.

@ypandit
ypandit / perl
Created March 20, 2012 17:08 — forked from cybersiddhu/jplack
Plack to run JBrowse locally
## --- install plack
cpanm Plack
# -- save this file as jbrowse.plack
use Plack::App::Directory;
my $app = Plack::App::Directory->new({ root => '.'})->to_app;
$app;
## -- drop it at the top level of jbrowse folder
@ypandit
ypandit / pseudogene_issue.py
Created April 27, 2012 21:32
Solution for pseudogene issue in GFF3 for Artemis
import sys, os
if len(sys.argv) != 2:
print 'You seem to have forgotten to provide the input GGF3 file.'
exit()
if __name__ == "__main__":
found = False
END = outofbound = issues = 0
outfile = open(os.path.basename(sys.argv[1]).replace(".gff", "_corrected.gff"), 'w')
@ypandit
ypandit / vim.rb
Created June 15, 2012 01:53 — forked from mgrouchy/vim.rb
Vim formula for Homebrew
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
url 'https://vim.googlecode.com/hg/', :revision => '57e8b75298d6'
version '7.3.712'
def features; %w(tiny small normal big huge) end
def interp; %w(lua mzscheme perl python python3 tcl ruby) end
@ypandit
ypandit / GeneInfo.pl
Created August 31, 2012 20:36
Script to get gene information (DDB-ID, Gene products and Synonyms)
use strict;
use warnings;
use Bio::Chado::Schema;
use Bio::DB::SeqFeature::Store;
use Bio::DB::SeqFeature::Store::GFF3Loader;
use YAML::Tiny;
use lib 'lib';
use MOD::SGD;
@ypandit
ypandit / ec2-init.sh
Created September 28, 2012 22:20
Start an EC2 instance and associate it with an EIP
#! /bin/sh
INSTANCE_ID=''
ELASTIC_IP=''
if [[ `ec2-describe-instances` =~ 'running' ]]; then
echo "AWS instance is already running !"
exit 2
else
ec2start $INSTANCE_ID
@ypandit
ypandit / go_annotations.sql
Created October 11, 2012 15:57
SQL to get data in GO Annotation File Format (GAF)
SELECT 'dictyBase' db, /* Column 1 */
GENE_ID.accession db_id, /* Column 2 */
GENE.uniquename gene_symbol, /* Column 3 */
TO_CHAR(q_prop.value) qualifier, /* Column 4 */
'GO' || ':' || GO_ID.accession go_id, /* Column 5 */
'PMID' || ':' || pub.uniquename db_reference, /* Column 6 */
evsyn.synonym_ evidence_code, /* Column 7 */
TO_CHAR(with_prop.value) with_from, /* Column 8 */
cv.name aspect, /* Column 9 */
GENE.name object_name, /* Column 10 */
@ypandit
ypandit / instructions.md
Created October 16, 2012 04:48
HTTPS access for Github on OSX

I was having issues with upgrading perlbrewon OSX Lion. self-upgrade did not upgrade. This command worked fine on Linux. This issue can be found at: App-perlbrew #226

Following steps helped resolve this issue

  1. Using Firefox download the following certificates
    1. DigiCertHighAssuranceEVCA-1.pem
    2. DigiCertHighAssuranceEVRootCA.pem
    3. github.com.pem
    4. GTECyberTrustGlobalRoot.pem
@ypandit
ypandit / GAFLoader.pl
Created October 26, 2012 21:25
Script to check if GO ID exists in association with Gene ID
package GAFLoader;
use strict;
use warnings;
use Bio::Chado::Schema;
use IO::String;
use LWP::UserAgent;
use Moose;
@ypandit
ypandit / Xvfb.service
Last active September 8, 2023 13:13
Xvfb as a systemd service
[Unit]
Description=X Virtual Frame Buffer Service
After=network.target
[Service]
ExecStart=/usr/bin/Xvfb :99 -screen 0 1024x768x24
[Install]
WantedBy=multi-user.target