Skip to content

Instantly share code, notes, and snippets.

Avatar

Yogesh Pandit ypandit

View GitHub Profile
@ypandit
ypandit / Xvfb.service
Last active Jan 28, 2021
Xvfb as a systemd service
View Xvfb.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
@ypandit
ypandit / GAFLoader.pl
Created Oct 26, 2012
Script to check if GO ID exists in association with Gene ID
View GAFLoader.pl
package GAFLoader;
use strict;
use warnings;
use Bio::Chado::Schema;
use IO::String;
use LWP::UserAgent;
use Moose;
@ypandit
ypandit / instructions.md
Created Oct 16, 2012
HTTPS access for Github on OSX
View instructions.md

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 / go_annotations.sql
Created Oct 11, 2012
SQL to get data in GO Annotation File Format (GAF)
View go_annotations.sql
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 / ec2-init.sh
Created Sep 28, 2012
Start an EC2 instance and associate it with an EIP
View ec2-init.sh
#! /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 / GeneInfo.pl
Created Aug 31, 2012
Script to get gene information (DDB-ID, Gene products and Synonyms)
View GeneInfo.pl
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 / vim.rb
Created Jun 15, 2012 — forked from mgrouchy/vim.rb
Vim formula for Homebrew
View vim.rb
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 / pseudogene_issue.py
Created Apr 27, 2012
Solution for pseudogene issue in GFF3 for Artemis
View pseudogene_issue.py
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 / perl
Created Mar 20, 2012 — forked from cybersiddhu/jplack
Plack to run JBrowse locally
View perl
## --- 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