Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding a new test, small updates #30

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion tools/ncbi_egapx/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</requirements>
</xml>
<token name="@TOOL_VERSION@">0.2-alpha</token>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>
<token name="@PROFILE@">22.05</token>
<xml name="edam_ontology">
<edam_operations>
Expand Down
55 changes: 33 additions & 22 deletions tools/ncbi_egapx/ncbi_egapx.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,44 @@
#if str($cond_input_style.input_style) == "history":
#set yamlconfig = $yamlin
#else:
#set yamlconfig = 'egapx.yaml'
rm -rf 'egapx.yaml' &&
touch 'egapx.yaml' &&
echo '# yaml generated by ncbi_egapx.xml' >> egapx.yaml &&
echo 'taxid: $taxid' >> egapx.yaml &&
#set yamlconfig = "egapx.yaml"
rm -rf '$yamlconfig' &&
touch '$yamlconfig' &&
echo '# yaml generated by ncbi_egapx.xml' >> '$yamlconfig' &&
echo 'taxid: $taxid' >> '$yamlconfig' &&
#if str($reference_genome.genome_type_select) == "indexed":
echo 'genome: $reference_genome.genome.fields.path' >> 'egapx.yaml' &&
echo 'genome: $reference_genome.genome.fields.path' >> '$yamlconfig' &&
#elif str($reference_genome.genome_type_select) == "history"
echo 'genome: $reference_genome.genome' >> 'egapx.yaml' &&
echo 'genome: $reference_genome.genome' >> '$yamlconfig' &&
#else:
echo 'genome: $reference_genome.uri' >> 'egapx.yaml' &&
echo 'genome: $reference_genome.uri' >> '$yamlconfig' &&
#end if
echo 'reads:' >> 'egapx.yaml' &&
echo 'reads:' >> '$yamlconfig' &&
#if str($condrnaseq.rna_type_select) == "history":
#for $r in $rnaseq:
echo ' - $r' >> 'egapx.yaml' &&
echo ' - $r' >> '$yamlconfig' &&
#end for
#else:
#set rs = $rnaseq.split()
#set rsplit = [x.strip() for x in $rs]
#for $r in $rsplit:
echo ' - $r' >> 'egapx.yaml' &&
echo ' - $r' >> '$yamlconfig' &&
#end for
#end if
#if len($xtra.strip()) > 0:
#set lxtra = $xtra.split('\n')
#set lxtra = $xtra.split("\n")
#for row in $lxtra:
echo '$row' >> 'egapx.yaml' &&
echo '$row' >> '$yamlconfig' &&
#end for
#end if
echo '' >> 'egapx.yaml' &&
echo '' >> '$yamlconfig' &&
echo "Calculated contents of egapx yaml" &&
cat 'egapx.yaml' &&
cat '$yamlconfig' &&
#end if
source /galaxy/env.bash &&
echo \${PATH} &&
ln -s /galaxy/egapx/egapx_config &&
python3 /galaxy/egapx/ui/egapx.py '$yamlconfig' -e galaxy -o 'egapx_out'
python3 /galaxy/egapx/ui/egapx.py '$yamlconfig' -e galaxy -o 'egapx_out'
]]></command>
<inputs>
<conditional name="cond_input_style">
Expand All @@ -61,25 +61,25 @@
<when value="fillform">
<param name="taxid" type="text" optional="false" label="NCBI Taxon ID" help="Used to identify the HMM model files needed"/>
<conditional name="reference_genome">
<param name="genome_type_select" type="select" label="Reference genome source for mapping supplied RNA-seq reads"
<param name="genome_type_select" type="select" label="Reference genome source for mapping supplied RNA-seq reads"
help="Select a built in, history or remote URI for the reference genome fasta">
<option value="indexed">Use a Galaxy server built-in genome</option>
<option value="history" selected="True">Use a genome fasta file from the current history</option>
<option value="uri">Provide a remote web link URI ("https://...") pointing at the required genome reference fasta file</option>
</param>
<when value="indexed">
<param name="genome" type="select" optional="false" label="Select a built in reference genome or custom genome"
<param name="genome" type="select" optional="true" label="Select a built in reference genome or custom genome"
help="If not listed, add a custom genome or use a reference genome from the history">
<options from_data_table="all_fasta">
<validator message="No genomes are available " type="no_options"/>
</options>
</param>
</when>
<when value="history">
<param name="genome" type="data" format="fasta" optional="false" label="Select the reference genome fasta from the current history"/>
<param name="genome" type="data" optional="true" format="fasta" label="Select the reference genome fasta from the current history"/>
</when>
<when value="uri">
<param name="uri" type="text" label="URI pointing to the reference genome fasta file" help=""/>
<param name="uri" type="text" optional="false" label="URI pointing to the reference genome fasta file" help=""/>
</when>
</conditional>
<conditional name="condrnaseq">
Expand All @@ -88,7 +88,7 @@
<option value="history">Select one or more RNA-seq fastq datasets from the current history</option>
</param>
<when value="history">
<param name="rnaseq" type="data" format="fastqsanger, fastqsanger.gz" optional="false" multiple="true"
<param name="rnaseq" type="data" format="fastqsanger, fastqsanger.gz" optional="false" multiple="true"
label="Select multiple RNA-seq fastqsanger inputs from the current history" help="All selected rna-seq fastqsanger will be added to the yaml for egapx configuration"/>
</when>
<when value="list">
Expand All @@ -98,7 +98,7 @@
</param>
</when>
</conditional>
<param name="xtra" type="text" area="true" optional="true" label="Additional yaml to append to the egapx.yaml configuration"
<param name="xtra" type="text" area="true" label="Additional yaml to append to the egapx.yaml configuration"
help="Not normally needed but useful for testing additional configuration elements">
<sanitizer invalid_char="">
<valid initial="string.printable">
Expand All @@ -115,9 +115,20 @@
</outputs>
<tests>
<test expect_test_failure="true">
<param name="input_style" value="history"/>
<param name="yamlin" value="input.yaml"/>
<output_collection name="egapx_out" type="list" count="8"/>
</test>
<test expect_test_failure="true">
<param name="input_style" value="fillform"/>
<param name="taxid" value="6954"/>
<param name="genome_type_select" value="uri"/>
<param name="uri" value="https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/020/809/275/GCF_020809275.1_ASM2080927v1/GCF_020809275.1_ASM2080927v1_genomic.fna.gz"/>
<param name="rna_type_select" value="list"/>
<param name="rnaseq" value="https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/EGAP/sample_data/Dermatophagoides_farinae_small/SRR8506572.1 https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/EGAP/sample_data/Dermatophagoides_farinae_small/SRR8506572.2 https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/EGAP/sample_data/Dermatophagoides_farinae_small/SRR9005248.1 https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/EGAP/sample_data/Dermatophagoides_farinae_small/SRR9005248.2"/>
<param name="xtra" value="proteins: []&#10;hmm: https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/EGAP/gnomon/hmm_parameters/6956.params&#10;tasks:&#10; star_wnode:&#10; star_wnode: -cpus-per-worker 4"/>
<output_collection name="egapx_out" type="list" count="8"/>
</test>
</tests>
<help><![CDATA[
Galaxy tool wrapping the Eukaryotic Genome Annotation Pipeline (EGAPx)
Expand Down