A new version of ngsfilger without a bug about error count between primers and sequence
This commit is contained in:
@ -356,14 +356,16 @@ def annotate(sequence,options):
|
||||
sequence['tail_quality']=q
|
||||
|
||||
primers = options.primers
|
||||
print >>sys.stderr,"directmatch"
|
||||
if options.debug:
|
||||
print >>sys.stderr,"directmatch"
|
||||
directmatch = [(p,p(sequence)) for p in primers]
|
||||
|
||||
|
||||
directmatch.sort(cmp=sortMatch)
|
||||
directmatch=directmatch[0] if directmatch[0][1] is not None else None
|
||||
|
||||
print >>sys.stderr,">>>>",directmatch
|
||||
if options.debug:
|
||||
print >>sys.stderr,">>>>",directmatch
|
||||
if directmatch is None:
|
||||
sequence['error']='No primer match'
|
||||
return False,sequence
|
||||
@ -389,12 +391,14 @@ def annotate(sequence,options):
|
||||
del sequence['cut']
|
||||
|
||||
primers = options.primers[directmatch[0]]
|
||||
print >>sys.stderr,"reverse match"
|
||||
if options.debug:
|
||||
print >>sys.stderr,"reverse match"
|
||||
reversematch = [(p,p(sequence)) for p in primers if p is not None]
|
||||
reversematch.sort(cmp=sortMatch)
|
||||
reversematch = reversematch[0] if reversematch[0][1] is not None else None
|
||||
|
||||
print >>sys.stderr,"<<<<",reversematch
|
||||
if options.debug:
|
||||
print >>sys.stderr,"<<<<",reversematch
|
||||
if reversematch is None and None not in primers:
|
||||
if directmatch[0].direct:
|
||||
message = 'No reverse primer match'
|
||||
|
Reference in New Issue
Block a user