diff fetch_fasta_from_NCBI.xml @ 1:7e41bbb94159 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/fetch_fasta_from_ncbi commit 6008aafac37eec1916d6b72c05d9cfcb002b8095
author artbio
date Sun, 15 Oct 2017 13:56:26 -0400
parents
children 50f5ef3313bb
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fetch_fasta_from_NCBI.xml	Sun Oct 15 13:56:26 2017 -0400
@@ -0,0 +1,95 @@
+<tool id="retrieve_fasta_from_NCBI" name="Retrieve FASTA from NCBI" version="2.1.0">
+  <description></description>
+  <command><![CDATA[
+      python '$__tool_directory__'/fetch_fasta_from_NCBI.py
+      -i "$queryString"
+      -d $dbname
+      -o '$outfilename'
+      -l '$logfile'
+      #if $date_condition.date_filter == "YES":
+          --datetype $date_condition.datetype
+          --mindate $date_condition.mindate
+          --maxdate $date_condition.maxdate
+      #end if
+  ]]></command>
+
+  <inputs>
+    <param name="queryString" type="text" size="5x80" area="True" value="txid10239[orgn] NOT txid131567[orgn] AND complete[all] NOT partial[title] NOT phage[title]" label="Query to NCBI in entrez format" help="exemple:'Drosophila melanogaster[Organism] AND Gcn5[Title]">
+      <sanitizer>
+        <valid initial="string.printable">
+          <remove value="&quot;"/>
+          <remove value="\"/>
+        </valid>
+        <mapping initial="none">
+          <add source="&quot;" target="\&quot;"/>
+          <add source="\" target="\\"/>
+        </mapping>
+      </sanitizer>
+    </param>
+    <param name="dbname" type="select" label="NCBI database">
+      <option value="nuccore">Nucleotide</option>
+      <option value="protein">Protein</option>
+    </param>
+    <conditional name="date_condition">
+        <param name="date_filter" type="boolean" label="Filter the sequences by date?" truevalue="YES" falsevalue="NO" checked="false"/>
+        <when value="YES">
+            <param name="datetype" type="select">
+                <option value="pdat">Publication date</option>
+                <option value="mdat">Modification date</option>
+            </param>
+            <param name="mindate" type="text" help="Date must follow one of the following formats: YYYY/MM/DD, YYYY/MM or YYYY"/>
+            <param name="maxdate" type="text" help="Date must follow one of the following formats: YYYY/MM/DD, YYYY/MM or YYYY"/>
+        </when>
+        <when value="NO"/>
+    </conditional>
+  </inputs>
+  <outputs>
+    <data name="outfilename" format="fasta" label="${tool.name} (${dbname.value_label}) with queryString '${queryString.value}'" />
+    <data format="txt" name="logfile" label="${tool.name}: log"/>
+  </outputs>
+  <tests>
+    <test>
+        <param name="queryString" value="9629650[gi]" />
+        <param name="dbname" value="nuccore" />
+        <output name="outfilename" ftype="fasta" file="output.fa" />
+        <!--  <output name="logfile" ftype="txt" file="log.txt" />  log.txt changes with timestamp. removed to pass the  test -->
+    </test>
+    <test>
+        <param name="queryString" value="CU929326[Accession]" />
+        <param name="dbname" value="nuccore" />
+        <param name="date_filter" value="YES"/>
+        <param name="datetype" value="pdat"/>
+        <param name="mindate" value="2008/09"/>
+        <param name="maxdate" value="2008/09"/>
+        <output name="outfilename" ftype="fasta" file="zebra_output.fa" />
+    </test>
+  </tests>
+  <help>
+**What it does**
+
+This tool retrieves nucleotide/peptide sequences from the corresponding NCBI database for a given entrez query.
+
+The tool is preset with "txid10239[orgn] NOT txid131567[orgn] AND complete NOT partial[title] NOT phage[title]" for metaVisitor use purpose
+
+See `Entrez help`_ for explanation of query formats
+
+Be sure to use the appropriate NCBI query syntax. Always use [] to specify the search fields.
+
+Note that the tool may fail in case of interrupted connexion with the NCBI database (see the log dataset)
+
+**Acknowledgments**
+
+This Galaxy tool has been adapted from the galaxy tool `get_fasta_from_taxon`_.
+
+It is Copyright © 2014-2015 `CNRS and University Pierre et Marie Curie`_ and is released under the `MIT license`_.
+
+.. _Entrez help: https://www.ncbi.nlm.nih.gov/books/NBK3837/#EntrezHelp.Entrez_Searching_Options
+.. _get_fasta_from_taxon: https://toolshed.g2.bx.psu.edu/view/crs4/get_fasta_from_taxon
+.. _CNRS and University Pierre et Marie Curie: http://www.ibps.upmc.fr/en
+.. _MIT license: http://opensource.org/licenses/MIT
+
+  </help>
+  <citations>
+      <citation type="doi">10.1186/1471-2105-14-73</citation>
+  </citations>
+</tool>