Repository 'cherry_pick_fasta'
hg clone https://toolshed.g2.bx.psu.edu/repos/artbio/cherry_pick_fasta

Changeset 3:c282a8a47dd9 (2021-05-21)
Previous changeset 2:321cad0eb507 (2021-03-16) Next changeset 4:ba6c4aeb22ea (2021-05-21)
Commit message:
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit d637de6c1090314bd34bdffc2fdf979cb55b870b"
modified:
cherry_pick_fasta.py
cherry_pick_fasta.xml
test-data/output.fa
added:
test-data/alt_termlist.txt
test-data/output_alt_termlist.fa
test-data/output_alt_termlist_without.fa
test-data/output_exact.fa
test-data/output_exactly_not.fa
b
diff -r 321cad0eb507 -r c282a8a47dd9 cherry_pick_fasta.py
--- a/cherry_pick_fasta.py Tue Mar 16 23:25:57 2021 +0000
+++ b/cherry_pick_fasta.py Fri May 21 09:34:14 2021 +0000
[
@@ -1,51 +1,63 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
-"""
-Chery pick of fasta sequences satisfying a query string in their header/name
-"""
+# Chery pick of fasta sequences satisfying a query string in their header/name
+import argparse
 
-import argparse
+from Bio import SeqIO
 
 
 def Parser():
     the_parser = argparse.ArgumentParser(
-        description="Cherry pick fasta sequences")
-    the_parser.add_argument('--input', action="store", type=str,
-                            help="input fasta file")
-    the_parser.add_argument('--searchfor', action="store", type=str,
-                            help="with, without, or withlist, withoutlist")
-    the_parser.add_argument('--query-string', dest="query_string",
-                            action="store", type=str,
-                            help="headers containing the string will be \
+        description='Cherry pick fasta sequences')
+    the_parser.add_argument('--input', action='store', type=str,
+                            help='input fasta file')
+    the_parser.add_argument('--searchfor', action='store', type=str,
+                            help='with, without, or withlist, withoutlist')
+    the_parser.add_argument('--mode', action='store', type=str,
+                            default='includes', help='exact or includes')
+    the_parser.add_argument('--query-string', dest='query_string',
+                            action='store', type=str,
+                            help='headers containing the string will be \
                                   extracted or excluded as well as the \
-                                  corresponding sequence")
-    the_parser.add_argument('--query-file', dest="query_file",
-                            action="store", type=str,
-                            help="headers containing any of the strings provided in the \
-                                  text file (1 string per line) will be \
-                                  extracted or excluded as well as the \
-                                  corresponding sequence")
-
-    the_parser.add_argument(
-        '--output', action="store", type=str, help="output fasta file")
+                                  corresponding sequence')
+    the_parser.add_argument('--query-file', dest='query_file',
+                            action='store', type=str,
+                            help='headers containing any of the strings \
+                                  provided in the text file (1 string per \
+                                  line) will be extracted or excluded as well \
+                                   as the corresponding sequence')
+    the_parser.add_argument('--output', action='store', type=str,
+                            help='output fasta file')
     args = the_parser.parse_args()
     return args
 
 
-def parse_fasta_with(query, FastaListe):
+def parse_fasta_dict(query, fasta_dict, mode):
     if not isinstance(query, list):
         query = [query]
     accumulator = []
-    for sequence in FastaListe:
-        for string in query:
-            if string in sequence:
-                accumulator.append(sequence)
-                continue
-    return accumulator
+    if mode == 'includes':
+        for seq_id in fasta_dict:
+            for string in query:
+                if string in seq_id:
+                    accumulator.append(seq_id)
+                    continue
+    elif mode == 'exact':
+        for seq_id in fasta_dict:
+            for string in query:
+                if string == seq_id:
+                    accumulator.append(seq_id)
+                    continue
+    res_dict = {k: fasta_dict[k] for k in fasta_dict if k in accumulator}
+    return res_dict
 
 
-def complement_fasta(fullfasta, subfasta):
-    return sorted(list(set(fullfasta) - set(subfasta)))
+def complement_fasta_dict(fasta_dict, subfasta_dict):
+    fasta_ids = list(fasta_dict.keys())
+    subfasta_ids = list(subfasta_dict.keys())
+    complement_ids = list(set(fasta_ids) - set(subfasta_ids))
+    sub_dict = {k: fasta_dict[k] for k in fasta_dict if k in complement_ids}
+    return sub_dict
 
 
 def getquerylist(file):
@@ -55,37 +67,37 @@
     return querylist
 
 
-def __main__():
-    """ main function """
-    args = Parser()
-    searchterm = args.query_string
-    CrudeFasta = open(args.input, "r").read()
-    Output = open(args.output, "w")
-    FastaListe = CrudeFasta.split(">")[1:]
-    if args.query_string:
-        if args.searchfor == 'with':
-            contList = parse_fasta_with(searchterm, FastaListe)
-            contFasta = ">%s" % ">".join(contList)
-            Output.write(contFasta)
-        elif args.searchfor == 'without':
-            notcontList = complement_fasta(FastaListe,
-                                           parse_fasta_with(searchterm,
-                                                            FastaListe))
-            notcontFasta = ">%s" % ">".join(notcontList)
-            Output.write(notcontFasta)
-    if args.query_file:
-        searchlist = getquerylist(args.query_file)
-        if args.searchfor == 'with':
-            contList = parse_fasta_with(searchlist, FastaListe)
-            contFasta = ">%s" % ">".join(contList)
-            Output.write(contFasta)
-        elif args.searchfor == 'without':
-            notcontList = complement_fasta(FastaListe, parse_fasta_with(
-                                           searchlist, FastaListe))
-            notcontFasta = ">%s" % ">".join(notcontList)
-            Output.write(notcontFasta)
-    Output.close()
+def buid_fasta_dict(fasta):
+    seq_dict = {rec.id: rec.seq for rec in SeqIO.parse(fasta, "fasta")}
+    return seq_dict
+
+
+def write_fasta_result(fasta_dict, file):
+    line_length = 60
+    with open(file, 'w') as f:
+        for header in sorted(fasta_dict):
+            f.write('>%s\n' % header)
+            for i in range(line_length, len(fasta_dict[header]), line_length):
+                f.write('%s\n' % fasta_dict[header][i-line_length:i])
+            f.write('%s\n' % fasta_dict[header][i:])
 
 
-if __name__ == "__main__":
+def __main__():
+    ''' main function '''
+    args = Parser()
+    fasta_dict = buid_fasta_dict(args.input)
+    if args.query_string:
+        query = args.query_string
+    elif args.query_file:
+        query = getquerylist(args.query_file)
+    if args.searchfor == 'with':
+        fasta_result_dict = parse_fasta_dict(query, fasta_dict, args.mode)
+    elif args.searchfor == 'without':
+        fasta_result_dict = complement_fasta_dict(fasta_dict, parse_fasta_dict(
+                                                  query, fasta_dict,
+                                                  args.mode))
+    write_fasta_result(fasta_result_dict, args.output)
+
+
+if __name__ == '__main__':
     __main__()
b
diff -r 321cad0eb507 -r c282a8a47dd9 cherry_pick_fasta.xml
--- a/cherry_pick_fasta.xml Tue Mar 16 23:25:57 2021 +0000
+++ b/cherry_pick_fasta.xml Fri May 21 09:34:14 2021 +0000
b
@@ -1,15 +1,23 @@
-<tool id="cherry_pick_fasta" name="Pick Fasta sequences" version="2.1.0">
+<tool id="cherry_pick_fasta" name="Pick Fasta sequences" version="3.0.0">
   <description>with header satisfying a string query</description>
   <requirements>
-      <requirement type="package" version="3.7.6">python</requirement>
+        <requirement type="package" version="1.70">biopython</requirement>
   </requirements>
   <command interpreter="python">cherry_pick_fasta.py
                                    --input $input
                                    --searchfor '$search.searchfor'
                                    #if $search.options_selector == 'single':
-                                       --query-string '$search.query'
+                                       #if $search.match == 'exact':
+                                           --query-string '$search.query' --mode exact
+                                       #else:
+                                           --query-string '$search.query' --mode includes
+                                       #end if
                                    #else:
-                                       --query-file '$search.query'
+                                       #if $search.match == 'exact':
+                                           --query-file '$search.query' --mode exact
+                                       #else:
+                                           --query-file '$search.query' --mode includes
+                                       #end if
                                    #end if
                                    --output $output
   </command>
@@ -18,11 +26,19 @@
     <param name="input" type="data" format="fasta" label="Source file" help="Fasta file to parse" />
 
     <conditional name="search">
-        <param name="options_selector" type="select" display="radio" label="by single term or file of terms">
-            <option value="single" selected="True">single term</option>
-            <option value="textdataset">terms in a text dataset</option>
+        <param name="options_selector" type="select" display="radio" label="for a">
+            <option value="single" selected="True">single string</option>
+            <option value="textdataset">list of strings</option>
         </param>
         <when value="single">
+            <param name="match" type="select"  label="retrieve sequences whose headers...">
+                <option value="include" selected="true">partially</option>
+                <option value="exact">exactly</option>
+            </param>
+            <param name="searchfor" type="select" label=" ">
+                <option value="with" selected="true">contain this string</option>
+                <option value="without">do not contain this string</option>
+            </param>
             <param name="query" type="text" size="30" value="" label="Search string" help="exemple: gi|40557596">
                 <sanitizer>
                     <valid initial="string.printable">
@@ -35,17 +51,17 @@
                     </mapping>
                 </sanitizer>
             </param>
-            <param name="searchfor" type="select" label="retrieve sequences whose headers contain or do not contain the search string">
-                <option value="with" selected="true">contain</option>
-                <option value="without">do not contain</option>
-            </param>
         </when>
         <when value="textdataset">
-            <param name="query" type="data" format="txt" label="term dataset" help="a list of term to search for, one term per line" />
-            <param name="searchfor" type="select" label="retrieve sequences whose headers contain or do not contain the search list">
-                <option value="with" selected="true">contain</option>
-                <option value="without">do not contain</option>
+            <param name="match" type="select"  label="retrieve sequences whose headers...">
+                <option value="includes" selected="true">partially</option>
+                <option value="exact">exactly</option>
             </param>
+            <param name="searchfor" type="select" label=" ">
+                <option value="with" selected="true">contain one of these list strings</option>
+                <option value="without">do not contain one of these list strings</option>
+            </param>
+            <param name="query" type="data" format="txt" label="list of strings dataset" help="a list of strings to search for, one string per line" />
         </when>
     </conditional>
   </inputs>
@@ -53,16 +69,50 @@
     <data name="output" format="fasta" label="Fasta sequences ${search.searchfor.value} ${search.options_selector} term(s) in header" />
   </outputs>
   <tests>
+    <!-- exact matches -->
+    <test>
+        <param ftype="fasta" name="input" value="input.fa" />
+        <param name="query" value="gi|81971654|sp|Q9IJX4.1|POLN_CRPVC_RecName:_Full_Replicase_polyprotein;_Contains:_RecName:_Full_Pro--Locus_65_Transcript_1/2_Confidence_0.667_Length_1344_hit1_IdMatch=43.46,AligLength=451,E-val=2e-122" />
+        <param name="searchfor" value="without" />
+        <param name="match" value="exact" />
+        <output name="output" ftype="fasta" file="output_exactly_not.fa" />
+    </test>
+    <test>
+        <param ftype="fasta" name="input" value="input.fa" />
+        <param name="query" value="gi|81971654|sp|Q9IJX4.1|POLN_CRPVC_RecName:_Full_Replicase_polyprotein;_Contains:_RecName:_Full_Pro--Locus_65_Transcript_1/2_Confidence_0.667_Length_1344_hit1_IdMatch=43.46,AligLength=451,E-val=2e-122" />
+        <param name="searchfor" value="with" />
+        <param name="match" value="exact" />
+        <output name="output" ftype="fasta" file="output_exact.fa" />
+    </test>
+
+
     <test>
         <param ftype="fasta" name="input" value="input.fa" />
-        <!-- <param name="options_selector" value="textdataset" /> -->
+        <param name="options_selector" value="textdataset" />
+        <param name="query" ftype="txt" value="alt_termlist.txt" />
+        <param name="searchfor" value="without" />
+        <param name="match" value="exact" />
+        <output name="output" ftype="fasta" file="output_alt_termlist_without.fa" />
+    </test>
+    <test>
+        <param ftype="fasta" name="input" value="input.fa" />
+        <param name="options_selector" value="textdataset" />
+        <param name="query" ftype="txt" value="alt_termlist.txt" />
+        <param name="searchfor" value="with" />
+        <param name="match" value="exact" />
+        <output name="output" ftype="fasta" file="output_alt_termlist.fa" />
+    </test>
+
+
+    <!-- partial matches -->
+    <test>
+        <param ftype="fasta" name="input" value="input.fa" />
         <param name="query" value="gi|81971654" />
         <param name="searchfor" value="with" />
         <output name="output" ftype="fasta" file="output.fa" />
     </test>
     <test>
         <param ftype="fasta" name="input" value="input.fa" />
-        <!-- <param name="options_selector" value="textdataset" /> -->
         <param name="query" value="RNA" />
         <param name="searchfor" value="without" />
         <output name="output" ftype="fasta" file="output_without.fa" />
@@ -82,17 +132,11 @@
         <output name="output" ftype="fasta" file="output_termlist_without.fa" />
     </test>
   </tests>
-
   <help>
 **What it does**
 
 This tool retrieves nucleotide/peptide sequences from a fasta file whose headers match
-or do not match a given string.
-
-It is Copyright © 2019 `CNRS and Sorbonne-Université`_ and is released under the `MIT license`_.
-
-.. _CNRS and  Sorbonne-Université: http://www.sorbonne-universite.fr/en
-.. _MIT license: http://opensource.org/licenses/MIT
+or do not match a given string, or a list of strings.
 
   </help>
 </tool>
b
diff -r 321cad0eb507 -r c282a8a47dd9 test-data/alt_termlist.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/alt_termlist.txt Fri May 21 09:34:14 2021 +0000
b
@@ -0,0 +1,5 @@
+Locus_65_
+Locus_63_
+Pro--Locus_50
+gi|21321709|ref|NP_647481.1|_nonstructural_polyprotein__Cricket_paralysis_virus--Locus_63_Transcript_2/2_Confidence_0.333_Length_343_hit1_IdMatch=50.86,AligLength=116,E-val=6e-30
+gi|2388673|gb|AAC58807.1|_replicase_polyprotein__Drosophila_C_virus--Locus_65_Transcript_1/2_Confidence_0.667_Length_1344_hit1_IdMatch=46.44,AligLength=450,E-val=8e-138
b
diff -r 321cad0eb507 -r c282a8a47dd9 test-data/output.fa
--- a/test-data/output.fa Tue Mar 16 23:25:57 2021 +0000
+++ b/test-data/output.fa Fri May 21 09:34:14 2021 +0000
b
@@ -1,27 +1,29 @@
->gi|81971654|sp|Q9IJX4.1|POLN_CRPVC_RecName:_Full_Replicase_polyprotein;_Contains:_RecName:_Full_Pro--Locus_65_Transcript_1/2_Confidence_0.667_Length_1344_hit1_IdMatch=43.46,AligLength=451,E-val=2e-122
-TAGATAAGGTTTGCTCATTTCTTGAGGATGCTTTACCAGGTATGGTCGAGCACGTTACGC
-TCGTAGCACAAAATACATCCGCGTCAGCCAAGGTGTTATCTGACGAGTTGATCAAATCAA
-TGCTTTGCATTGTTTTGATTTGCTTGTTGATTGAAACCAAGTTCTATAAGACCGCTTTCG
-CGGTACTTATAGTGGTTGCTCTACGTGTTTTCGGGTACAGTGAGCAAATAATTGAGACAG
-CTATGGACATGTATCGCGTAATTAGGGCTCCAAAGGCTCAAGGTAATATGGAAGATGTCG
-TTTTCCATCCGTGGTTGAACACGTGTGGAAAGTTGATTTTCCTACTTATCGCTGTCCTGT
-GTCTCAAGAAATTACCAGGAAAGAACGACGTAGACACTTTCATGCGCAGGCTCGACAGCT
-TACCCAAAGCTGTTAAGGGTGCGACACAACTACATGAATGGGTGTCAAAATACTTCGATC
-TCTCTTTGGATCACGTCAAGGCGATGATTGTTGGTAAATCTTGTGCCGAAATGAAGAAGG
-CTGAATCATCAAGCGCCAAAGTTTTGGCTTGGGCCGCTAGAGTTCAAGATTTCGTCAGAT
-TGGAACAACGAAGTAAAATCGATAGTGATATCGCTGTCGCCAACGAGGCTGAAGCCTTGT
-ATCACACTGGATTGCAATTTGCAGGAGACACTCTGTTACCTCCAGAATTGCACAAGGTCG
-TGAACAGTGCGCTAAGACCAGCCCGCGATATATATGAGTACGTCACCCGCTCCCCAATAA
-AAGGAGGGAGTCGTAAGATGAGACCCTTGATGATTTGGCTAGCTGGCCAGTCAGGAATTG
-GGAAAACCTCTATGGTGGATCCTCTATGTATCGATTTGCTTCGAGCAATGGGTTATGTGG
-GACCTGAACATCTCCACTCGTTGGTGTATGGCCGCCAAGTTGAGACGGAGTACTGGGATG
-GTTACAAAGCCCACAAGATAGTGATCTATGATGATGCTTTTCAGCTGAAAGATGATGCTG
-TGAACAGGAATTTGGAGGTATTTGAGGTTATACGTTCTTGCAACACGTATCCTCAACACC
-TTCATATGGCTTGTCTCTCGGATAAAAACACTTTTTCAGTAGCGGAAGTGTACATCTACA
-CTACCAACGAAATGAATGTCAAACTTGAGTCGCTGACTCATGAACAAGCATTCTACAACC
-GCATGAGTGAAAACGCGTTCACTGTGCGTCCAAAAGAGGCTTATCGTCTAGTCGAAGAAG
-GATCAACCGGCAATAAGCAGTATCGTTTGGACAAAACGAAAACCAAAGGAGCTATCGATC
-TCGATGTGTACGAATTCGTGCGC
+>gi|81971654|sp|Q9IJX4.1|POLN_CRPVC_RecName:_Full_Replicase_polyprotein;_Contains:_RecName:_Full_Pro--Locus_50_Transcript_1/1_Confidence_0.000_Length_1442_hit1_IdMatch=24.95,AligLength=537,E-val=8e-47
+GAATTCGTGCGCATGCAAAGAATAAATGACCACCCTTCGGGTTGGAAAGCTACGGATGAA
+GTATATGGCTATGCAGAGTTCTCGAAACTAATGTGTGCTGAATGGAAGAGAAGGAAGACA
+GAACATCAGAATACTGTTGACTTCCTTAAGAAGTATGCAGAGCGACCCTTCGAGACCAAC
+CCCGGACCAGTGGAGGATATCCCAATAAGACACGATGATGTCGAGCAGGGGGTAGAAGCG
+CAGATGGGTCGAGATGCAGATTGGTTTAACAATGACATAGCGGAACGTATAGCGCGTGGA
+CAGGATATTACTGATATCTTGTATGAGTATGCTGAAGATGACGAGTTGCATGAGGATTAC
+ATGGCTTACAAGAAACAGCAGGCCCAGCCTAGTAAGTGGGACAAATACGCGCGCCGTCTC
+GAAAGTGCAATTACGGAAGGAAAGAATTTCCTTGCCCGTGTGGTTTCAAAAATAGCCAGC
+GTCATTCGGGAGAACCCATATTTGACCATGATGGCAACTGTGGGGAGCGTTCTCGCTCTG
+TATGGAGCTATGCGTTGGTTTTCGAAAGGAGTAACGGAGACTTTTGACGCTGAAGAAGTT
+ACTATTCCCAACGAAACCAAGGTAGAGAACGTTGTGCGTACGGAGGGTTTTGAATCTTAC
+GACCATCGGACTCCGCGCGCTCATCGAGCCAACAGGCAATATGTGCGAGCTGAGGCGATG
+ATAGATGAAACAGGGTACCTGGTAGCCAACAACAAAGTCACTGGCAACACGTATCGAATG
+TGTATCAAGAGGGATCCTGATGATTTGGTCGTTGGAAACGCTGTGTTTATCACAGGGTGG
+ACGCTCCTCATACCGTACCACTTCGTTTGTGGACTGGCGGGACGGAGAATAGCTGCTGAT
+TCCATCGTGACTTTGTCAAAGCCAGGCTTGGATAAGATTATTGAATTCCCGTTGTCACGA
+ATCTTCCGATACGATACCTCACCAGATGGTTTTACCACTAGTGAGTATTGTGCTCGAATG
+GAACATGAAGATGGAGAATTGGTTGATGCCATCCTGGTAAACCTGCATGGTTTGGGAGTG
+CGAATCCATCCTGACCTCCGGGGAAAAATTGTGACGGTACGAGACCAAGCGCACCTGAGT
+ACGACATTTCATGCGATTCTCACAACGATGTCCAGGAAGCCACCACTAACAACGTCACAA
+CAAGTGGTAAAAGGGGTCAAGCCAATGGATAAAATCCTGCACATCAATTTACCAGTTGGG
+GACAAAACAACGCAATACACCCAACGTGACTGTTACAAGTATTATTCCGTAACGGTCGTT
+GGAGATTGTGGTGCCTTGCTGGTAGCACAAAATCATGCAATTGTGAGGAAAATATTTGCA
+ATGCATATAGCAGGTGCGGAAGAAAATGGCTATGCTTGTCCAATCAATCAGGAAATGTTA
+G
 >gi|81971654|sp|Q9IJX4.1|POLN_CRPVC_RecName:_Full_Replicase_polyprotein;_Contains:_RecName:_Full_Pro--Locus_63_Transcript_1/2_Confidence_0.333_Length_1607_hit1_IdMatch=52.99,AligLength=536,E-val=0.0
 CTAGAATCACAGCTCAGATGAGTTTTGAGGCACCGAAGGACGCAATTGAAGGACCGTGTC
 AAACCCCGGAAGGATTGTTCGCCCCTATTGGCAAAGCGCCGATAGGCGTAGGGATGTCCA
@@ -50,32 +52,6 @@
 ACCCAGATGATGTGACGATGATGATCATTGATACAGCATTTAGGGAGATCTCTTATCACG
 GAAGGGAAGCTTTCGAGAAGCTGCGAGGGCAGATACTTGAGCAGCGGGATGTGTTGGTTG
 AATATCCTCAA
->gi|81971654|sp|Q9IJX4.1|POLN_CRPVC_RecName:_Full_Replicase_polyprotein;_Contains:_RecName:_Full_Pro--Locus_50_Transcript_1/1_Confidence_0.000_Length_1442_hit1_IdMatch=24.95,AligLength=537,E-val=8e-47
-GAATTCGTGCGCATGCAAAGAATAAATGACCACCCTTCGGGTTGGAAAGCTACGGATGAA
-GTATATGGCTATGCAGAGTTCTCGAAACTAATGTGTGCTGAATGGAAGAGAAGGAAGACA
-GAACATCAGAATACTGTTGACTTCCTTAAGAAGTATGCAGAGCGACCCTTCGAGACCAAC
-CCCGGACCAGTGGAGGATATCCCAATAAGACACGATGATGTCGAGCAGGGGGTAGAAGCG
-CAGATGGGTCGAGATGCAGATTGGTTTAACAATGACATAGCGGAACGTATAGCGCGTGGA
-CAGGATATTACTGATATCTTGTATGAGTATGCTGAAGATGACGAGTTGCATGAGGATTAC
-ATGGCTTACAAGAAACAGCAGGCCCAGCCTAGTAAGTGGGACAAATACGCGCGCCGTCTC
-GAAAGTGCAATTACGGAAGGAAAGAATTTCCTTGCCCGTGTGGTTTCAAAAATAGCCAGC
-GTCATTCGGGAGAACCCATATTTGACCATGATGGCAACTGTGGGGAGCGTTCTCGCTCTG
-TATGGAGCTATGCGTTGGTTTTCGAAAGGAGTAACGGAGACTTTTGACGCTGAAGAAGTT
-ACTATTCCCAACGAAACCAAGGTAGAGAACGTTGTGCGTACGGAGGGTTTTGAATCTTAC
-GACCATCGGACTCCGCGCGCTCATCGAGCCAACAGGCAATATGTGCGAGCTGAGGCGATG
-ATAGATGAAACAGGGTACCTGGTAGCCAACAACAAAGTCACTGGCAACACGTATCGAATG
-TGTATCAAGAGGGATCCTGATGATTTGGTCGTTGGAAACGCTGTGTTTATCACAGGGTGG
-ACGCTCCTCATACCGTACCACTTCGTTTGTGGACTGGCGGGACGGAGAATAGCTGCTGAT
-TCCATCGTGACTTTGTCAAAGCCAGGCTTGGATAAGATTATTGAATTCCCGTTGTCACGA
-ATCTTCCGATACGATACCTCACCAGATGGTTTTACCACTAGTGAGTATTGTGCTCGAATG
-GAACATGAAGATGGAGAATTGGTTGATGCCATCCTGGTAAACCTGCATGGTTTGGGAGTG
-CGAATCCATCCTGACCTCCGGGGAAAAATTGTGACGGTACGAGACCAAGCGCACCTGAGT
-ACGACATTTCATGCGATTCTCACAACGATGTCCAGGAAGCCACCACTAACAACGTCACAA
-CAAGTGGTAAAAGGGGTCAAGCCAATGGATAAAATCCTGCACATCAATTTACCAGTTGGG
-GACAAAACAACGCAATACACCCAACGTGACTGTTACAAGTATTATTCCGTAACGGTCGTT
-GGAGATTGTGGTGCCTTGCTGGTAGCACAAAATCATGCAATTGTGAGGAAAATATTTGCA
-ATGCATATAGCAGGTGCGGAAGAAAATGGCTATGCTTGTCCAATCAATCAGGAAATGTTA
-G
 >gi|81971654|sp|Q9IJX4.1|POLN_CRPVC_RecName:_Full_Replicase_polyprotein;_Contains:_RecName:_Full_Pro--Locus_63_Transcript_2/2_Confidence_0.333_Length_343_hit1_IdMatch=50.86,AligLength=116,E-val=6e-30
 ACACAGTCCACAGTCCGAAGACCAAAGCGTTGGATAGGACACGAATACACAGATGAAACG
 AAAACAGGCGAGGCTGCGCCCTATCGGACATTGGAAGAAGTCCGTTTCCTTAAAAGAGGG
@@ -83,6 +59,30 @@
 GAAATGCTTAATTGGACGCGCAAAGGGATTAACCCAGATGATGTGACGATGATGATCATT
 GATACAGCATTTAGGGAGATCTCTTATCACGGAAGGGAAGCTTTCGAGAAGCTGCGAGGG
 CAGATACTTGAGCAGCGGGATGTGTTGGTTGAATATCCTCAA
+>gi|81971654|sp|Q9IJX4.1|POLN_CRPVC_RecName:_Full_Replicase_polyprotein;_Contains:_RecName:_Full_Pro--Locus_65_Transcript_1/2_Confidence_0.667_Length_1344_hit1_IdMatch=43.46,AligLength=451,E-val=2e-122
+TAGATAAGGTTTGCTCATTTCTTGAGGATGCTTTACCAGGTATGGTCGAGCACGTTACGC
+TCGTAGCACAAAATACATCCGCGTCAGCCAAGGTGTTATCTGACGAGTTGATCAAATCAA
+TGCTTTGCATTGTTTTGATTTGCTTGTTGATTGAAACCAAGTTCTATAAGACCGCTTTCG
+CGGTACTTATAGTGGTTGCTCTACGTGTTTTCGGGTACAGTGAGCAAATAATTGAGACAG
+CTATGGACATGTATCGCGTAATTAGGGCTCCAAAGGCTCAAGGTAATATGGAAGATGTCG
+TTTTCCATCCGTGGTTGAACACGTGTGGAAAGTTGATTTTCCTACTTATCGCTGTCCTGT
+GTCTCAAGAAATTACCAGGAAAGAACGACGTAGACACTTTCATGCGCAGGCTCGACAGCT
+TACCCAAAGCTGTTAAGGGTGCGACACAACTACATGAATGGGTGTCAAAATACTTCGATC
+TCTCTTTGGATCACGTCAAGGCGATGATTGTTGGTAAATCTTGTGCCGAAATGAAGAAGG
+CTGAATCATCAAGCGCCAAAGTTTTGGCTTGGGCCGCTAGAGTTCAAGATTTCGTCAGAT
+TGGAACAACGAAGTAAAATCGATAGTGATATCGCTGTCGCCAACGAGGCTGAAGCCTTGT
+ATCACACTGGATTGCAATTTGCAGGAGACACTCTGTTACCTCCAGAATTGCACAAGGTCG
+TGAACAGTGCGCTAAGACCAGCCCGCGATATATATGAGTACGTCACCCGCTCCCCAATAA
+AAGGAGGGAGTCGTAAGATGAGACCCTTGATGATTTGGCTAGCTGGCCAGTCAGGAATTG
+GGAAAACCTCTATGGTGGATCCTCTATGTATCGATTTGCTTCGAGCAATGGGTTATGTGG
+GACCTGAACATCTCCACTCGTTGGTGTATGGCCGCCAAGTTGAGACGGAGTACTGGGATG
+GTTACAAAGCCCACAAGATAGTGATCTATGATGATGCTTTTCAGCTGAAAGATGATGCTG
+TGAACAGGAATTTGGAGGTATTTGAGGTTATACGTTCTTGCAACACGTATCCTCAACACC
+TTCATATGGCTTGTCTCTCGGATAAAAACACTTTTTCAGTAGCGGAAGTGTACATCTACA
+CTACCAACGAAATGAATGTCAAACTTGAGTCGCTGACTCATGAACAAGCATTCTACAACC
+GCATGAGTGAAAACGCGTTCACTGTGCGTCCAAAAGAGGCTTATCGTCTAGTCGAAGAAG
+GATCAACCGGCAATAAGCAGTATCGTTTGGACAAAACGAAAACCAAAGGAGCTATCGATC
+TCGATGTGTACGAATTCGTGCGC
 >gi|81971654|sp|Q9IJX4.1|POLN_CRPVC_RecName:_Full_Replicase_polyprotein;_Contains:_RecName:_Full_Pro--Locus_65_Transcript_2/2_Confidence_0.333_Length_1324_hit1_IdMatch=43.5,AligLength=446,E-val=1e-119
 CTTGAGGATACTTTACCAGGTATGGTCGAGCACGTTACGCTCGTAGCACAAAATACATCC
 GCGTCAGCCAAGGTGTTATCTGACGAGTTGATCAAATCAATGCTTTGCATTGTTTTGATT
b
diff -r 321cad0eb507 -r c282a8a47dd9 test-data/output_alt_termlist.fa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/output_alt_termlist.fa Fri May 21 09:34:14 2021 +0000
b
@@ -0,0 +1,31 @@
+>gi|21321709|ref|NP_647481.1|_nonstructural_polyprotein__Cricket_paralysis_virus--Locus_63_Transcript_2/2_Confidence_0.333_Length_343_hit1_IdMatch=50.86,AligLength=116,E-val=6e-30
+ACACAGTCCACAGTCCGAAGACCAAAGCGTTGGATAGGACACGAATACACAGATGAAACG
+AAAACAGGCGAGGCTGCGCCCTATCGGACATTGGAAGAAGTCCGTTTCCTTAAAAGAGGG
+TTCAGAATGGATCACCTCTTGTGTCGGTGGGTAGCTCCTTTGAAGAAGGATGTCATCTAC
+GAAATGCTTAATTGGACGCGCAAAGGGATTAACCCAGATGATGTGACGATGATGATCATT
+GATACAGCATTTAGGGAGATCTCTTATCACGGAAGGGAAGCTTTCGAGAAGCTGCGAGGG
+CAGATACTTGAGCAGCGGGATGTGTTGGTTGAATATCCTCAA
+>gi|2388673|gb|AAC58807.1|_replicase_polyprotein__Drosophila_C_virus--Locus_65_Transcript_1/2_Confidence_0.667_Length_1344_hit1_IdMatch=46.44,AligLength=450,E-val=8e-138
+TAGATAAGGTTTGCTCATTTCTTGAGGATGCTTTACCAGGTATGGTCGAGCACGTTACGC
+TCGTAGCACAAAATACATCCGCGTCAGCCAAGGTGTTATCTGACGAGTTGATCAAATCAA
+TGCTTTGCATTGTTTTGATTTGCTTGTTGATTGAAACCAAGTTCTATAAGACCGCTTTCG
+CGGTACTTATAGTGGTTGCTCTACGTGTTTTCGGGTACAGTGAGCAAATAATTGAGACAG
+CTATGGACATGTATCGCGTAATTAGGGCTCCAAAGGCTCAAGGTAATATGGAAGATGTCG
+TTTTCCATCCGTGGTTGAACACGTGTGGAAAGTTGATTTTCCTACTTATCGCTGTCCTGT
+GTCTCAAGAAATTACCAGGAAAGAACGACGTAGACACTTTCATGCGCAGGCTCGACAGCT
+TACCCAAAGCTGTTAAGGGTGCGACACAACTACATGAATGGGTGTCAAAATACTTCGATC
+TCTCTTTGGATCACGTCAAGGCGATGATTGTTGGTAAATCTTGTGCCGAAATGAAGAAGG
+CTGAATCATCAAGCGCCAAAGTTTTGGCTTGGGCCGCTAGAGTTCAAGATTTCGTCAGAT
+TGGAACAACGAAGTAAAATCGATAGTGATATCGCTGTCGCCAACGAGGCTGAAGCCTTGT
+ATCACACTGGATTGCAATTTGCAGGAGACACTCTGTTACCTCCAGAATTGCACAAGGTCG
+TGAACAGTGCGCTAAGACCAGCCCGCGATATATATGAGTACGTCACCCGCTCCCCAATAA
+AAGGAGGGAGTCGTAAGATGAGACCCTTGATGATTTGGCTAGCTGGCCAGTCAGGAATTG
+GGAAAACCTCTATGGTGGATCCTCTATGTATCGATTTGCTTCGAGCAATGGGTTATGTGG
+GACCTGAACATCTCCACTCGTTGGTGTATGGCCGCCAAGTTGAGACGGAGTACTGGGATG
+GTTACAAAGCCCACAAGATAGTGATCTATGATGATGCTTTTCAGCTGAAAGATGATGCTG
+TGAACAGGAATTTGGAGGTATTTGAGGTTATACGTTCTTGCAACACGTATCCTCAACACC
+TTCATATGGCTTGTCTCTCGGATAAAAACACTTTTTCAGTAGCGGAAGTGTACATCTACA
+CTACCAACGAAATGAATGTCAAACTTGAGTCGCTGACTCATGAACAAGCATTCTACAACC
+GCATGAGTGAAAACGCGTTCACTGTGCGTCCAAAAGAGGCTTATCGTCTAGTCGAAGAAG
+GATCAACCGGCAATAAGCAGTATCGTTTGGACAAAACGAAAACCAAAGGAGCTATCGATC
+TCGATGTGTACGAATTCGTGCGC
b
diff -r 321cad0eb507 -r c282a8a47dd9 test-data/output_alt_termlist_without.fa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/output_alt_termlist_without.fa Fri May 21 09:34:14 2021 +0000
b
b'@@ -0,0 +1,5874 @@\n+>gi|123840414|sp|Q2Y0E9.1|RDRP_APRVF_RecName:_Full_RNA-directed_RNA_polymerase_VP2--Locus_27_Transcript_1/7_Confidence_0.444_Length_3872_hit1_IdMatch=25.16,AligLength=1220,E-val=1e-82\n+TTATAGTACCTCAGAGTATTTTGAAGCCACCACCTTTCAACGAGAAAGACTGGCCTTTGA\n+ATGAAGACGAGAGTATGTTCAGTGCCTCGCGCAAGTATAATTACATGATAAATACTAGTA\n+CGTTGAGCCTTTATGGTTCGAGGGAAAGTTTAGTCGGTAAAGCAATATACGGTTTATATA\n+CTGATGAGCAATCACAGTCACGCTTCAGGACAGTATGGCATCAAATAATGGCAAGTGTCT\n+ACGCACTAGACGATTATCTAGGTCATACTAACCATCCAGTTCGTGCAGTGTTGGCACAGT\n+TAAACTTAGACAAAGGATTACCATTCAAGGAAACTGCTGAAGGTATTGACTTAACAGAGG\n+CGGTTGAAAAAGGAATTGATTCGAGTACATTACTACCATCAATATTATATATGTTGATCT\n+CAGTATCGTGCGATATCTGTTTCGGAATTTCAACTGAAGTTGAAGGTGCCTTTACGATCA\n+ATCATTATCTTAATCTAGCACAGCATGATTACGCGGATGAGAAGTTACGAATTAAGTCGG\n+CATGTCGTAATTGGTTTGCACAAGCATTGAGTAAACTAGACGTCATAGCTTACCCAGTTT\n+ATAACAATCAGCTCGAGATCATCGACCTAAAGTATGTACATGGTAAAGAGCCAAAGTATG\n+TAAGCACATTACATGAAAAAGTTGCCGAATCACGTCAACGTAAGCTGTCAAAATACCCAT\n+ACTTACTGGAATATATTGATAGGTCACGTAAAGCGAAAACGGTGGAGGAATTAATCCATA\n+GACTTTTAGTGATGAATGCACTTTCAAACGACCGCTCTTTCTATAAAACACGGACGGAAT\n+TATCATTAGACGCGGCGGTAAAATCAGAGGTGCGAGAGCACTTAGTTAGTGCTCCGGTCG\n+CTAAATTGATTGACCCTCAGTCTAATCGAATCTATCAGAAGTACTTTATTAGAGAAAGGA\n+ATGAAGCAATGTACTATGCTCAACAGTACTTATTAAGCTTTGTCCCAGCATTGATCCAAC\n+AACTGAGCAAAACCAACTTTGATGAGGAATGGTTACGATTTTTAACCACATCTTCACCTG\n+GAGTCAAATTACCTCAAGAAACGCTAGACAGCCTGAGTAAAACATCTGCAGTATTATCGA\n+AATCAAGACGAGGTTTGGAAGCGCTTGAAGCATCTGAATATAGAAGCATCAATCGTGTTG\n+AACGAGCGTTAGAGATGGTACTCAAATTAGTTCAAAGACAACAAAATGATAGAAGACAAC\n+GAGCGATAGCAGGCGAACCAAATTCCATTCTATTACTGACCCTTGTTTATTATGTTATCT\n+TATCGGCTATGTACGCCATGTCGACAGATGCAGCTCAAGGTAAACAGGTTGGTAATTCAA\n+TGGACCTTCAAGACTTGTTATTCGCGACAACTCAGACGGACACGCTTGTGTCATCAATTG\n+ATATTGTAGGTATGGATGCTTCTGTGCAGTCAATAACTACTGAGTTGTCAAATATTATCT\n+GTCTTGAAGTGACGCGTGGTTTACCTGAATCACAAATTGGACCATTTACAGGCGGTATGA\n+AGCGTCTTCTGCAACTAAGTGATGAACCTGGTGGAGCGTGGAAGCAGGTTGAGATGTATG\n+TATCAGGTACACTTGAGGCCGTGGTATTCGAAGGTAGTCATGCACTAACATCAACTACTT\n+ACGAGAGTAAGATTTTTGGAAGTGTTAAGAACTATGCGGGTACGTATCCCTCAGGTAGAG\n+CTGACACGTCGTCACATCACACTAAGGTTTTGGAAGGTGCGACCCGTGGTAATGAAATGC\n+GAAGAAGAACGGATGAGCGAATCGTGCACCATGCGTCGACGATTGTAATGTCACGTAATA\n+TGGGTGATGATAAGTCAGACGTATACACAGGATCATTTCCAAATGTTATATCACAATTAG\n+TGAGCGATAAAGATGTACTCGCACAATTGGGTTTTAAGACAGATGCAGATCTCTCGAGTC\n+ACAACGGAGAATTCTTGCAACAACATGTATGTAGAGGAAGGCTAGTCGGAAAACCATCAC\n+GTATATCAATAGGCACAGTAGAGCATCGTAAAGAGAAGGTTCGGATGCATGAAGCATGTC\n+AAGAACTTCTATCTATTATGGATGACCTAATTGTGCGTATTAGAGATACCGAGGGCTTGA\n+AGATGATGATCTTCTCGTTTGCTATACATTGCATTAATAGTATTGTATTAAACATTGCGA\n+AAGTTGATCTTGCCGCTATAATATCGAAATTGACTTCAAATAATTTGCGTACATATGTAT\n+ATCCTACGAAAGATGAACATGCTTTTCAGCTCGTTAGATTGTATTTTCCATTGATGTGGT\n+TCTTTATGCATAAAGGTGGTGAATTACCAGCTTATCCAATTGAACGGGTTGATGGTACTT\n+ATACAGATGACGAGTCGGTGTACACTGTGCGAGGTGAATACAAACGAAGATTGATGTTTG\n+ATATTATAGGTATTGATAAAATTGAGAAATTTGGTGACGCCATTTTCAGAAATAATCACT\n+GCTTTGATATCGGTTTGAACGCTGCTGATGCCATCATTAAGCTGAAGATAACGGATCTAC\n+CGAAGGAAATGAGAAGTGAAACGCTCGAGCATGGTATCATATCAAATCTAGCGAAAAATT\n+TAGAGTCATTCGGCAATGCTATGTCTAAGGAAGCTTCACTTCAAGCGAAACTCAGGATTG\n+AAAATGAACTTGCAGGTGTTAGGAGCGTAACTCAGACAAATGAAGTTGTCGTTGGAAGAG\n+GAAAGATAGCAAAAGTCCCAAAAAGTATTGTATACGCACATCGAACTGAAGCACAACTTG\n+AACAGATATTAATGACAAGAGAGTCGGATAATGAAGAGCGACCAATGATATCAAAGCGAA\n+TGCTTGATCACATCGCTTCACTATCGTTTCATCATGTTGTTAATGTCAAGACAACGGATA\n+AGTTACACTTGTATTACTTCTATCCTAGTGGCGATGCCCTAGTTTACGGTAATCATGCAA\n+AATACACTGAACATTTCGAATTAGCTCCACCTATGTGGTATTTGTCACCTTCATGGCGTT\n+TATATGGCCTATTAGGTACAGCGTCACAGACACGTGGTGACTTACTTCGACAAATTAATT\n+GGCTAAAAGGTAAATATGGAACGTTTAAGCTTGATGACGAGAAGATCCGTTATGGATATG\n+ATGTTATCTGGCGAAAGAACAGACATCTGCTTAATGACTACATGACAATGATCGGAGCAT\n+CACCACATCTTGAAAACTTGCTTAAGAGCATCTTTCGTTTGATGGATAGATGGGGTACTT\n+ATCGTTATGATTACATTCAAACACCGAGGAATATTTTCTTTATCTCAGACAATCCATTAG\n+TCGCTGAACAGAACATTATCTTCGCTGCAGATGGTGACGAGATAACTAGGCCCTTACAGG\n+TAATTGTCGGCTATCTACATATACTTGCGCAT\n+>gi|123840414|sp|Q2Y0E9.1|RDRP_APRVF_RecName:_Full_RNA-directed_RNA_polymerase_VP2--Locus_27_Transcript_2/7_Confidence_0.333_Length_3860_hit1_IdMatch=25.16,AligLength=1220,E-val=1e-82\n+TTATAGTACCTCAGAGTATTTTGAAGCCACCACCTTTCAAC'..b'GTGATGACAATCTACTTA\n+ACATCTCGGAAGGGGTAATTGATATCTTCAACCAACTTACCATCTCGGAAGCCATGCGTT\n+GGATAGGACACGAATACACAGATGAAACGAAAACAGGCGAGGCTGCGCCCTATCGGACAT\n+TGGAAGAAGTCCGTTTCCTTAAAAGAGGGTTCAGAATGGATCACCTCTTGTGTCGGTGGG\n+TAGCTCCTTTGAAGAAGGATGTCATCTACGAAATGCTTAATTGGACGCGCAAAGGGATTA\n+ACCCAGATGATGTGACGATGATGATCATTGATACAGCATTTAGGGAGATCTCTTATCACG\n+GAAGGGAAGCTTTCGAGAAGCTGCGAGGGCAGATACTTGAGCAGCGGGATGTGTTGGTTG\n+AATATCCTCAA\n+>gi|9629651|ref|NP_044945.1|_replicase_polyprotein__Drosophila_C_virus--Locus_63_Transcript_2/2_Confidence_0.333_Length_343_hit1_IdMatch=54.37,AligLength=103,E-val=5e-27\n+TAGGACACGAATACACAGATGAAACGAAAACAGGCGAGGCTGCGCCCTATCGGACATTGG\n+AAGAAGTCCGTTTCCTTAAAAGAGGGTTCAGAATGGATCACCTCTTGTGTCGGTGGGTAG\n+CTCCTTTGAAGAAGGATGTCATCTACGAAATGCTTAATTGGACGCGCAAAGGGATTAACC\n+CAGATGATGTGACGATGATGATCATTGATACAGCATTTAGGGAGATCTCTTATCACGGAA\n+GGGAAGCTTTCGAGAAGCTGCGAGGGCAGATACTTGAGCAGCGGGATGTGTTGGTTGAAT\n+ATCCTCAA\n+>gi|9629651|ref|NP_044945.1|_replicase_polyprotein__Drosophila_C_virus--Locus_65_Transcript_1/2_Confidence_0.667_Length_1344_hit1_IdMatch=46.44,AligLength=450,E-val=8e-138\n+TAGATAAGGTTTGCTCATTTCTTGAGGATGCTTTACCAGGTATGGTCGAGCACGTTACGC\n+TCGTAGCACAAAATACATCCGCGTCAGCCAAGGTGTTATCTGACGAGTTGATCAAATCAA\n+TGCTTTGCATTGTTTTGATTTGCTTGTTGATTGAAACCAAGTTCTATAAGACCGCTTTCG\n+CGGTACTTATAGTGGTTGCTCTACGTGTTTTCGGGTACAGTGAGCAAATAATTGAGACAG\n+CTATGGACATGTATCGCGTAATTAGGGCTCCAAAGGCTCAAGGTAATATGGAAGATGTCG\n+TTTTCCATCCGTGGTTGAACACGTGTGGAAAGTTGATTTTCCTACTTATCGCTGTCCTGT\n+GTCTCAAGAAATTACCAGGAAAGAACGACGTAGACACTTTCATGCGCAGGCTCGACAGCT\n+TACCCAAAGCTGTTAAGGGTGCGACACAACTACATGAATGGGTGTCAAAATACTTCGATC\n+TCTCTTTGGATCACGTCAAGGCGATGATTGTTGGTAAATCTTGTGCCGAAATGAAGAAGG\n+CTGAATCATCAAGCGCCAAAGTTTTGGCTTGGGCCGCTAGAGTTCAAGATTTCGTCAGAT\n+TGGAACAACGAAGTAAAATCGATAGTGATATCGCTGTCGCCAACGAGGCTGAAGCCTTGT\n+ATCACACTGGATTGCAATTTGCAGGAGACACTCTGTTACCTCCAGAATTGCACAAGGTCG\n+TGAACAGTGCGCTAAGACCAGCCCGCGATATATATGAGTACGTCACCCGCTCCCCAATAA\n+AAGGAGGGAGTCGTAAGATGAGACCCTTGATGATTTGGCTAGCTGGCCAGTCAGGAATTG\n+GGAAAACCTCTATGGTGGATCCTCTATGTATCGATTTGCTTCGAGCAATGGGTTATGTGG\n+GACCTGAACATCTCCACTCGTTGGTGTATGGCCGCCAAGTTGAGACGGAGTACTGGGATG\n+GTTACAAAGCCCACAAGATAGTGATCTATGATGATGCTTTTCAGCTGAAAGATGATGCTG\n+TGAACAGGAATTTGGAGGTATTTGAGGTTATACGTTCTTGCAACACGTATCCTCAACACC\n+TTCATATGGCTTGTCTCTCGGATAAAAACACTTTTTCAGTAGCGGAAGTGTACATCTACA\n+CTACCAACGAAATGAATGTCAAACTTGAGTCGCTGACTCATGAACAAGCATTCTACAACC\n+GCATGAGTGAAAACGCGTTCACTGTGCGTCCAAAAGAGGCTTATCGTCTAGTCGAAGAAG\n+GATCAACCGGCAATAAGCAGTATCGTTTGGACAAAACGAAAACCAAAGGAGCTATCGATC\n+TCGATGTGTACGAATTCGTGCGC\n+>gi|9629651|ref|NP_044945.1|_replicase_polyprotein__Drosophila_C_virus--Locus_65_Transcript_2/2_Confidence_0.333_Length_1324_hit1_IdMatch=46.74,AligLength=445,E-val=1e-135\n+CTTGAGGATACTTTACCAGGTATGGTCGAGCACGTTACGCTCGTAGCACAAAATACATCC\n+GCGTCAGCCAAGGTGTTATCTGACGAGTTGATCAAATCAATGCTTTGCATTGTTTTGATT\n+TGCTTGTTGATTGAAACCAAGTTCTATAAGACCGCTTTCGCGGTACTTATAGTGGTTGCT\n+CTACGTGTTTTCGGGTACAGTGAGCAAATAATTGAGACAGCTATGGACATGTATCGCGTA\n+ATTAGGGCTCCAAAGGCTCAAGGTAATATGGAAGATGTCGTTTTCCATCCGTGGTTGAAC\n+ACGTGTGGAAAGTTGATTTTCCTACTTATCGCTGTCCTGTGTCTCAAGAAATTACCAGGA\n+AAGAACGACGTAGACACTTTCATGCGCAGGCTCGACAGCTTACCCAAAGCTGTTAAGGGT\n+GCGACACAACTACATGAATGGGTGTCAAAATACTTCGATCTCTCTTTGGATCACGTCAAG\n+GCGATGATTGTTGGTAAATCTTGTGCCGAAATGAAGAAGGCTGAATCATCAAGCGCCAAA\n+GTTTTGGCTTGGGCCGCTAGAGTTCAAGATTTCGTCAGATTGGAACAACGAAGTAAAATC\n+GATAGTGATATCGCTGTCGCCAACGAGGCTGAAGCCTTGTATCACACTGGATTGCAATTT\n+GCAGGAGACACTCTGTTACCTCCAGAATTGCACAAGGTCGTGAACAGTGCGCTAAGACCA\n+GCCCGCGATATATATGAGTACGTCACCCGCTCCCCAATAAAAGGAGGGAGTCGTAAGATG\n+AGACCCTTGATGATTTGGCTAGCTGGCCAGTCAGGAATTGGGAAAACCTCTATGGTGGAT\n+CCTCTATGTATCGATTTGCTTCGAGCAATGGGTTATGTGGGACCTGAACATCTCCACTCG\n+TTGGTGTATGGCCGCCAAGTTGAGACGGAGTACTGGGATGGTTACAAAGCCCACAAGATA\n+GTGATCTATGATGATGCTTTTCAGCTGAAAGATGATGCTGTGAACAGGAATTTGGAGGTA\n+TTTGAGGTTATACGTTCTTGCAACACGTATCCTCAACACCTTCATATGGCTTGTCTCTCG\n+GATAAAAACACTTTTTCAGTAGCGGAAGTGTACATCTACACTACCAACGAAATGAATGTC\n+AAACTTGAGTCGCTGACTCATGAACAAGCATTCTACAACCGCATGAGTGAAAACGCGTTC\n+ACTGTGCGTCCAAAAGAGGCTTATCGTCTAGTCGAAGAAGGATCAACCGGCAATAAGCAG\n+TATCGTTTGGACAAAACGAAAACCAAAGGAGCTATCGATCTCGATGTGTACGAATTCGTG\n+CGC\n'
b
diff -r 321cad0eb507 -r c282a8a47dd9 test-data/output_exact.fa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/output_exact.fa Fri May 21 09:34:14 2021 +0000
b
@@ -0,0 +1,24 @@
+>gi|81971654|sp|Q9IJX4.1|POLN_CRPVC_RecName:_Full_Replicase_polyprotein;_Contains:_RecName:_Full_Pro--Locus_65_Transcript_1/2_Confidence_0.667_Length_1344_hit1_IdMatch=43.46,AligLength=451,E-val=2e-122
+TAGATAAGGTTTGCTCATTTCTTGAGGATGCTTTACCAGGTATGGTCGAGCACGTTACGC
+TCGTAGCACAAAATACATCCGCGTCAGCCAAGGTGTTATCTGACGAGTTGATCAAATCAA
+TGCTTTGCATTGTTTTGATTTGCTTGTTGATTGAAACCAAGTTCTATAAGACCGCTTTCG
+CGGTACTTATAGTGGTTGCTCTACGTGTTTTCGGGTACAGTGAGCAAATAATTGAGACAG
+CTATGGACATGTATCGCGTAATTAGGGCTCCAAAGGCTCAAGGTAATATGGAAGATGTCG
+TTTTCCATCCGTGGTTGAACACGTGTGGAAAGTTGATTTTCCTACTTATCGCTGTCCTGT
+GTCTCAAGAAATTACCAGGAAAGAACGACGTAGACACTTTCATGCGCAGGCTCGACAGCT
+TACCCAAAGCTGTTAAGGGTGCGACACAACTACATGAATGGGTGTCAAAATACTTCGATC
+TCTCTTTGGATCACGTCAAGGCGATGATTGTTGGTAAATCTTGTGCCGAAATGAAGAAGG
+CTGAATCATCAAGCGCCAAAGTTTTGGCTTGGGCCGCTAGAGTTCAAGATTTCGTCAGAT
+TGGAACAACGAAGTAAAATCGATAGTGATATCGCTGTCGCCAACGAGGCTGAAGCCTTGT
+ATCACACTGGATTGCAATTTGCAGGAGACACTCTGTTACCTCCAGAATTGCACAAGGTCG
+TGAACAGTGCGCTAAGACCAGCCCGCGATATATATGAGTACGTCACCCGCTCCCCAATAA
+AAGGAGGGAGTCGTAAGATGAGACCCTTGATGATTTGGCTAGCTGGCCAGTCAGGAATTG
+GGAAAACCTCTATGGTGGATCCTCTATGTATCGATTTGCTTCGAGCAATGGGTTATGTGG
+GACCTGAACATCTCCACTCGTTGGTGTATGGCCGCCAAGTTGAGACGGAGTACTGGGATG
+GTTACAAAGCCCACAAGATAGTGATCTATGATGATGCTTTTCAGCTGAAAGATGATGCTG
+TGAACAGGAATTTGGAGGTATTTGAGGTTATACGTTCTTGCAACACGTATCCTCAACACC
+TTCATATGGCTTGTCTCTCGGATAAAAACACTTTTTCAGTAGCGGAAGTGTACATCTACA
+CTACCAACGAAATGAATGTCAAACTTGAGTCGCTGACTCATGAACAAGCATTCTACAACC
+GCATGAGTGAAAACGCGTTCACTGTGCGTCCAAAAGAGGCTTATCGTCTAGTCGAAGAAG
+GATCAACCGGCAATAAGCAGTATCGTTTGGACAAAACGAAAACCAAAGGAGCTATCGATC
+TCGATGTGTACGAATTCGTGCGC
b
diff -r 321cad0eb507 -r c282a8a47dd9 test-data/output_exactly_not.fa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/output_exactly_not.fa Fri May 21 09:34:14 2021 +0000
b
b'@@ -0,0 +1,5881 @@\n+>gi|123840414|sp|Q2Y0E9.1|RDRP_APRVF_RecName:_Full_RNA-directed_RNA_polymerase_VP2--Locus_27_Transcript_1/7_Confidence_0.444_Length_3872_hit1_IdMatch=25.16,AligLength=1220,E-val=1e-82\n+TTATAGTACCTCAGAGTATTTTGAAGCCACCACCTTTCAACGAGAAAGACTGGCCTTTGA\n+ATGAAGACGAGAGTATGTTCAGTGCCTCGCGCAAGTATAATTACATGATAAATACTAGTA\n+CGTTGAGCCTTTATGGTTCGAGGGAAAGTTTAGTCGGTAAAGCAATATACGGTTTATATA\n+CTGATGAGCAATCACAGTCACGCTTCAGGACAGTATGGCATCAAATAATGGCAAGTGTCT\n+ACGCACTAGACGATTATCTAGGTCATACTAACCATCCAGTTCGTGCAGTGTTGGCACAGT\n+TAAACTTAGACAAAGGATTACCATTCAAGGAAACTGCTGAAGGTATTGACTTAACAGAGG\n+CGGTTGAAAAAGGAATTGATTCGAGTACATTACTACCATCAATATTATATATGTTGATCT\n+CAGTATCGTGCGATATCTGTTTCGGAATTTCAACTGAAGTTGAAGGTGCCTTTACGATCA\n+ATCATTATCTTAATCTAGCACAGCATGATTACGCGGATGAGAAGTTACGAATTAAGTCGG\n+CATGTCGTAATTGGTTTGCACAAGCATTGAGTAAACTAGACGTCATAGCTTACCCAGTTT\n+ATAACAATCAGCTCGAGATCATCGACCTAAAGTATGTACATGGTAAAGAGCCAAAGTATG\n+TAAGCACATTACATGAAAAAGTTGCCGAATCACGTCAACGTAAGCTGTCAAAATACCCAT\n+ACTTACTGGAATATATTGATAGGTCACGTAAAGCGAAAACGGTGGAGGAATTAATCCATA\n+GACTTTTAGTGATGAATGCACTTTCAAACGACCGCTCTTTCTATAAAACACGGACGGAAT\n+TATCATTAGACGCGGCGGTAAAATCAGAGGTGCGAGAGCACTTAGTTAGTGCTCCGGTCG\n+CTAAATTGATTGACCCTCAGTCTAATCGAATCTATCAGAAGTACTTTATTAGAGAAAGGA\n+ATGAAGCAATGTACTATGCTCAACAGTACTTATTAAGCTTTGTCCCAGCATTGATCCAAC\n+AACTGAGCAAAACCAACTTTGATGAGGAATGGTTACGATTTTTAACCACATCTTCACCTG\n+GAGTCAAATTACCTCAAGAAACGCTAGACAGCCTGAGTAAAACATCTGCAGTATTATCGA\n+AATCAAGACGAGGTTTGGAAGCGCTTGAAGCATCTGAATATAGAAGCATCAATCGTGTTG\n+AACGAGCGTTAGAGATGGTACTCAAATTAGTTCAAAGACAACAAAATGATAGAAGACAAC\n+GAGCGATAGCAGGCGAACCAAATTCCATTCTATTACTGACCCTTGTTTATTATGTTATCT\n+TATCGGCTATGTACGCCATGTCGACAGATGCAGCTCAAGGTAAACAGGTTGGTAATTCAA\n+TGGACCTTCAAGACTTGTTATTCGCGACAACTCAGACGGACACGCTTGTGTCATCAATTG\n+ATATTGTAGGTATGGATGCTTCTGTGCAGTCAATAACTACTGAGTTGTCAAATATTATCT\n+GTCTTGAAGTGACGCGTGGTTTACCTGAATCACAAATTGGACCATTTACAGGCGGTATGA\n+AGCGTCTTCTGCAACTAAGTGATGAACCTGGTGGAGCGTGGAAGCAGGTTGAGATGTATG\n+TATCAGGTACACTTGAGGCCGTGGTATTCGAAGGTAGTCATGCACTAACATCAACTACTT\n+ACGAGAGTAAGATTTTTGGAAGTGTTAAGAACTATGCGGGTACGTATCCCTCAGGTAGAG\n+CTGACACGTCGTCACATCACACTAAGGTTTTGGAAGGTGCGACCCGTGGTAATGAAATGC\n+GAAGAAGAACGGATGAGCGAATCGTGCACCATGCGTCGACGATTGTAATGTCACGTAATA\n+TGGGTGATGATAAGTCAGACGTATACACAGGATCATTTCCAAATGTTATATCACAATTAG\n+TGAGCGATAAAGATGTACTCGCACAATTGGGTTTTAAGACAGATGCAGATCTCTCGAGTC\n+ACAACGGAGAATTCTTGCAACAACATGTATGTAGAGGAAGGCTAGTCGGAAAACCATCAC\n+GTATATCAATAGGCACAGTAGAGCATCGTAAAGAGAAGGTTCGGATGCATGAAGCATGTC\n+AAGAACTTCTATCTATTATGGATGACCTAATTGTGCGTATTAGAGATACCGAGGGCTTGA\n+AGATGATGATCTTCTCGTTTGCTATACATTGCATTAATAGTATTGTATTAAACATTGCGA\n+AAGTTGATCTTGCCGCTATAATATCGAAATTGACTTCAAATAATTTGCGTACATATGTAT\n+ATCCTACGAAAGATGAACATGCTTTTCAGCTCGTTAGATTGTATTTTCCATTGATGTGGT\n+TCTTTATGCATAAAGGTGGTGAATTACCAGCTTATCCAATTGAACGGGTTGATGGTACTT\n+ATACAGATGACGAGTCGGTGTACACTGTGCGAGGTGAATACAAACGAAGATTGATGTTTG\n+ATATTATAGGTATTGATAAAATTGAGAAATTTGGTGACGCCATTTTCAGAAATAATCACT\n+GCTTTGATATCGGTTTGAACGCTGCTGATGCCATCATTAAGCTGAAGATAACGGATCTAC\n+CGAAGGAAATGAGAAGTGAAACGCTCGAGCATGGTATCATATCAAATCTAGCGAAAAATT\n+TAGAGTCATTCGGCAATGCTATGTCTAAGGAAGCTTCACTTCAAGCGAAACTCAGGATTG\n+AAAATGAACTTGCAGGTGTTAGGAGCGTAACTCAGACAAATGAAGTTGTCGTTGGAAGAG\n+GAAAGATAGCAAAAGTCCCAAAAAGTATTGTATACGCACATCGAACTGAAGCACAACTTG\n+AACAGATATTAATGACAAGAGAGTCGGATAATGAAGAGCGACCAATGATATCAAAGCGAA\n+TGCTTGATCACATCGCTTCACTATCGTTTCATCATGTTGTTAATGTCAAGACAACGGATA\n+AGTTACACTTGTATTACTTCTATCCTAGTGGCGATGCCCTAGTTTACGGTAATCATGCAA\n+AATACACTGAACATTTCGAATTAGCTCCACCTATGTGGTATTTGTCACCTTCATGGCGTT\n+TATATGGCCTATTAGGTACAGCGTCACAGACACGTGGTGACTTACTTCGACAAATTAATT\n+GGCTAAAAGGTAAATATGGAACGTTTAAGCTTGATGACGAGAAGATCCGTTATGGATATG\n+ATGTTATCTGGCGAAAGAACAGACATCTGCTTAATGACTACATGACAATGATCGGAGCAT\n+CACCACATCTTGAAAACTTGCTTAAGAGCATCTTTCGTTTGATGGATAGATGGGGTACTT\n+ATCGTTATGATTACATTCAAACACCGAGGAATATTTTCTTTATCTCAGACAATCCATTAG\n+TCGCTGAACAGAACATTATCTTCGCTGCAGATGGTGACGAGATAACTAGGCCCTTACAGG\n+TAATTGTCGGCTATCTACATATACTTGCGCAT\n+>gi|123840414|sp|Q2Y0E9.1|RDRP_APRVF_RecName:_Full_RNA-directed_RNA_polymerase_VP2--Locus_27_Transcript_2/7_Confidence_0.333_Length_3860_hit1_IdMatch=25.16,AligLength=1220,E-val=1e-82\n+TTATAGTACCTCAGAGTATTTTGAAGCCACCACCTTTCAAC'..b'GTGATGACAATCTACTTA\n+ACATCTCGGAAGGGGTAATTGATATCTTCAACCAACTTACCATCTCGGAAGCCATGCGTT\n+GGATAGGACACGAATACACAGATGAAACGAAAACAGGCGAGGCTGCGCCCTATCGGACAT\n+TGGAAGAAGTCCGTTTCCTTAAAAGAGGGTTCAGAATGGATCACCTCTTGTGTCGGTGGG\n+TAGCTCCTTTGAAGAAGGATGTCATCTACGAAATGCTTAATTGGACGCGCAAAGGGATTA\n+ACCCAGATGATGTGACGATGATGATCATTGATACAGCATTTAGGGAGATCTCTTATCACG\n+GAAGGGAAGCTTTCGAGAAGCTGCGAGGGCAGATACTTGAGCAGCGGGATGTGTTGGTTG\n+AATATCCTCAA\n+>gi|9629651|ref|NP_044945.1|_replicase_polyprotein__Drosophila_C_virus--Locus_63_Transcript_2/2_Confidence_0.333_Length_343_hit1_IdMatch=54.37,AligLength=103,E-val=5e-27\n+TAGGACACGAATACACAGATGAAACGAAAACAGGCGAGGCTGCGCCCTATCGGACATTGG\n+AAGAAGTCCGTTTCCTTAAAAGAGGGTTCAGAATGGATCACCTCTTGTGTCGGTGGGTAG\n+CTCCTTTGAAGAAGGATGTCATCTACGAAATGCTTAATTGGACGCGCAAAGGGATTAACC\n+CAGATGATGTGACGATGATGATCATTGATACAGCATTTAGGGAGATCTCTTATCACGGAA\n+GGGAAGCTTTCGAGAAGCTGCGAGGGCAGATACTTGAGCAGCGGGATGTGTTGGTTGAAT\n+ATCCTCAA\n+>gi|9629651|ref|NP_044945.1|_replicase_polyprotein__Drosophila_C_virus--Locus_65_Transcript_1/2_Confidence_0.667_Length_1344_hit1_IdMatch=46.44,AligLength=450,E-val=8e-138\n+TAGATAAGGTTTGCTCATTTCTTGAGGATGCTTTACCAGGTATGGTCGAGCACGTTACGC\n+TCGTAGCACAAAATACATCCGCGTCAGCCAAGGTGTTATCTGACGAGTTGATCAAATCAA\n+TGCTTTGCATTGTTTTGATTTGCTTGTTGATTGAAACCAAGTTCTATAAGACCGCTTTCG\n+CGGTACTTATAGTGGTTGCTCTACGTGTTTTCGGGTACAGTGAGCAAATAATTGAGACAG\n+CTATGGACATGTATCGCGTAATTAGGGCTCCAAAGGCTCAAGGTAATATGGAAGATGTCG\n+TTTTCCATCCGTGGTTGAACACGTGTGGAAAGTTGATTTTCCTACTTATCGCTGTCCTGT\n+GTCTCAAGAAATTACCAGGAAAGAACGACGTAGACACTTTCATGCGCAGGCTCGACAGCT\n+TACCCAAAGCTGTTAAGGGTGCGACACAACTACATGAATGGGTGTCAAAATACTTCGATC\n+TCTCTTTGGATCACGTCAAGGCGATGATTGTTGGTAAATCTTGTGCCGAAATGAAGAAGG\n+CTGAATCATCAAGCGCCAAAGTTTTGGCTTGGGCCGCTAGAGTTCAAGATTTCGTCAGAT\n+TGGAACAACGAAGTAAAATCGATAGTGATATCGCTGTCGCCAACGAGGCTGAAGCCTTGT\n+ATCACACTGGATTGCAATTTGCAGGAGACACTCTGTTACCTCCAGAATTGCACAAGGTCG\n+TGAACAGTGCGCTAAGACCAGCCCGCGATATATATGAGTACGTCACCCGCTCCCCAATAA\n+AAGGAGGGAGTCGTAAGATGAGACCCTTGATGATTTGGCTAGCTGGCCAGTCAGGAATTG\n+GGAAAACCTCTATGGTGGATCCTCTATGTATCGATTTGCTTCGAGCAATGGGTTATGTGG\n+GACCTGAACATCTCCACTCGTTGGTGTATGGCCGCCAAGTTGAGACGGAGTACTGGGATG\n+GTTACAAAGCCCACAAGATAGTGATCTATGATGATGCTTTTCAGCTGAAAGATGATGCTG\n+TGAACAGGAATTTGGAGGTATTTGAGGTTATACGTTCTTGCAACACGTATCCTCAACACC\n+TTCATATGGCTTGTCTCTCGGATAAAAACACTTTTTCAGTAGCGGAAGTGTACATCTACA\n+CTACCAACGAAATGAATGTCAAACTTGAGTCGCTGACTCATGAACAAGCATTCTACAACC\n+GCATGAGTGAAAACGCGTTCACTGTGCGTCCAAAAGAGGCTTATCGTCTAGTCGAAGAAG\n+GATCAACCGGCAATAAGCAGTATCGTTTGGACAAAACGAAAACCAAAGGAGCTATCGATC\n+TCGATGTGTACGAATTCGTGCGC\n+>gi|9629651|ref|NP_044945.1|_replicase_polyprotein__Drosophila_C_virus--Locus_65_Transcript_2/2_Confidence_0.333_Length_1324_hit1_IdMatch=46.74,AligLength=445,E-val=1e-135\n+CTTGAGGATACTTTACCAGGTATGGTCGAGCACGTTACGCTCGTAGCACAAAATACATCC\n+GCGTCAGCCAAGGTGTTATCTGACGAGTTGATCAAATCAATGCTTTGCATTGTTTTGATT\n+TGCTTGTTGATTGAAACCAAGTTCTATAAGACCGCTTTCGCGGTACTTATAGTGGTTGCT\n+CTACGTGTTTTCGGGTACAGTGAGCAAATAATTGAGACAGCTATGGACATGTATCGCGTA\n+ATTAGGGCTCCAAAGGCTCAAGGTAATATGGAAGATGTCGTTTTCCATCCGTGGTTGAAC\n+ACGTGTGGAAAGTTGATTTTCCTACTTATCGCTGTCCTGTGTCTCAAGAAATTACCAGGA\n+AAGAACGACGTAGACACTTTCATGCGCAGGCTCGACAGCTTACCCAAAGCTGTTAAGGGT\n+GCGACACAACTACATGAATGGGTGTCAAAATACTTCGATCTCTCTTTGGATCACGTCAAG\n+GCGATGATTGTTGGTAAATCTTGTGCCGAAATGAAGAAGGCTGAATCATCAAGCGCCAAA\n+GTTTTGGCTTGGGCCGCTAGAGTTCAAGATTTCGTCAGATTGGAACAACGAAGTAAAATC\n+GATAGTGATATCGCTGTCGCCAACGAGGCTGAAGCCTTGTATCACACTGGATTGCAATTT\n+GCAGGAGACACTCTGTTACCTCCAGAATTGCACAAGGTCGTGAACAGTGCGCTAAGACCA\n+GCCCGCGATATATATGAGTACGTCACCCGCTCCCCAATAAAAGGAGGGAGTCGTAAGATG\n+AGACCCTTGATGATTTGGCTAGCTGGCCAGTCAGGAATTGGGAAAACCTCTATGGTGGAT\n+CCTCTATGTATCGATTTGCTTCGAGCAATGGGTTATGTGGGACCTGAACATCTCCACTCG\n+TTGGTGTATGGCCGCCAAGTTGAGACGGAGTACTGGGATGGTTACAAAGCCCACAAGATA\n+GTGATCTATGATGATGCTTTTCAGCTGAAAGATGATGCTGTGAACAGGAATTTGGAGGTA\n+TTTGAGGTTATACGTTCTTGCAACACGTATCCTCAACACCTTCATATGGCTTGTCTCTCG\n+GATAAAAACACTTTTTCAGTAGCGGAAGTGTACATCTACACTACCAACGAAATGAATGTC\n+AAACTTGAGTCGCTGACTCATGAACAAGCATTCTACAACCGCATGAGTGAAAACGCGTTC\n+ACTGTGCGTCCAAAAGAGGCTTATCGTCTAGTCGAAGAAGGATCAACCGGCAATAAGCAG\n+TATCGTTTGGACAAAACGAAAACCAAAGGAGCTATCGATCTCGATGTGTACGAATTCGTG\n+CGC\n'