comparison pal_filter.py @ 5:8159dab5dbdb draft

Bug fix to pal_filter.py.
author pjbriggs
date Tue, 12 Apr 2016 05:53:41 -0400
parents cb56cc1d5c39
children
comparison
equal deleted inserted replaced
4:cb56cc1d5c39 5:8159dab5dbdb
454 R2_output = R2_fasta_seq.replace("\n","\t",1).replace("\n","") 454 R2_output = R2_fasta_seq.replace("\n","\t",1).replace("\n","")
455 assembly_no_id = '\n'.join(assembly_seq.split('\n')[1:]) 455 assembly_no_id = '\n'.join(assembly_seq.split('\n')[1:])
456 456
457 # check that both primer sequences can be seen in the 457 # check that both primer sequences can be seen in the
458 # assembled contig 458 # assembled contig
459 if y or ReverseComplement1(y) in assembly_no_id and z or \ 459 if ((y in assembly_no_id) or \
460 ReverseComplement1(z) in assembly_no_id: 460 (ReverseComplement1(y) in assembly_no_id)) and \
461 ((z in assembly_no_id) or \
462 (ReverseComplement1(z) in assembly_no_id)):
461 if y in assembly_no_id: 463 if y in assembly_no_id:
462 # get the positions of the primers in the assembly 464 # get the positions of the primers in the assembly
463 # (can be used to predict fragment length) 465 # (can be used to predict fragment length)
464 F_position = assembly_no_id.index(y)+len(y)+1 466 F_position = assembly_no_id.index(y)+len(y)+1
465 if ReverseComplement1(y) in assembly_no_id: 467 if ReverseComplement1(y) in assembly_no_id: