Mercurial > repos > artbio > cherry_pick_fasta
comparison cherry_pick_fasta.xml @ 3:c282a8a47dd9 draft
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit d637de6c1090314bd34bdffc2fdf979cb55b870b"
author | artbio |
---|---|
date | Fri, 21 May 2021 09:34:14 +0000 |
parents | 321cad0eb507 |
children | ba6c4aeb22ea |
comparison
equal
deleted
inserted
replaced
2:321cad0eb507 | 3:c282a8a47dd9 |
---|---|
1 <tool id="cherry_pick_fasta" name="Pick Fasta sequences" version="2.1.0"> | 1 <tool id="cherry_pick_fasta" name="Pick Fasta sequences" version="3.0.0"> |
2 <description>with header satisfying a string query</description> | 2 <description>with header satisfying a string query</description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="package" version="3.7.6">python</requirement> | 4 <requirement type="package" version="1.70">biopython</requirement> |
5 </requirements> | 5 </requirements> |
6 <command interpreter="python">cherry_pick_fasta.py | 6 <command interpreter="python">cherry_pick_fasta.py |
7 --input $input | 7 --input $input |
8 --searchfor '$search.searchfor' | 8 --searchfor '$search.searchfor' |
9 #if $search.options_selector == 'single': | 9 #if $search.options_selector == 'single': |
10 --query-string '$search.query' | 10 #if $search.match == 'exact': |
11 --query-string '$search.query' --mode exact | |
12 #else: | |
13 --query-string '$search.query' --mode includes | |
14 #end if | |
11 #else: | 15 #else: |
12 --query-file '$search.query' | 16 #if $search.match == 'exact': |
17 --query-file '$search.query' --mode exact | |
18 #else: | |
19 --query-file '$search.query' --mode includes | |
20 #end if | |
13 #end if | 21 #end if |
14 --output $output | 22 --output $output |
15 </command> | 23 </command> |
16 | 24 |
17 <inputs> | 25 <inputs> |
18 <param name="input" type="data" format="fasta" label="Source file" help="Fasta file to parse" /> | 26 <param name="input" type="data" format="fasta" label="Source file" help="Fasta file to parse" /> |
19 | 27 |
20 <conditional name="search"> | 28 <conditional name="search"> |
21 <param name="options_selector" type="select" display="radio" label="by single term or file of terms"> | 29 <param name="options_selector" type="select" display="radio" label="for a"> |
22 <option value="single" selected="True">single term</option> | 30 <option value="single" selected="True">single string</option> |
23 <option value="textdataset">terms in a text dataset</option> | 31 <option value="textdataset">list of strings</option> |
24 </param> | 32 </param> |
25 <when value="single"> | 33 <when value="single"> |
34 <param name="match" type="select" label="retrieve sequences whose headers..."> | |
35 <option value="include" selected="true">partially</option> | |
36 <option value="exact">exactly</option> | |
37 </param> | |
38 <param name="searchfor" type="select" label=" "> | |
39 <option value="with" selected="true">contain this string</option> | |
40 <option value="without">do not contain this string</option> | |
41 </param> | |
26 <param name="query" type="text" size="30" value="" label="Search string" help="exemple: gi|40557596"> | 42 <param name="query" type="text" size="30" value="" label="Search string" help="exemple: gi|40557596"> |
27 <sanitizer> | 43 <sanitizer> |
28 <valid initial="string.printable"> | 44 <valid initial="string.printable"> |
29 <remove value="""/> | 45 <remove value="""/> |
30 <remove value="\"/> | 46 <remove value="\"/> |
33 <add source=""" target="\""/> | 49 <add source=""" target="\""/> |
34 <add source="\" target="\\"/> | 50 <add source="\" target="\\"/> |
35 </mapping> | 51 </mapping> |
36 </sanitizer> | 52 </sanitizer> |
37 </param> | 53 </param> |
38 <param name="searchfor" type="select" label="retrieve sequences whose headers contain or do not contain the search string"> | |
39 <option value="with" selected="true">contain</option> | |
40 <option value="without">do not contain</option> | |
41 </param> | |
42 </when> | 54 </when> |
43 <when value="textdataset"> | 55 <when value="textdataset"> |
44 <param name="query" type="data" format="txt" label="term dataset" help="a list of term to search for, one term per line" /> | 56 <param name="match" type="select" label="retrieve sequences whose headers..."> |
45 <param name="searchfor" type="select" label="retrieve sequences whose headers contain or do not contain the search list"> | 57 <option value="includes" selected="true">partially</option> |
46 <option value="with" selected="true">contain</option> | 58 <option value="exact">exactly</option> |
47 <option value="without">do not contain</option> | |
48 </param> | 59 </param> |
60 <param name="searchfor" type="select" label=" "> | |
61 <option value="with" selected="true">contain one of these list strings</option> | |
62 <option value="without">do not contain one of these list strings</option> | |
63 </param> | |
64 <param name="query" type="data" format="txt" label="list of strings dataset" help="a list of strings to search for, one string per line" /> | |
49 </when> | 65 </when> |
50 </conditional> | 66 </conditional> |
51 </inputs> | 67 </inputs> |
52 <outputs> | 68 <outputs> |
53 <data name="output" format="fasta" label="Fasta sequences ${search.searchfor.value} ${search.options_selector} term(s) in header" /> | 69 <data name="output" format="fasta" label="Fasta sequences ${search.searchfor.value} ${search.options_selector} term(s) in header" /> |
54 </outputs> | 70 </outputs> |
55 <tests> | 71 <tests> |
72 <!-- exact matches --> | |
56 <test> | 73 <test> |
57 <param ftype="fasta" name="input" value="input.fa" /> | 74 <param ftype="fasta" name="input" value="input.fa" /> |
58 <!-- <param name="options_selector" value="textdataset" /> --> | 75 <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" /> |
76 <param name="searchfor" value="without" /> | |
77 <param name="match" value="exact" /> | |
78 <output name="output" ftype="fasta" file="output_exactly_not.fa" /> | |
79 </test> | |
80 <test> | |
81 <param ftype="fasta" name="input" value="input.fa" /> | |
82 <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" /> | |
83 <param name="searchfor" value="with" /> | |
84 <param name="match" value="exact" /> | |
85 <output name="output" ftype="fasta" file="output_exact.fa" /> | |
86 </test> | |
87 | |
88 | |
89 <test> | |
90 <param ftype="fasta" name="input" value="input.fa" /> | |
91 <param name="options_selector" value="textdataset" /> | |
92 <param name="query" ftype="txt" value="alt_termlist.txt" /> | |
93 <param name="searchfor" value="without" /> | |
94 <param name="match" value="exact" /> | |
95 <output name="output" ftype="fasta" file="output_alt_termlist_without.fa" /> | |
96 </test> | |
97 <test> | |
98 <param ftype="fasta" name="input" value="input.fa" /> | |
99 <param name="options_selector" value="textdataset" /> | |
100 <param name="query" ftype="txt" value="alt_termlist.txt" /> | |
101 <param name="searchfor" value="with" /> | |
102 <param name="match" value="exact" /> | |
103 <output name="output" ftype="fasta" file="output_alt_termlist.fa" /> | |
104 </test> | |
105 | |
106 | |
107 <!-- partial matches --> | |
108 <test> | |
109 <param ftype="fasta" name="input" value="input.fa" /> | |
59 <param name="query" value="gi|81971654" /> | 110 <param name="query" value="gi|81971654" /> |
60 <param name="searchfor" value="with" /> | 111 <param name="searchfor" value="with" /> |
61 <output name="output" ftype="fasta" file="output.fa" /> | 112 <output name="output" ftype="fasta" file="output.fa" /> |
62 </test> | 113 </test> |
63 <test> | 114 <test> |
64 <param ftype="fasta" name="input" value="input.fa" /> | 115 <param ftype="fasta" name="input" value="input.fa" /> |
65 <!-- <param name="options_selector" value="textdataset" /> --> | |
66 <param name="query" value="RNA" /> | 116 <param name="query" value="RNA" /> |
67 <param name="searchfor" value="without" /> | 117 <param name="searchfor" value="without" /> |
68 <output name="output" ftype="fasta" file="output_without.fa" /> | 118 <output name="output" ftype="fasta" file="output_without.fa" /> |
69 </test> | 119 </test> |
70 <test> | 120 <test> |
80 <param name="query" ftype="txt" value="termlist.txt" /> | 130 <param name="query" ftype="txt" value="termlist.txt" /> |
81 <param name="searchfor" value="without" /> | 131 <param name="searchfor" value="without" /> |
82 <output name="output" ftype="fasta" file="output_termlist_without.fa" /> | 132 <output name="output" ftype="fasta" file="output_termlist_without.fa" /> |
83 </test> | 133 </test> |
84 </tests> | 134 </tests> |
85 | |
86 <help> | 135 <help> |
87 **What it does** | 136 **What it does** |
88 | 137 |
89 This tool retrieves nucleotide/peptide sequences from a fasta file whose headers match | 138 This tool retrieves nucleotide/peptide sequences from a fasta file whose headers match |
90 or do not match a given string. | 139 or do not match a given string, or a list of strings. |
91 | |
92 It is Copyright © 2019 `CNRS and Sorbonne-Université`_ and is released under the `MIT license`_. | |
93 | |
94 .. _CNRS and Sorbonne-Université: http://www.sorbonne-universite.fr/en | |
95 .. _MIT license: http://opensource.org/licenses/MIT | |
96 | 140 |
97 </help> | 141 </help> |
98 </tool> | 142 </tool> |