Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 15 additions & 27 deletions tools/ncbi_datasets/datasets_gene.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,30 +95,16 @@ dataformat
<when value="symbol">
<expand macro="text_or_file" what="Gene Symbol" what_extended="NCBI Gene Symbol" help=""/>
<expand macro="ortholog"/>
<param argument="--taxon" type="text" value="human" label="Species for gene symbol" help="NCBI taxid, common or scientific name">
<sanitizer invalid_char="">
<valid initial="string.letters">
<add value=" "/>
<add value="-"/>
</valid>
</sanitizer>
</param>
<expand macro="taxon_parameter" argument="--taxon" value="human" label="Species for gene symbol" help="NCBI Taxon ID, common or scientific name"/>
</when>
<when value="accession">
<expand macro="text_or_file" what="Gene Accession" what_extended="NCBI Gene Accession" help=""/>
<expand macro="ortholog"/>
<param argument="--taxon-filter" type="text" value="" label="Limit gene sequences and annotation report file to specified taxon" help="any rank, only available for WP accessions">
<sanitizer invalid_char="">
<valid initial="string.letters">
<add value=" "/>
<add value="-"/>
</valid>
</sanitizer>
</param>
<expand macro="taxon_parameter" argument="--taxon-filter" value="" label="Limit gene sequences and annotation report file to specified taxon" help="any rank, only available for WP accessions"/>
<param argument="--include-flanks-bp" type="integer" optional="true" min="0" value="" label="Length of flanking nucleotides" help="WP accessions only"/>
</when>
<when value="taxon">
<expand macro="taxon_positional"/>
<expand macro="taxon_parameter" argument="taxon_positional" value="" label="Enter taxon" help="e.g. human, house mouse, bos taurus, etc. or use Taxonomy ID from NCBI for greater accuracy, use species-level only not genera or larger taxa"/>
</when>
</conditional>
</section>
Expand All @@ -131,10 +117,12 @@ dataformat
</param>
<when value=""/>
<when value="text">
<param argument="--fasta-filter" type="text" label="RefSeq nucleotide and protein accessions" help="Comma separated">
<param argument="--fasta-filter" type="text" label="RefSeq nucleotide and protein accessions" help="Comma separated, Charcters other than A-Z, a-z, 0-9, _, and . will be stripped from the input.">
<sanitizer invalid_char="">
<valid initial="string.letters,string.digits">
<add value=","/>
<add value="_"/>
<add value="."/>
</valid>
</sanitizer>
</param>
Expand Down Expand Up @@ -510,7 +498,7 @@ dataformat
<param name="text_or_file" value="text"/>
<param name="accession" value="brca1,tp53"/>
</conditional>
<param name="taxon" value="human"/>
<param name="taxon" value="9606"/>
</conditional>
<section name="file_choices">
<conditional name="kingdom_cond">
Expand Down Expand Up @@ -576,15 +564,15 @@ dataformat
</assert_command>
</test>

<!-- 10: datasets download gene taxon human -->
<!-- <test expect_num_outputs="1">
<!-- 13: datasets download gene taxon human -->
<test expect_num_outputs="1">
<conditional name="query|subcommand">
<param name="download_by" value="taxon"/>
<param name="taxon_positional" value="human"/>
</conditional>
<section name="file_choices">
<conditional name="kingdom_cond">
<param name="include" value=""/>
<param name="include" value_json="null"/>
</conditional>
</section>
<output name="gene_data_report">
Expand All @@ -594,12 +582,12 @@ dataformat
<has_n_columns n="8"/>
</assert_contents>
</output>
</test> -->
<!-- 11: datasets download gene taxon human + \-\-fasta-filter -->
<!-- <test expect_num_outputs="2">
</test>
<!-- 14: datasets download gene taxon human (given as taxID) + \-\-fasta-filter -->
<test expect_num_outputs="2">
<conditional name="query|subcommand">
<param name="download_by" value="taxon"/>
<param name="taxon_positional" value="human"/>
<param name="taxon_positional" value="9606"/>
</conditional>
<section name="file_choices">
<conditional name="kingdom_cond">
Expand All @@ -624,7 +612,7 @@ dataformat
<has_text text=">" n="1" />
</assert_contents>
</output>
</test> -->
</test>
</tests>
<help><![CDATA[
.. class:: infomark
Expand Down
2 changes: 1 addition & 1 deletion tools/ncbi_datasets/datasets_genome.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ $filters.exclude_atypical
<expand macro="text_or_file"/>
</when>
<when value="taxon">
<expand macro="taxon_positional"/>
<expand macro="taxon_parameter" argument="taxon_positional" value="" label="Enter taxon" help="e.g. human, house mouse, bos taurus, etc. or use Taxonomy ID from NCBI for greater accuracy, use species-level only not genera or larger taxa"/>
<param argument="--tax-exact-match" type="boolean" truevalue="--tax-exact-match" falsevalue="" label="Exclude sub-species when a species-level taxon is specified"/>
</when>
</conditional>
Expand Down
15 changes: 11 additions & 4 deletions tools/ncbi_datasets/macros.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<macros>
<token name="@TOOL_VERSION@">18.23.0</token>
Comment thread
SaimMomin12 marked this conversation as resolved.
Outdated
<token name="@VERSION_SUFFIX@">0</token>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@PROFILE@">25.0</token>
<token name="@LICENSE@">MIT</token>
<token name="@PROFILE_AND_LICENSE@">profile="@PROFILE@" license="@LICENSE@"</token>
Expand Down Expand Up @@ -45,7 +45,7 @@
<conditional name="text_or_file" label="How do you want to specify the @WHAT@(s) to download">
<param name="text_or_file" type="select" label="Enter @WHAT@ or read from file ?">
<option value="text">Enter @WHAT@s</option>
<option value="file">Read a list of @WHAT_EXTENDED@s from a dataset</option>
<option value="file">Read a list of @WHAT_EXTENDED@s from a dataset, one per line</option>
</param>
<when value="text">
<!-- command section also allows spaces as separator for backward compatibility
Expand All @@ -71,8 +71,15 @@
</param>
</xml>

<xml name="taxon_positional">
<param name="taxon_positional" type="text" label="Enter taxon" help="e.g. human, house mouse, bos taurus, etc. or use Taxonomy ID from NCBI for greater accuracy, use species-level only not genera or larger taxa"/>
<xml name="taxon_parameter" tokens="argument,value,label,help">
<param argument="@ARGUMENT@" type="text" value="@VALUE@" label="@LABEL@" help="@HELP@. Charcters other than A-Z, a-z, 0-9, dash and space will be stripped from the input.">
<sanitizer invalid_char="">
<valid initial="string.letters,string.digits">
<add value=" "/>
<add value="-"/>
</valid>
</sanitizer>
</param>
</xml>

<xml name="ortholog">
Expand Down
Loading