Skip to content

Commit

Permalink
cnvkit: text is txt (#6627)
Browse files Browse the repository at this point in the history
* text is txt

* fix TestsCaseValidation

* bump
  • Loading branch information
bernt-matthias authored Dec 13, 2024
1 parent 3f7bec1 commit 9d92267
Show file tree
Hide file tree
Showing 12 changed files with 170 additions and 98 deletions.
20 changes: 12 additions & 8 deletions tools/cnvkit/autobin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,24 @@
</outputs>
<tests>
<test expect_num_outputs="2">
<conditional name="reference_source">
<param name="ref_selector" value="history"/>
<param name="fasta" ftype="fasta" value="genome.fasta" />
</conditional>
<section name="advanced_settings">
<conditional name="reference_source">
<param name="ref_selector" value="history"/>
<param name="fasta" ftype="fasta" value="genome.fasta" />
</conditional>
</section>
<param name="bams" ftype="bam" value="tumor.bam" />
<param name="targets" ftype="bed" value="capture.bed" />
<output name="out_capture_target" file="capture.target.bed" />
<output name="out_capture_antitarget" file="capture.antitarget.bed" />
</test>
<test expect_num_outputs="2">
<conditional name="reference_source">
<param name="ref_selector" value="cached"/>
<param name="fasta" value="test_buildid"/>
</conditional>
<section name="advanced_settings">
<conditional name="reference_source">
<param name="ref_selector" value="cached"/>
<param name="fasta" value="test_buildid"/>
</conditional>
</section>
<param name="bams" ftype="bam" value="tumor.bam" />
<param name="targets" ftype="bed" value="capture.bed" />
<output name="out_capture_target" file="capture.target.bed" />
Expand Down
58 changes: 35 additions & 23 deletions tools/cnvkit/batch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,20 @@
</outputs>
<tests>
<test expect_num_outputs="13">
<conditional name="reference_source">
<param name="ref_selector" value="history"/>
<param name="fasta" ftype="fasta" value="genome.fasta" />
<conditional name="CNV_reference">
<conditional name="reference_source">
<param name="ref_selector" value="history"/>
<param name="fasta" ftype="fasta" value="genome.fasta" />
</conditional>
<param name="CNV_reference_availabel" value="no" />
<param name="input_sample_file" ftype="bam" value="tumor.bam" />
<param name="normal" ftype="bam" value="normal.bam" />
<param name="targets" ftype="bed" value="capture.bed" />
</conditional>
<param name="CNV_reference_availabel" value="no" />
<param name="input_sample_file" ftype="bam" value="tumor.bam" />
<param name="normal" ftype="bam" value="normal.bam" />
<param name="targets" ftype="bed" value="capture.bed" />
<param name="scatter" value="1"/>
<param name="diagram" value="1"/>
<section name="output_section">
<param name="scatter" value="1"/>
<param name="diagram" value="1"/>
</section>
<output name="out_sample_bintest" file="tumor.bintest.cns" />
<output name="out_sample_antitargetcoverage">
<assert_contents><has_text text="chromosome"/></assert_contents>
Expand Down Expand Up @@ -190,16 +194,20 @@
</output>
</test>
<test expect_num_outputs="13">
<conditional name="reference_source">
<param name="ref_selector" value="cached"/>
<param name="fasta" value="test_buildid"/>
<conditional name="CNV_reference">
<conditional name="reference_source">
<param name="ref_selector" value="cached"/>
<param name="fasta" value="test_buildid"/>
</conditional>
<param name="CNV_reference_availabel" value="no" />
<param name="input_sample_file" ftype="bam" value="tumor.bam" />
<param name="normal" ftype="bam" value="normal.bam" />
<param name="targets" ftype="bed" value="capture.bed" />
</conditional>
<param name="CNV_reference_availabel" value="no" />
<param name="input_sample_file" ftype="bam" value="tumor.bam" />
<param name="normal" ftype="bam" value="normal.bam" />
<param name="targets" ftype="bed" value="capture.bed" />
<param name="scatter" value="1"/>
<param name="diagram" value="1"/>
<section name="output_section">
<param name="scatter" value="1"/>
<param name="diagram" value="1"/>
</section>
<output name="out_sample_bintest" file="tumor.bintest.cns" />
<output name="out_sample_antitargetcoverage">
<assert_contents><has_text text="chromosome"/></assert_contents>
Expand Down Expand Up @@ -233,11 +241,15 @@
</output>
</test>
<test expect_num_outputs="10">
<param name="CNV_reference_availabel" value="yes" />
<param name="input_sample_file" ftype="bam" value="tumor.bam" />
<param name="reference" ftype="tabular" value="reference.cnn" />
<param name="scatter" value="1"/>
<param name="diagram" value="1"/>
<conditional name="CNV_reference">
<param name="CNV_reference_availabel" value="yes" />
<param name="input_sample_file" ftype="bam" value="tumor.bam" />
<param name="reference" ftype="tabular" value="reference.cnn" />
</conditional>
<section name="output_section">
<param name="scatter" value="1"/>
<param name="diagram" value="1"/>
</section>
<output name="out_sample_bintest" file="tumor.bintest.cns" />
<output name="out_sample_antitargetcoverage">
<assert_contents><has_text text="chromosome"/></assert_contents>
Expand Down
2 changes: 1 addition & 1 deletion tools/cnvkit/breaks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<param argument="--min-probes" optional="true" type="integer" label="Minimum propes" value="1" help="Minimum number of covered probes to label a gene" />
</inputs>
<outputs>
<data name="gene_breaks" format="text" label="${tool.name} on ${on_string}:genes with copy number breakpoints" from_work_dir="gene-breaks.txt" />
<data name="gene_breaks" format="txt" label="${tool.name} on ${on_string}:genes with copy number breakpoints" from_work_dir="gene-breaks.txt" />
</outputs>
<tests>
<test expect_num_outputs="1">
Expand Down
24 changes: 16 additions & 8 deletions tools/cnvkit/call.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,28 @@
<tests>
<test expect_num_outputs="1">
<param name="input_sample_file" ftype="tabular" value="tumor.cns" />
<param name="zygosity_freq" value="0.25" />
<param name="min_variant_depth" value="40" />
<param name="purity" value="1" />
<section name="additional_SNP_allelic_process">
<param name="zygosity_freq" value="0.25" />
<param name="min_variant_depth" value="40" />
</section>
<section name="advanced_settings">
<param name="purity" value="1" />
</section>
<output name="out_sample_Bintest">
<assert_contents><has_text_matching expression="chrM"/></assert_contents>
</output>
</test>
<test expect_num_outputs="1">
<conditional name="Sample_sex">
<param name="sex" value="yes" />
</conditional>
<section name="advanced_settings">
<conditional name="Sample_sex">
<param name="sex" value="yes" />
</conditional>
<param name="purity" value="1" />
</section>
<param name="input_sample_file" ftype="tabular" value="tumor.cns" />
<param name="min_variant_depth" value="40" />
<param name="purity" value="1" />
<section name="additional_SNP_allelic_process">
<param name="min_variant_depth" value="40" />
</section>
<output name="out_sample_Bintest">
<assert_contents><has_text_matching expression="chrM"/></assert_contents>
</output>
Expand Down
22 changes: 13 additions & 9 deletions tools/cnvkit/diagram.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,25 @@
<tests>
<test expect_num_outputs="1">
<param name="input_cnr_file" ftype="tabular" value="tumor.cnr" />
<param name="segment" ftype="tabular" value="sample.cns" />
<param name="threshold" value="10" />
<param name="male_reference" value="1" />
<section name="advanced_settings">
<param name="segment" ftype="tabular" value="sample.cns" />
<param name="threshold" value="10" />
<param name="male_reference" value="1" />
</section>
<output name="out_diagram_file" file="sample-diagram.pdf" ftype="pdf" compare="sim_size" >
<assert_contents><has_size value="6000" delta="2000" /></assert_contents>
</output>
</test>
<test expect_num_outputs="1">
<conditional name="Sample_sex">
<param name="sex" value="yes" />
</conditional>
<param name="input_cnr_file" ftype="tabular" value="tumor.cnr" />
<param name="segment" ftype="tabular" value="sample.cns" />
<param name="threshold" value="10" />
<param name="male_reference" value="1" />
<section name="advanced_settings">
<conditional name="Sample_sex">
<param name="sex" value="yes" />
</conditional>
<param name="segment" ftype="tabular" value="sample.cns" />
<param name="threshold" value="10" />
<param name="male_reference" value="1" />
</section>
<output name="out_diagram_file" file="sample-diagram.pdf" ftype="pdf" compare="sim_size" >
<assert_contents><has_size value="6000" delta="2000" /></assert_contents>
</output>
Expand Down
2 changes: 1 addition & 1 deletion tools/cnvkit/genemetrics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</section>
</inputs>
<outputs>
<data name="gene_genemetrics" format="text" label="${tool.name} on ${on_string}: Sample copy number ratios table" from_work_dir="gene_genemetrics.txt" />
<data name="gene_genemetrics" format="txt" label="${tool.name} on ${on_string}: Sample copy number ratios table" from_work_dir="gene_genemetrics.txt" />
</outputs>
<tests>
<test expect_num_outputs="1">
Expand Down
14 changes: 9 additions & 5 deletions tools/cnvkit/heatmap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,21 @@
<tests>
<test expect_num_outputs="1">
<param name="filenames" ftype="tabular" value="tumor.cns,sample.cns" />
<param name="desaturate" value="1" />
<section name="advanced_settings">
<param name="desaturate" value="1" />
</section>
<output name="out_heatmap_png" file="sample-heatmap.png" ftype="png" compare="sim_size" >
<assert_contents><has_size value="9000" delta="5000" /></assert_contents>
</output>
</test>
<test expect_num_outputs="1">
<conditional name="Sample_sex">
<param name="sex" value="no" />
</conditional>
<param name="filenames" ftype="tabular" value="tumor.cns,sample.cns" />
<param name="desaturate" value="1" />
<section name="advanced_settings">
<param name="desaturate" value="1" />
<conditional name="Sample_sex">
<param name="sex" value="no" />
</conditional>
</section>
<output name="out_heatmap_png" file="sample-heatmap.png" ftype="png" compare="sim_size" >
<assert_contents><has_size value="9000" delta="5000" /></assert_contents>
</output>
Expand Down
2 changes: 1 addition & 1 deletion tools/cnvkit/macros.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<macros>
<token name="@VERSION_SUFFIX@">0</token>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@TOOL_VERSION@">0.9.11</token>
<xml name="requirements">
<requirements>
Expand Down
96 changes: 63 additions & 33 deletions tools/cnvkit/reference.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,60 +98,90 @@
</outputs>
<tests>
<test expect_num_outputs="1">
<conditional name="reference_source">
<param name="ref_selector" value="history"/>
<param name="fasta" ftype="fasta" value="genome.fasta" />
<conditional name="CNV_reference">
<param name="CNV_reference_availabel" value="yes" />
<section name="advanced_settings">
<conditional name="reference_source">
<param name="ref_selector" value="history"/>
<param name="fasta" ftype="fasta" value="genome.fasta" />
</conditional>
</section>
<param name="input_cnn_file" ftype="tabular" value="tumor.targetcoverage.cnn" />
<section name="disable_some_of_the_bias_corrections">
<param name="no_gc" value="1" />
</section>
</conditional>
<param name="CNV_reference_availabel" value="yes" />
<param name="input_cnn_file" ftype="tabular" value="tumor.targetcoverage.cnn" />
<param name="no_gc" value="1" />
<output name="out_referene_tas" file="ref-tas.cnn" />
</test>
<test expect_num_outputs="1">
<conditional name="reference_source">
<param name="ref_selector" value="cached"/>
<param name="fasta" value="test_buildid"/>
<conditional name="CNV_reference">
<param name="CNV_reference_availabel" value="yes" />
<section name="advanced_settings">
<conditional name="reference_source">
<param name="ref_selector" value="cached"/>
<param name="fasta" value="test_buildid"/>
</conditional>
</section>
<param name="input_cnn_file" ftype="tabular" value="tumor.targetcoverage.cnn" />
<section name="disable_some_of_the_bias_corrections">
<param name="no_gc" value="1" />
</section>
</conditional>
<param name="CNV_reference_availabel" value="yes" />
<param name="input_cnn_file" ftype="tabular" value="tumor.targetcoverage.cnn" />
<param name="no_gc" value="1" />
<output name="out_referene_tas" file="ref-tas.cnn" />
</test>
<test expect_num_outputs="1">
<conditional name="reference_source">
<param name="ref_selector" value="cached"/>
<param name="fasta" value="test_buildid"/>
<conditional name="CNV_reference">
<param name="CNV_reference_availabel" value="yes" />
<section name="advanced_settings">
<conditional name="reference_source">
<param name="ref_selector" value="cached"/>
<param name="fasta" value="test_buildid"/>
</conditional>
</section>
<param name="input_cnn_file" ftype="tabular" value="tumor.targetcoverage.cnn,test.targetcoverage.cnn" />
<section name="disable_some_of_the_bias_corrections">
<param name="no_gc" value="1" />
</section>
</conditional>
<param name="CNV_reference_availabel" value="yes" />
<param name="input_cnn_file" ftype="tabular" value="tumor.targetcoverage.cnn,test.targetcoverage.cnn" />
<param name="no_gc" value="1" />
<output name="out_referene_tas">
<assert_contents><has_text text="chromosome"/></assert_contents>
</output>
</test>
<test expect_num_outputs="1">
<conditional name="reference_source">
<param name="ref_selector" value="cached"/>
<param name="fasta" value="test_buildid"/>
<conditional name="CNV_reference">
<param name="CNV_reference_availabel" value="no" />
<section name="advanced_settings">
<conditional name="reference_source">
<param name="ref_selector" value="cached"/>
<param name="fasta" value="test_buildid"/>
</conditional>
</section>
<param name="targets" ftype="bed" value="capture.target.bed" />
<section name="disable_some_of_the_bias_corrections">
<param name="no_gc" value="1" />
</section>
</conditional>
<param name="CNV_reference_availabel" value="no" />
<param name="targets" ftype="bed" value="capture.target.bed" />
<param name="no_gc" value="1" />
<output name="out_referene_tas">
<assert_contents><has_text text="chromosome"/></assert_contents>
</output>
</test>
<test expect_num_outputs="1">
<conditional name="reference_source">
<param name="ref_selector" value="cached"/>
<param name="fasta" value="test_buildid"/>
</conditional>
<conditional name="Sample_sex">
<param name="sex" value="no" />
<conditional name="CNV_reference">
<param name="CNV_reference_availabel" value="no" />
<section name="advanced_settings">
<conditional name="reference_source">
<param name="ref_selector" value="cached"/>
<param name="fasta" value="test_buildid"/>
</conditional>
<conditional name="Sample_sex">
<param name="sex" value="no" />
</conditional>
</section>
<param name="targets" ftype="bed" value="capture.target.bed" />
<section name="disable_some_of_the_bias_corrections">
<param name="no_gc" value="1" />
</section>
</conditional>
<param name="CNV_reference_availabel" value="no" />
<param name="targets" ftype="bed" value="capture.target.bed" />
<param name="no_gc" value="1" />
<output name="out_referene_tas">
<assert_contents><has_text text="chromosome"/></assert_contents>
</output>
Expand Down
10 changes: 8 additions & 2 deletions tools/cnvkit/scatter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,14 @@
<tests>
<test expect_num_outputs="1">
<param name="input_cnr_file" ftype="tabular" value="tumor.cnr" />
<param name="zygosity_freq" value="0.25" />
<param name="by_bin" value="1" />
<section name="advanced_settings">
<section name="additional_SNP_allelic_process">
<param name="zygosity_freq" value="0.25" />
</section>
<section name="plot_aesthetics">
<param name="by_bin" value="1" />
</section>
</section>
<output name="out_scatter_file" file="sample-scatter.pdf" ftype="pdf" compare="sim_size">
<assert_contents><has_size value="12000" delta="5000" /></assert_contents>
</output>
Expand Down
Loading

0 comments on commit 9d92267

Please sign in to comment.