Mercurial > repos > iuc > cnvkit_autobin
comparison autobin.xml @ 0:b1f6ea16e629 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:05:09 +0000 |
| parents | |
| children | 96941b733d87 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:b1f6ea16e629 |
|---|---|
| 1 <tool id="cnvkit_autobin" name="CNVkit Autobin" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05"> | |
| 2 <description>Estimates read counts or depths in a BAM file</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 #set $names = [] | |
| 11 #set $x=1 | |
| 12 #for $x, $bam in enumerate($bams): | |
| 13 #set $name_base = re.sub('[^\w\-_\.]', '_', $bam.element_identifier) | |
| 14 #set $name = $name_base + '_' + str(x) | |
| 15 #silent $names.append( $name ) | |
| 16 ln -s '$bam' ${name}.bam && | |
| 17 ln -s '${bam.metadata.bam_index}' ${name}.bai && | |
| 18 #end for | |
| 19 ln -s '$targets' ./capture.bed && | |
| 20 #if $advanced_settings.reference_source.fasta | |
| 21 #if str($advanced_settings.reference_source.ref_selector) == 'history': | |
| 22 ln -s '$advanced_settings.reference_source.fasta' ./genome.fa && | |
| 23 samtools faidx ./genome.fa 2>&1 || echo 'Error running samtools faidx for indexing fasta reference for CNVkit' >&2 && | |
| 24 #else | |
| 25 ln -s '$advanced_settings.reference_source.fasta.fields.path' ./genome.fa && | |
| 26 ln -s '${advanced_settings.reference_source.fasta.fields.path}.fai' ./genome.fa.fai && | |
| 27 #end if | |
| 28 #end if | |
| 29 #if $advanced_settings.access | |
| 30 ln -s '$advanced_settings.access' ./access.bed && | |
| 31 #end if | |
| 32 #if $advanced_settings.annotate | |
| 33 ln -s '$advanced_settings.annotate' ./annotate.bed && | |
| 34 #end if | |
| 35 #if $advanced_settings.target_output_bed | |
| 36 ln -s '$advanced_settings.target_output_bed' ./target_output.bed && | |
| 37 #end if | |
| 38 #if $advanced_settings.antitarget_output_bed | |
| 39 ln -s '$advanced_settings.antitarget_output_bed' ./antitarget_output.bed && | |
| 40 #end if | |
| 41 cnvkit.py autobin | |
| 42 #for $name in $names: | |
| 43 ${name}.bam | |
| 44 #end for | |
| 45 --targets ./capture.bed | |
| 46 #if $advanced_settings.method == "hybrid" | |
| 47 #set $method_val = "hybrid" | |
| 48 --method '$method_val' | |
| 49 #else | |
| 50 --method '$method' | |
| 51 #end if | |
| 52 #if $advanced_settings.access | |
| 53 --access ./access.bed | |
| 54 #end if | |
| 55 #if str($advanced_settings.bp_per_bin) | |
| 56 --bp-per-bin $advanced_settings.bp_per_bin | |
| 57 #end if | |
| 58 #if str($advanced_settings.target_max_size) | |
| 59 --target-max-size $advanced_settings.target_max_size | |
| 60 #end if | |
| 61 #if str($advanced_settings.target_min_size) | |
| 62 --target-min-size $advanced_settings.target_min_size | |
| 63 #end if | |
| 64 #if str($advanced_settings.antitarget_max_size) | |
| 65 --antitarget-max-size $advanced_settings.antitarget_max_size | |
| 66 #end if | |
| 67 #if str($advanced_settings.antitarget_min_size) | |
| 68 --antitarget-min-size $advanced_settings.antitarget_min_size | |
| 69 #end if | |
| 70 #if $advanced_settings.annotate | |
| 71 --annotate ./annotate.bed | |
| 72 #end if | |
| 73 $advanced_settings.short_names | |
| 74 #if $advanced_settings.target_output_bed | |
| 75 --target-output-bed ./target_output.bed | |
| 76 #end if | |
| 77 #if $advanced_settings.antitarget_output_bed | |
| 78 --antitarget-output-bed ./antitarget_output.bed | |
| 79 #end if | |
| 80 ]]></command> | |
| 81 <inputs> | |
| 82 <param name="bams" type="data" multiple="true" format="bam" label="Input Sample BAM file/s" help="" /> | |
| 83 <param argument="--targets" type="data" format="bed,tabular" label="Input Potentially targeted genomic regions" help="e.g. all possible exons for the reference genome. Format: BED, interval list, etc." /> | |
| 84 <section name="advanced_settings" title="Advanced settings" expanded="false"> | |
| 85 <expand macro="reference_interface" /> | |
| 86 <expand macro="autobin_optional" /> | |
| 87 </section> | |
| 88 </inputs> | |
| 89 <outputs> | |
| 90 <data name="out_capture_target" format="bed" label="${tool.name} on ${on_string}: Capture target" from_work_dir="capture.target.bed" /> | |
| 91 <data name="out_capture_antitarget" format="bed" label="${tool.name} on ${on_string}: Capture antitarget" from_work_dir="capture.antitarget.bed" /> | |
| 92 </outputs> | |
| 93 <tests> | |
| 94 <test expect_num_outputs="2"> | |
| 95 <conditional name="reference_source"> | |
| 96 <param name="ref_selector" value="history"/> | |
| 97 <param name="fasta" ftype="fasta" value="genome.fasta" /> | |
| 98 </conditional> | |
| 99 <param name="bams" ftype="bam" value="tumor.bam" /> | |
| 100 <param name="targets" ftype="bed" value="capture.bed" /> | |
| 101 <output name="out_capture_target" file="capture.target.bed" /> | |
| 102 <output name="out_capture_antitarget" file="capture.antitarget.bed" /> | |
| 103 </test> | |
| 104 <test expect_num_outputs="2"> | |
| 105 <conditional name="reference_source"> | |
| 106 <param name="ref_selector" value="cached"/> | |
| 107 <param name="fasta" value="test_buildid"/> | |
| 108 </conditional> | |
| 109 <param name="bams" ftype="bam" value="tumor.bam" /> | |
| 110 <param name="targets" ftype="bed" value="capture.bed" /> | |
| 111 <output name="out_capture_target" file="capture.target.bed" /> | |
| 112 <output name="out_capture_antitarget" file="capture.antitarget.bed" /> | |
| 113 </test> | |
| 114 <test expect_num_outputs="2"> | |
| 115 <param name="bams" ftype="bam" value="tumor.bam,tumor_1.bam" /> | |
| 116 <param name="targets" ftype="bed" value="capture.bed" /> | |
| 117 <output name="out_capture_target" file="capture.target.bed" /> | |
| 118 <output name="out_capture_antitarget" file="multible_capture.antitarget.bed" /> | |
| 119 </test> | |
| 120 </tests> | |
| 121 <help><![CDATA[ | |
| 122 Quickly estimate read counts or depths in a BAM file to estimate reasonable on- and (if relevant) off-target bin sizes. | |
| 123 ]]></help> | |
| 124 <expand macro="citations" /> | |
| 125 </tool> |
