Skip to content

Instantly share code, notes, and snippets.

View chapmanb's full-sized avatar

Brad Chapman chapmanb

View GitHub Profile
#!/usr/bin/perl
###################################################################
# FindSomatic.pl
#
# Tool for detecting somatic mutations in normal/tumor pair
# using microassembly
#
# Author: Giuseppe Narzisi
# Date: December 11, 2013
@chapmanb
chapmanb / BED
Last active January 2, 2016 15:19
track name="tb_knownGene" description="table browser query on knownGene" visibility=3 url=
1 2985741 3355185 uc001akc.3 0 + 2985823 3350375 0 17 119,350,51,135,103,208,148,154,1417,85,170,78,170,175,237,175,4888, 0,116947,174909,315974,327313,333613,335561,336317,342206,345385,348650,349489,356403,356873,361694,362788,364556,
1 2985741 3355185 uc001ake.3 0 + 2985823 3350375 0 17 119,350,51,135,103,208,148,154,1417,88,170,78,170,175,237,175,4888, 0,116947,174909,315974,327313,333613,335561,336317,342206,345382,348650,349489,356403,356873,361694,362788,364556,
1 2985741 3355185 uc001akf.3 0 + 2985823 3350375 0 17 119,350,51,135,103,208,148,154,1417,88,170,78,170,175,237,175,4945, 0,116947,174909,315974,327313,333613,335561,336317,342206,345382,348650,349489,356403,356873,361694,362788,364499,
1 28929608 28969604 uc001bqx.3 0 - 28930050 28948593 0 6 478,89,115,78,252,438, 0,2275,10150,14856,18817,39558,
1 28929608 28969604 uc001bqy.3 0 - 28930050 28948593 0 6 478,89,115,78,252,101, 0,2275,10150,14856,18817,3989
class ORFFinder:
"""Find the longest ORF in a given sequence
"seq" is a string, if "start" is not provided any codon can be the start of
and ORF. If muliple ORFs have the longest length the first one encountered
is printed
"""
def __init__(self, seq, start=[], stop=["TAG", "TAA", "TGA"]):
self.seq = seq
self.start = start
self.stop = stop