本文整理汇总了Python中TAMO.seq.Fasta.ids方法的典型用法代码示例。如果您正苦于以下问题:Python Fasta.ids方法的具体用法?Python Fasta.ids怎么用?Python Fasta.ids使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TAMO.seq.Fasta
的用法示例。
在下文中一共展示了Fasta.ids方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ProbeSet
# 需要导入模块: from TAMO.seq import Fasta [as 别名]
# 或者: from TAMO.seq.Fasta import ids [as 别名]
from TAMO import MotifTools
from TAMO.seq import Fasta
from TAMO.MotifMetrics import ProbeSet
from TAMO.MD.AlignAce import AlignAce
from TAMO.MD.MDscan import MDscan
from TAMO.MD.Meme import Meme
#from TAMO.DataSources import GO
from time import time
fastaPath = '/Users/biggus/Documents/James/Data/ClusterDefs/TC-Fastas/TC-96.oneLine.fas'
clusterIDS = Fasta.ids(fastaPath)
totalSeqs = ProbeSet(fastaPath) # !! this is wrong should proly be goodAffys
MDbg = '/Users/biggus/Documents/James/Data/2KB/2kb_Sequence/2kb_Anopheles/2KBupTSS_goodAffyAGAPsFastasOUT.masked.nr.MD.bg'
outFile = '/Users/biggus/Documents/James/Data/ClusterDefs/testTAMOmetrics.txt'
#theAce = AlignAce(fastaPath,width=10)
print 'running MDscan...'
tMD_1 = time()
MDmotifs = MDscan(fastaPath) #,bgfile=MDbg)
tMD_2 = time()
MD_time = tMD_2-tMD_1
print 'MDscan took %.5f sec == %.3f min.\nMDscan found %s motifs.' % (MD_time,MD_time/60.0, len(MDmotifs.motifs))
print 'running MEME...'
tMeme_1 = time()
memeMotifs = Meme(fastaPath)
tMeme_2 = time()
Meme_time = tMeme_2-tMeme_1
示例2: range
# 需要导入模块: from TAMO.seq import Fasta [as 别名]
# 或者: from TAMO.seq.Fasta import ids [as 别名]
from TAMO import MotifTools
from TAMO.seq import Fasta
from TAMO import MotifMetrics
from TAMO.MD.AlignAce import AlignAce
from TAMO.MD.MDscan import MDscan
from TAMO.MD.Meme import Meme
from TAMO import Clustering
#from TAMO.DataSources import GO
from time import time
TC8_path = '/Users/biggus/Documents/James/Data/ClusterDefs/TC-Fastas/TC-8.fas'
TC8_ids = Fasta.ids(TC8_path)
TC8_seqs = Fasta.seqs(TC8_path)
allSeqs = MotifMetrics.ProbeSet('/Users/biggus/Documents/James/Data/2KB/2kb_Sequence/2kb_Anopheles/2KBupTSS_goodAffyAGAPsFastasOUT.masked.nr.fas')
outFile = '/Users/biggus/Documents/James/Data/ClusterDefs/TC-8_MotifMetrics.5-12.txt'
roughBestKmers = []
for i in range(6,10):
imers = MotifMetrics.top_nmers_seqs(i,TC8_seqs)
roughBestKmers.extend(imers)
print '%s %smers found.' % (len(imers), i)
kmerMetrics = ['Kmer\thGeoPval\tBinomOverRep\n']
for kmer in roughBestKmers:
hGeoPval = allSeqs.Enrichment(kmer, TC8_ids)
binom = allSeqs.overrep(kmer,TC8_ids)
kmerMetrics.append('%s\t%s\t%s\n' % (kmer,hGeoPval,binom))