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

EGA test fixes #3648

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
20 changes: 11 additions & 9 deletions tools/pyega3/pyega3.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="pyega3" name="EGA Download Client" version="@VERSION@+galaxy0" profile="19.09" >
<tool id="pyega3" name="EGA Download Client" version="@VERSION@+galaxy1" profile="20.01" >
<macros>
<token name="@VERSION@">3.4.0</token>
</macros>
Expand Down Expand Up @@ -30,7 +30,9 @@
--end $action.range.end
#end if
#end if
--saveto '$downloaded_file'
## do not download to `$downloaded_file`
## since a .md5 file will be stored next to it
--saveto downloaded_file
#end if
]]></command>
<configfiles>
Expand Down Expand Up @@ -62,7 +64,7 @@
<when value="list_datasets"/>
<when value="download_file">
<param name="file_id" type="text" optional="false" label="EGA File Accession Identifier" help="Identifier starting with 'EGAF'. For example: EGAF00001753735">
<validator type="regex" message="EGA Accession ID must be a string of numbers prefixed by 'EGAD' (datasets) or 'EGAF' (files)">EGAF[0-9]+</validator>
<validator type="regex" message="EGA Accession ID must be a string of numbers prefixed or 'EGAF' (files)">EGAF[0-9]+</validator>
</param>
<section name="range" title="Request a specific Genomic range?" expanded="false">
<param argument="--reference-name" type="text" optional="true" label="Reference Sequence Name" help="For example 'chr1', '1', or 'chrX'. If unspecified, all data is returned." />
Expand All @@ -79,7 +81,7 @@
<data name="dataset_file_list" format="txt" from_work_dir="pyega3_output.log" label="${tool.name}: dataset file list">
<filter> action['action_type'] == 'list_dataset_files' </filter>
</data>
<data name="downloaded_file" auto_format="true" label="${tool.name}: ${action.file_id} ${action.range.reference_name} ${action.range.start} ${action.range.end}">
<data name="downloaded_file" auto_format="true" from_work_dir="downloaded_file" label="${tool.name}: ${action.file_id} ${action.range.reference_name} ${action.range.start} ${action.range.end}">
<filter> action['action_type'] == 'download_file' </filter>
</data>
</outputs>
Expand All @@ -106,15 +108,15 @@
</test>
<test expect_num_outputs="1"> <!-- download a single file -->
<param name="action_type" value="download_file"/>
<param name="file_id" value="EGAF00001775036"/>
<output name="downloaded_file" md5="3b89b96387db5199fef6ba613f70e27c"/>
<param name="file_id" value="EGAF00001770106"/>
<output name="downloaded_file" md5="ce073afcbc07afa343f2d4e4d07efeda"/>
</test>
<test expect_num_outputs="1"> <!-- download a single file, with genomic range specified -->
<param name="action_type" value="download_file"/>
<param name="file_id" value="EGAF00001753756"/>
<param name="reference_name" value="1"/>
<param name="file_id" value="EGAF00001770106"/>
<param name="reference_name" value="chrM"/>
<param name="start" value="100"/>
<param name="end" value="10000"/>
<param name="end" value="1000"/>
<output name="downloaded_file" ftype="bam" md5="e576a38748feec45aa45191f6e902ce2"/>
</test>
</tests>
Expand Down