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

Updated interface #31

Merged
merged 2 commits 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
53 changes: 32 additions & 21 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,14 +61,14 @@
<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"/>
Expand All @@ -79,7 +79,7 @@
<param name="genome" type="data" format="fasta" optional="false" 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
18 changes: 18 additions & 0 deletions tools/ncbi_egapx/tool-data/all_fasta.loc.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#This file lists the locations and dbkeys of all the fasta files
#under the "genome" directory (a directory that contains a directory
#for each build). The script extract_fasta.py will generate the file
#all_fasta.loc. This file has the format (white space characters are
#TAB characters):
#
#<unique_build_id> <dbkey> <display_name> <file_path>
#
#So, all_fasta.loc could look something like this:
#
#apiMel3 apiMel3 Honeybee (Apis mellifera): apiMel3 /path/to/genome/apiMel3/apiMel3.fa
#hg19canon hg19 Human (Homo sapiens): hg19 Canonical /path/to/genome/hg19/hg19canon.fa
#hg19full hg19 Human (Homo sapiens): hg19 Full /path/to/genome/hg19/hg19full.fa
#
#Your all_fasta.loc file should contain an entry for each individual
#fasta file. So there will be multiple fasta files for each build,
#such as with hg19 above.
#
7 changes: 7 additions & 0 deletions tools/ncbi_egapx/tool_data_table_conf.xml.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<tables>
<!-- Locations of all fasta files under genome directory -->
<table name="all_fasta" comment_char="#">
<columns>value, dbkey, name, path</columns>
<file path="tool-data/all_fasta.loc" />
</table>
</tables>