comparison blast_unmatched.py @ 4:caa54ff096c8 draft

"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/blast_unmatched commit 3dcf4e7314dd6a4fefcd721ac58c8130dd1da2a1"
author artbio
date Wed, 10 Mar 2021 19:10:06 +0000
parents fffdb903f2d1
children
comparison
equal deleted inserted replaced
3:fffdb903f2d1 4:caa54ff096c8
38 """ 38 """
39 Compares matched queries to query fasta file and print unmatched to ouput 39 Compares matched queries to query fasta file and print unmatched to ouput
40 """ 40 """
41 output_file_handle = open(output_file, 'w') 41 output_file_handle = open(output_file, 'w')
42 unmatched = False 42 unmatched = False
43 end = re.compile(".+\W$") 43 end = re.compile(r".+\W$")
44 with open(fasta_file, 'r') as infile: 44 with open(fasta_file, 'r') as infile:
45 for line in infile: 45 for line in infile:
46 if line.startswith('>'): 46 if line.startswith('>'):
47 subline = line[1:].rstrip() # qid are 100chars long in blast 47 subline = line[1:].rstrip() # qid are 100chars long in blast
48 if end.match(subline) is not None: 48 if end.match(subline) is not None: