Skip to content

Instantly share code, notes, and snippets.

@epaule
epaule / dump_conservation_matrix.pl
Created October 17, 2014 10:59
dump_conservation_matrix.pl
#!/usr/bin/env perl
use Ace;
use Getopt::Long;
my @genes;
my $database;
GetOptions('gene=s' => \@genes,
'database=s' => \$database,
)||die(@!);
#!/usr/bin/env perl
# take a reference database and a handful of curation ones and udpdate the reference_db
use strict;
use Getopt::Long;
use Ace;
use Ace::Sequence;
my $targetDB;
@epaule
epaule / fasta2embl.rb
Last active August 30, 2018 10:56
quick hack to convert the contig fasta file into an EMBL format
#!/usr/bin/env ruby
require 'bio'
ff= Bio::FlatFile.auto(ARGF)
ff.each_entry{|e|
gap=''
e.seq.to_s.scan(/N{10,}/) do |c|
@epaule
epaule / filter_fasta.rb
Created August 26, 2015 09:07
remove blacklisted entries from a fasta file
#!/usr/bin/env ruby
# filter_fasta.rb blackllist fastafile
# blacklist will have one ID per line
require 'bio'
bl = Hash.new
#slurp in the blacklist
IO.foreach(ARGV.shift){|l|
bl[l.chomp]=1
@epaule
epaule / ovo_descriptions.pl
Created November 12, 2015 09:38
create a brief_identification for all CDSes of a gene
#!/usr/bin/perl
# script.pl database file
use Ace;
my $db = Ace->connect(-path => shift);
while (<>){
next unless /WBGene/; # skip the header line
s/\r\n//; # get rid of the mac line breaks
#!/usr/bin/env ruby
require 'net/https'
require 'uri'
require 'rubygems'
require 'json'
server = 'https://www.trackhubregistry.org'
hub_url = 'http://ftp.ebi.ac.uk/pub/databases/wormbase/releases/current-development-release/COMPARATIVE_ANALYSIS/hub/hub.txt'
user = 'michael.paulini'
@epaule
epaule / dump_protein_domains.pl
Last active July 15, 2016 09:37
dump protein domains of C.elegans from ACeDB
#!/usr/bin/env perl
# dump the protein domains into a flatfile
use feature qw(say);
use Ace;
use strict;
my $db = Ace->connect(-path => shift)||die(Ace->error);
@epaule
epaule / dump_gpi.pl
Last active February 7, 2017 13:53
GPI prototype
#!/usr/bin/env perl
#
# exporter to dump gene / transcript / protein info as GPI file
# specs: http://www.geneontology.org/page/gene-product-information-gpi-format
#
# uages:
# perl dump_gpi.pl -species elegans
use strict;
@epaule
epaule / random_sample_chooser.py
Created February 27, 2017 12:23
scriptlet to create sample meta table entries for an ensembl core database
#!/usr/bin/env python
# random_sample_chooser.py <GFF3>
import re
import sys
import random
gff=open(sys.argv[1],"r")
mRNAids = {}
@epaule
epaule / gff3ace.pl
Created March 2, 2017 11:03
trimmed down version of the gff3ace
#!/software/bin/perl -w
#
# Small script to convert GF3 gene predictions to ace
#
# Last updated by: $Author: gw3 $
# Last updated on: $Date: 2008/02/14 11:02:17 $
use Getopt::Long;
use Carp;