# HG changeset patch # User artbio # Date 1507194661 14400 # Node ID dfcdac284538387114f682a9548680a1a5a944e2 # Parent 50c1fa95a07671b79fe93239ec9ccb7f06da4a63 planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/blast_unmatched commit 830e10a94c2afc178f4078609842cd93808df1b4 diff -r 50c1fa95a076 -r dfcdac284538 blast_unmatched.py --- a/blast_unmatched.py Tue Oct 03 12:41:53 2017 -0400 +++ b/blast_unmatched.py Thu Oct 05 05:11:01 2017 -0400 @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import optparse - +import re def parse_options(): """ @@ -36,10 +36,13 @@ """ output_file_handle = open(output_file, 'w') unmatched = False + end = re.compile(".+\W$") with open(fasta_file, 'r') as infile: for line in infile: if line.startswith('>'): - subline = line[1:100].rstrip() #qid are 100chars long in blast + subline = line[1:].rstrip() #qid are 100chars long in blast + while end.match(subline) != None: + subline = subline[:-1] if subline not in matched: output_file_handle.write(line) unmatched = True diff -r 50c1fa95a076 -r dfcdac284538 blast_unmatched.xml --- a/blast_unmatched.xml Tue Oct 03 12:41:53 2017 -0400 +++ b/blast_unmatched.xml Thu Oct 05 05:11:01 2017 -0400 @@ -1,4 +1,4 @@ - + get query sequences that didn't get a match during a blast