git-svn-id: https://www.grenoble.prabi.fr/svn/LECASofts/ecoPCR/branches/refactoring@85 60f365c0-8329-0410-b2a4-ec073aeeaa1d
This commit is contained in:
@ -69,7 +69,6 @@ def endLessIterator(endedlist):
|
|||||||
while(1):
|
while(1):
|
||||||
yield endedlist[-1]
|
yield endedlist[-1]
|
||||||
|
|
||||||
|
|
||||||
class ColumnFile(object):
|
class ColumnFile(object):
|
||||||
|
|
||||||
def __init__(self,stream,sep=None,strip=True,types=None):
|
def __init__(self,stream,sep=None,strip=True,types=None):
|
||||||
@ -149,7 +148,6 @@ def readNodeTable(file):
|
|||||||
bool,bool,bool,str))
|
bool,bool,bool,str))
|
||||||
print >>sys.stderr,"Reading taxonomy dump file..."
|
print >>sys.stderr,"Reading taxonomy dump file..."
|
||||||
taxonomy=[[n[0],n[2],n[1]] for n in nodes]
|
taxonomy=[[n[0],n[2],n[1]] for n in nodes]
|
||||||
|
|
||||||
print >>sys.stderr,"List all taxonomy rank..."
|
print >>sys.stderr,"List all taxonomy rank..."
|
||||||
ranks =list(set(x[1] for x in taxonomy))
|
ranks =list(set(x[1] for x in taxonomy))
|
||||||
ranks.sort()
|
ranks.sort()
|
||||||
@ -292,6 +290,7 @@ def emblEntryParser(entry):
|
|||||||
Tx = None
|
Tx = None
|
||||||
return {'id':Id,'taxid':Tx,'definition':De,'sequence':Sq}
|
return {'id':Id,'taxid':Tx,'definition':De,'sequence':Sq}
|
||||||
|
|
||||||
|
|
||||||
######################
|
######################
|
||||||
|
|
||||||
def parseFasta(seq):
|
def parseFasta(seq):
|
||||||
@ -315,7 +314,6 @@ def fastaEntryParser(entry):
|
|||||||
return {'id':id,'taxid':Tx,'definition':definition,'sequence':seq}
|
return {'id':id,'taxid':Tx,'definition':definition,'sequence':seq}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def sequenceIteratorFactory(entryParser,entryIterator):
|
def sequenceIteratorFactory(entryParser,entryIterator):
|
||||||
def sequenceIterator(file):
|
def sequenceIterator(file):
|
||||||
for entry in entryIterator(file):
|
for entry in entryIterator(file):
|
||||||
|
Reference in New Issue
Block a user