comparison samtools_cram_to_bam.xml @ 4:1551b0dd2d16 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/cram_to_bam commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
author iuc
date Tue, 28 Sep 2021 16:11:03 +0000
parents 858ada516d8f
children 634df184b2a8
comparison
equal deleted inserted replaced
3:858ada516d8f 4:1551b0dd2d16
1 <tool id="samtools_cram_to_bam" name="samtools CRAM to BAM" version="@TOOL_VERSION@+galaxy1"> 1 <tool id="samtools_cram_to_bam" name="samtools CRAM to BAM" version="@TOOL_VERSION@" profile="@PROFILE@">
2 <description>convert CRAM alignments to BAM format</description> 2 <description>convert CRAM alignments to BAM format</description>
3 3
4 <macros> 4 <macros>
5 <import>macros.xml</import> 5 <import>macros.xml</import>
6 </macros> 6 </macros>
7 <expand macro="requirements"/> 7 <expand macro="requirements"/>
8 <expand macro="stdio"/> 8 <expand macro="stdio"/>
9 <expand macro="version_command"/> 9 <expand macro="version_command"/>
10 10
11 <command><![CDATA[ 11 <command><![CDATA[
12 #set input_cram = "input.cram" 12 @ADDTHREADS@
13 ln -s '${input_alignment}' '${input_cram}' && 13 ln -s '$input' input.cram &&
14 #if str( $input_alignment.metadata.cram_index ) != "None": 14 #if str( $input.metadata.cram_index ) != "None":
15 ln -f -s '${input_alignment.metadata.cram_index}' '${input_cram}.crai' && 15 ln -f -s '${input.metadata.cram_index}' input.cram.crai &&
16 #end if 16 #end if
17 17
18 #if $reference_source.reference_source_selector == 'history': 18 @PREPARE_FASTA_IDX@
19 #set ref_fa = 'ref.fa'
20 ln -s '${reference_source.input_reference}' ref.fa &&
21 #else:
22 #set ref_fa = str( $reference_source.input_reference.fields.path )
23 #end if
24 19
25 samtools view 20 samtools view
26 #if $parameter_regions.target_region == "regions_bed_file" 21 #if $parameter_regions.target_region == "regions_bed_file"
27 -L '${parameter_regions.regions_bed_file}' 22 -L '$parameter_regions.regions_bed_file'
28 #end if 23 #end if
29 -@ \${GALAXY_SLOTS:-2} 24 -@ \$addthreads
30 -b 25 -b
31 -T '$ref_fa' 26 -T '$reffa'
32 -o '$output_alignment' 27 -o '$output_alignment'
33 '$input_cram' 28 input.cram
34 #if $parameter_regions.target_region == "region" 29 #if $parameter_regions.target_region == "region"
35 '${parameter_regions.region_string}' 30 '$parameter_regions.region_string'
36 #end if 31 #end if
37 ]]></command> 32 ]]></command>
38 33
39 <inputs> 34 <inputs>
40 <param name="input_alignment" type="data" format="cram" label="CRAM alignment file"/> 35 <param name="input" type="data" format="cram" label="CRAM alignment file"/>
41 <conditional name="reference_source"> 36 <expand macro="mandatory_reference" argument="-t"/>
42 <param name="reference_source_selector" type="select" label="Load reference genome from">
43 <option value="cached">Local cache</option>
44 <option value="history">History</option>
45 </param>
46 <when value="cached">
47 <param name="input_reference" type="select" label="Reference genome">
48 <options from_data_table="fasta_indexes">
49 <filter type="data_meta" ref="input_alignment" key="dbkey" column="dbkey" />
50 </options>
51 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
52 </param>
53 </when>
54 <when value="history">
55 <param name="input_reference" type="data" format="fasta" label="Reference FASTA file"/>
56 </when>
57 </conditional>
58 <conditional name="parameter_regions"> 37 <conditional name="parameter_regions">
59 <param name="target_region" type="select" label="Choose conversion within specific genomic region(s)"> 38 <param name="target_region" type="select" label="Choose conversion within specific genomic region(s)">
60 <option value="entire_input_file">Entire BAM alignment file</option> 39 <option value="entire_input_file">Entire BAM alignment file</option>
61 <option value="region">Specific region</option> 40 <option value="region">Specific region</option>
62 <option value="regions_bed_file">List of specific regions (BED file)</option> 41 <option value="regions_bed_file">List of specific regions (BED file)</option>
75 <data name="output_alignment" format="bam" label="$tool.name on ${on_string}.bam"></data> 54 <data name="output_alignment" format="bam" label="$tool.name on ${on_string}.bam"></data>
76 </outputs> 55 </outputs>
77 56
78 <tests> 57 <tests>
79 <test> 58 <test>
80 <param name="input_alignment" value="test.cram" ftype="cram" /> 59 <param name="input" value="test.cram" ftype="cram" />
81 <param name="reference_source_selector" value="history" /> 60 <param name="addref_select" value="history" />
82 <param name="input_reference" value="test.fa" /> 61 <param name="ref" value="test.fa" />
83 62 <output name="output_alignment" file="test.bam" ftype="bam" lines_diff="4" />
84 <output name="output_alignment" file="test.bam" compare="sim_size" delta="250" />
85 </test> 63 </test>
86 <test> 64 <test>
87 <param name="input_alignment" value="test.cram" ftype="cram" /> 65 <param name="input" value="test.cram" ftype="cram" />
88 <param name="reference_source_selector" value="history" /> 66 <param name="addref_select" value="history" />
89 <param name="input_reference" value="test.fa" /> 67 <param name="ref" value="test.fa" />
90 <param name="target_region" value="region" /> 68 <param name="target_region" value="region" />
91 <param name="region_string" value="CHROMOSOME_I" /> 69 <param name="region_string" value="CHROMOSOME_I" />
92 70 <output name="output_alignment" file="test.bam" ftype="bam" lines_diff="4" />
93 <output name="output_alignment" file="test.bam" compare="sim_size" delta="250" />
94 </test> 71 </test>
95 <test> 72 <test>
96 <param name="input_alignment" value="test.cram" ftype="cram" /> 73 <param name="input" value="test.cram" ftype="cram" />
97 <param name="reference_source_selector" value="history" /> 74 <param name="addref_select" value="history" />
98 <param name="input_reference" value="test.fa" /> 75 <param name="ref" value="test.fa" />
99 <param name="target_region" value="regions_bed_file" /> 76 <param name="target_region" value="regions_bed_file" />
100 <param name="regions_bed_file" value="test.bed" ftype="bed" /> 77 <param name="regions_bed_file" value="test.bed" ftype="bed" />
101 78 <output name="output_alignment" file="test.bam" ftype="bam" lines_diff="4" />
102 <output name="output_alignment" file="test.bam" compare="sim_size" delta="250" />
103 </test> 79 </test>
104 <test> 80 <test>
105 <param name="input_alignment" value="test2.cram" dbkey="equCab2" ftype="cram" /> 81 <param name="input" value="test2.cram" dbkey="equCab2" ftype="cram" />
106 <param name="reference_source_selector" value="cached" /> 82 <param name="addref_select" value="cached" />
107 <param name="input_reference" value="equCab2chrM" /> 83 <param name="ref" value="equCab2chrM" />
108 <param name="target_region" value="entire_input_file" /> 84 <param name="target_region" value="entire_input_file" />
109 <output name="output_alignment" file="sam_to_bam_out2.bam" compare="sim_size" delta="250" /> 85 <output name="output_alignment" file="sam_to_bam_out2.bam" ftype="bam" lines_diff="4" />
110 </test> 86 </test>
111 </tests> 87 </tests>
112 88
113 <help><![CDATA[ 89 <help><![CDATA[
114 **What this tool does** 90 **What this tool does**