Skip to content

Commit

Permalink
Merge pull request galaxyproject#17944 from nsoranzo/release_23.0_fix…
Browse files Browse the repository at this point in the history
…_17938

[23.] Fix output datatype when uncompressing a dataset with incorrect datatype
  • Loading branch information
mvdbeek authored Apr 9, 2024
2 parents 77fc849 + 0611465 commit 3abb181
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/galaxy/datatypes/converters/gz_to_uncompressed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gzip -dcf '$input1' > '$output1'
<configfiles>
<configfile name="ext_config">{"output1": {
"name": "${input1.name[0:-len('.gz')] if $input1.name.endswith('.gz') else $input1.name} uncompressed",
"ext": "${input1.ext[0:-len('.gz')] if $input1.ext != 'vcf_bgzip' else 'vcf'}"
"ext": "${'vcf' if $input1.ext == 'vcf_bgzip' else $input1.ext[0:-len('.gz')] if $input1.ext.endswith('.gz') else $input1.ext}"
}}</configfile>
</configfiles>
<inputs>
Expand All @@ -21,6 +21,15 @@ gzip -dcf '$input1' > '$output1'
<param name="input1" value="test.vcf.gz" ftype="vcf_bgzip"/>
<output name="output1" file="test.vcf" ftype="vcf"/>
</test>
<test>
<param name="input1" value="1.fasta.gz" ftype="fasta.gz"/>
<output name="output1" file="1.fasta" ftype="fasta"/>
</test>
<!-- Test input with wrong format -->
<test>
<param name="input1" value="1.fasta.gz" ftype="fasta"/>
<output name="output1" file="1.fasta" ftype="fasta"/>
</test>
</tests>
<help>
</help>
Expand Down

0 comments on commit 3abb181

Please sign in to comment.