Mercurial > repos > iuc > cnvkit_reference
comparison reference.xml @ 0:12744fc315ae draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cnvkit commit c35b83e4b65b211377c9f616c77d7306da48a984
| author | iuc |
|---|---|
| date | Sun, 14 May 2023 20:07:12 +0000 |
| parents | |
| children | 184550cc93fd |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:12744fc315ae |
|---|---|
| 1 <tool id="cnvkit_reference" name="CNVkit Reference" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05"> | |
| 2 <description>Compile a copy-number reference from the given files or directory containing normal samples</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="xrefs"/> | |
| 7 <expand macro="requirements"/> | |
| 8 <command detect_errors="exit_code"><![CDATA[ | |
| 9 #import re | |
| 10 #if str($CNV_reference.CNV_reference_availabel) == "yes" | |
| 11 #set $names = [] | |
| 12 #set $x=1 | |
| 13 #for $x, $input in enumerate($CNV_reference.input_cnn_file): | |
| 14 #set $name_base = re.sub('[^\w\-_\.]', '_', $input.element_identifier) | |
| 15 #set $name = $name_base + '_' + str(x) | |
| 16 #silent $names.append( $name ) | |
| 17 ln -s '$input' ${name}.cnn && | |
| 18 #end for | |
| 19 #end if | |
| 20 #if str($CNV_reference.CNV_reference_availabel) == "no" | |
| 21 #if $CNV_reference.antitargets | |
| 22 ln -s '$CNV_reference.antitargets' ./antitargets.bed && | |
| 23 #end if | |
| 24 ln -s '$CNV_reference.targets' ./targets.bed && | |
| 25 #end if | |
| 26 #if $CNV_reference.advanced_settings.reference_source.fasta | |
| 27 #if str($CNV_reference.advanced_settings.reference_source.ref_selector) == 'history': | |
| 28 ln -s '$CNV_reference.advanced_settings.reference_source.fasta' ./genome.fa && | |
| 29 samtools faidx ./genome.fa 2>&1 || echo 'Error running samtools faidx for indexing fasta reference for CNVkit' >&2 && | |
| 30 #else | |
| 31 ln -s '$CNV_reference.advanced_settings.reference_source.fasta.fields.path' ./genome.fa && | |
| 32 ln -s '${CNV_reference.advanced_settings.reference_source.fasta.fields.path}.fai' ./genome.fa.fai && | |
| 33 #end if | |
| 34 #end if | |
| 35 cnvkit.py reference | |
| 36 #if str($CNV_reference.CNV_reference_availabel) == "yes" | |
| 37 #for $name in $names: | |
| 38 ${name}.cnn | |
| 39 #end for | |
| 40 #end if | |
| 41 --output ref-tas.cnn | |
| 42 $CNV_reference.advanced_settings.cluster | |
| 43 #if str($CNV_reference.advanced_settings.min_cluster_size) | |
| 44 --min-cluster-size '$CNV_reference.advanced_settings.min_cluster_size' | |
| 45 #end if | |
| 46 #if str($CNV_reference.advanced_settings.Sample_sex.sex) == "yes": | |
| 47 #if '$CNV_reference.advanced_settings.Sample_sex.sample_sex' == "Male" | |
| 48 #set $sample_sex_val = "Male" | |
| 49 --sample-sex '$segment_method_val' | |
| 50 #else | |
| 51 --sample-sex '$CNV_reference.advanced_settings.Sample_sex.sample_sex' | |
| 52 #end if | |
| 53 #end if | |
| 54 $CNV_reference.advanced_settings.male_reference | |
| 55 #if str($CNV_reference.CNV_reference_availabel) == "no" | |
| 56 --targets ./targets.bed | |
| 57 #if $CNV_reference.antitargets | |
| 58 --antitargets ./antitargets.bed | |
| 59 #end if | |
| 60 #end if | |
| 61 $CNV_reference.disable_some_of_the_bias_corrections.no_gc | |
| 62 $CNV_reference.disable_some_of_the_bias_corrections.no_edge | |
| 63 $CNV_reference.disable_some_of_the_bias_corrections.no_rmask | |
| 64 ]]></command> | |
| 65 <inputs> | |
| 66 <conditional name="CNV_reference"> | |
| 67 <param name="CNV_reference_availabel" type="select" label="Build or reuse a copy number reference file cnn?" help=""> | |
| 68 <option value="no" selected="True">Build a new copy number reference file</option> | |
| 69 <option value="yes">Reuse a copy number reference file</option> | |
| 70 </param> | |
| 71 <when value="no"> | |
| 72 <expand macro="construct_CNV_ref_with_natural_expected_number" /> | |
| 73 <section name="advanced_settings" title="Advanced settings" expanded="false"> | |
| 74 <expand macro="reference_interface" /> | |
| 75 <expand macro="reference_optional" /> | |
| 76 <expand macro="sample_sex_condition" /> | |
| 77 </section> | |
| 78 <section name="disable_some_of_the_bias_corrections" title="Bias corrections settings" expanded="false"> | |
| 79 <expand macro="disable_specific_automatic_bias_corrections" /> | |
| 80 </section> | |
| 81 </when> | |
| 82 <when value="yes"> | |
| 83 <param name="input_cnn_file" type="data" format="tabular" multiple="true" label="cnn file" help="Normal-sample target or antitarget cnn files, or the directory that contains them" /> | |
| 84 <section name="advanced_settings" title="Advanced settings" expanded="false"> | |
| 85 <expand macro="reference_interface" /> | |
| 86 <expand macro="reference_optional" /> | |
| 87 <conditional name="Sample_sex"> | |
| 88 <param name="sex" type="select" label="Sample sex availabel" help=""> | |
| 89 <option value="yes">Select sample sex</option> | |
| 90 </param> | |
| 91 <when value="yes"> | |
| 92 <expand macro="sample_sex" /> | |
| 93 </when> | |
| 94 </conditional> | |
| 95 </section> | |
| 96 <section name="disable_some_of_the_bias_corrections" title="Bias corrections settings" expanded="false"> | |
| 97 <expand macro="disable_specific_automatic_bias_corrections" /> | |
| 98 </section> | |
| 99 </when> | |
| 100 </conditional> | |
| 101 </inputs> | |
| 102 <outputs> | |
| 103 <data name="out_referene_tas" format="tabular" label="${tool.name} on ${on_string}: TAS-on-target coverage" from_work_dir="ref-tas.cnn" /> | |
| 104 </outputs> | |
| 105 <tests> | |
| 106 <test expect_num_outputs="1"> | |
| 107 <conditional name="reference_source"> | |
| 108 <param name="ref_selector" value="history"/> | |
| 109 <param name="fasta" ftype="fasta" value="genome.fasta" /> | |
| 110 </conditional> | |
| 111 <param name="CNV_reference_availabel" value="yes" /> | |
| 112 <param name="input_cnn_file" ftype="tabular" value="tumor.targetcoverage.cnn" /> | |
| 113 <param name="no_gc" value="1" /> | |
| 114 <output name="out_referene_tas" file="ref-tas.cnn" /> | |
| 115 </test> | |
| 116 <test expect_num_outputs="1"> | |
| 117 <conditional name="reference_source"> | |
| 118 <param name="ref_selector" value="cached"/> | |
| 119 <param name="fasta" value="test_buildid"/> | |
| 120 </conditional> | |
| 121 <param name="CNV_reference_availabel" value="yes" /> | |
| 122 <param name="input_cnn_file" ftype="tabular" value="tumor.targetcoverage.cnn" /> | |
| 123 <param name="no_gc" value="1" /> | |
| 124 <output name="out_referene_tas" file="ref-tas.cnn" /> | |
| 125 </test> | |
| 126 <test expect_num_outputs="1"> | |
| 127 <conditional name="reference_source"> | |
| 128 <param name="ref_selector" value="cached"/> | |
| 129 <param name="fasta" value="test_buildid"/> | |
| 130 </conditional> | |
| 131 <param name="CNV_reference_availabel" value="yes" /> | |
| 132 <param name="input_cnn_file" ftype="tabular" value="tumor.targetcoverage.cnn,sample.targetcoverage.cnn" /> | |
| 133 <param name="no_gc" value="1" /> | |
| 134 <output name="out_referene_tas"> | |
| 135 <assert_contents><has_text text="chromosome"/></assert_contents> | |
| 136 </output> | |
| 137 </test> | |
| 138 <test expect_num_outputs="1"> | |
| 139 <conditional name="reference_source"> | |
| 140 <param name="ref_selector" value="cached"/> | |
| 141 <param name="fasta" value="test_buildid"/> | |
| 142 </conditional> | |
| 143 <param name="CNV_reference_availabel" value="no" /> | |
| 144 <param name="targets" ftype="bed" value="capture.target.bed" /> | |
| 145 <param name="no_gc" value="1" /> | |
| 146 <output name="out_referene_tas"> | |
| 147 <assert_contents><has_text text="chromosome"/></assert_contents> | |
| 148 </output> | |
| 149 </test> | |
| 150 <test expect_num_outputs="1"> | |
| 151 <conditional name="reference_source"> | |
| 152 <param name="ref_selector" value="cached"/> | |
| 153 <param name="fasta" value="test_buildid"/> | |
| 154 </conditional> | |
| 155 <conditional name="Sample_sex"> | |
| 156 <param name="sex" value="yes" /> | |
| 157 </conditional> | |
| 158 <param name="CNV_reference_availabel" value="no" /> | |
| 159 <param name="targets" ftype="bed" value="capture.target.bed" /> | |
| 160 <param name="no_gc" value="1" /> | |
| 161 <output name="out_referene_tas"> | |
| 162 <assert_contents><has_text text="chromosome"/></assert_contents> | |
| 163 </output> | |
| 164 </test> | |
| 165 </tests> | |
| 166 <help><![CDATA[ | |
| 167 Compile a copy-number reference from the given files or directory (containing normal samples). | |
| 168 If given a reference genome (-f option), also calculate the GC content and repeat-masked | |
| 169 proportion of each region. | |
| 170 | |
| 171 The reference .cnn file output contains those columns | |
| 172 chromosome, Start, end, gene, GC content of the sequence region (gc), RepeatMasker-masked proportion | |
| 173 of the sequence region (rmask), Statistical spread or dispersion (spread), Robust average of coverage | |
| 174 depths (log2 ) and Robust average of absolute-scale coverage depths without any bias corrections (depth) | |
| 175 | |
| 176 ]]></help> | |
| 177 <expand macro="citations" /> | |
| 178 </tool> |
