本文整理匯總了Python中TAMO.seq.Fasta.text方法的典型用法代碼示例。如果您正苦於以下問題:Python Fasta.text方法的具體用法?Python Fasta.text怎麽用?Python Fasta.text使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TAMO.seq.Fasta
的用法示例。
在下文中一共展示了Fasta.text方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: go
# 需要導入模塊: from TAMO.seq import Fasta [as 別名]
# 或者: from TAMO.seq.Fasta import text [as 別名]
def go(self):
"""Execution function: runs TAMO.MD.Meme.Meme and catches the output in self.output for access from MDAP."""
import time
# write a temp fasta file of coregulated seqs to use as input to Meme(file=TempFasta)
ctimeStr = time.ctime().replace(' ','_')
fileName = 'tempFastaOfCoRegSeqs.MDAP.%s.fas' %(ctimeStr)
tFasta = open(fileName, 'w')
tFastaTxt = Fasta.text(self.coRegSeqs[0])
tFasta.write(tFastaTxt)
# Call TAMO to do its thing:
self.output = Meme(file=fileName, width='', extra_args=self.extra_args, bfile=self.bfile)
# delete temp file
os.remove(fileName)
示例2: map
# 需要導入模塊: from TAMO.seq import Fasta [as 別名]
# 或者: from TAMO.seq.Fasta import text [as 別名]
from TAMO.seq import Fasta
from gusPyCode.defs.bioDefs import geneList2FastaDict
from gusPyCode.defs.mosqData import promoterSeqPaths
geneList = map(lambda l: l.strip(), \
open('/Users/biggus/Documents/James/Collaborations/Campbell/data/CCupAt4Days.gte2x.genes.txt', 'rU'))
sourceFasta = promoterSeqPaths.Aa_2000bpUp_hardMasked_shuf1
oFile = '/Users/biggus/Documents/James/Collaborations/Campbell/data/CCupAt4Days.gte2x.masked.shuffled.1.fas'
newFasta = geneList2FastaDict(geneList, sourceFasta, hardMasked=True)
newFasta = Fasta.text(newFasta)
oFile = open(oFile, 'w')
oFile.write(newFasta)
print 'Done'