Mercurial > repos > iuc > samtools_bam_to_cram
comparison samtools_bam_to_cram.xml @ 0:b5dc4f88fb2d draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/bam_to_cram commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
author | iuc |
---|---|
date | Tue, 09 May 2017 11:18:16 -0400 |
parents | |
children | 3e15f2544a5c |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b5dc4f88fb2d |
---|---|
1 <tool id="samtools_bam_to_cram" name="samtools BAM to CRAM" version="@TOOL_VERSION@"> | |
2 <description>convert BAM alignments to CRAM format</description> | |
3 | |
4 <macros> | |
5 <import>macros.xml</import> | |
6 </macros> | |
7 <expand macro="requirements"/> | |
8 <expand macro="stdio"/> | |
9 <expand macro="version_command"/> | |
10 | |
11 <command><![CDATA[ | |
12 #if str( $input_alignment.metadata.bam_index ) != "None": | |
13 ln | |
14 -f | |
15 -s | |
16 '${input_alignment.metadata.bam_index}' | |
17 '${input_alignment}.bai' | |
18 && | |
19 #end if | |
20 | |
21 #if $reference_source.reference_source_selector == 'history': | |
22 #set ref_fa = 'ref.fa' | |
23 ln -s '${reference_source.input_reference}' ref.fa && | |
24 #else: | |
25 #set ref_fa = str( $reference_source.input_reference.fields.path ) | |
26 #end if | |
27 | |
28 samtools view | |
29 #if $parameter_regions.target_region == "regions_bed_file" | |
30 -L '${parameter_regions.regions_bed_file}' | |
31 #end if | |
32 | |
33 -@\${GALAXY_SLOTS:-1} | |
34 -C | |
35 -T '$ref_fa' | |
36 -o '${output_alignment}' | |
37 | |
38 '${input_alignment}' | |
39 | |
40 #if $parameter_regions.target_region == "region" | |
41 '${parameter_regions.region_string}' | |
42 #end if | |
43 ]]></command> | |
44 | |
45 <inputs> | |
46 <param name="input_alignment" type="data" format="bam,sam" label="BAM (or SAM) alignment file"/> | |
47 <conditional name="reference_source"> | |
48 <param name="reference_source_selector" type="select" label="Load reference genome from"> | |
49 <option value="cached">Local cache</option> | |
50 <option value="history">History</option> | |
51 </param> | |
52 <when value="cached"> | |
53 <param name="input_reference" type="select" label="Reference genome"> | |
54 <options from_data_table="fasta_indexes"> | |
55 <filter type="data_meta" ref="input_alignment" key="dbkey" column="1" /> | |
56 </options> | |
57 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> | |
58 </param> | |
59 </when> | |
60 <when value="history"> | |
61 <param name="input_reference" type="data" format="fasta" label="Reference FASTA file"/> | |
62 </when> | |
63 </conditional> | |
64 <conditional name="parameter_regions"> | |
65 <param name="target_region" type="select" label="Choose conversion within specific genomic region(s)"> | |
66 <option value="entire_input_file">Entire BAM alignment file</option> | |
67 <option value="region">Specific region</option> | |
68 <option value="regions_bed_file">List of specific regions (BED file)</option> | |
69 </param> | |
70 <when value="entire_input_file" /> | |
71 <when value="region"> | |
72 <param name="region_string" type="text" label="Samtools: region in which pileup is generated" help="e.g. chrX or chr:start-end" /> | |
73 </when> | |
74 <when value="regions_bed_file"> | |
75 <param name="regions_bed_file" argument="-L" type="data" format="bed" | |
76 label="Only include reads overlapping this BED file" /> | |
77 </when> | |
78 </conditional> | |
79 </inputs> | |
80 | |
81 <outputs> | |
82 <data name="output_alignment" format="cram" label="$tool.name on ${on_string}.cram"></data> | |
83 </outputs> | |
84 | |
85 <tests> | |
86 <test> | |
87 <param name="input_alignment" value="test.bam" ftype="bam" /> | |
88 <param name="reference_source_selector" value="history" /> | |
89 <param name="input_reference" value="test.fa" /> | |
90 <param name="target_region" value="entire_input_file" /> | |
91 | |
92 <output name="output_alignment" file="test.cram" compare="sim_size" delta="250" /> | |
93 </test> | |
94 <test> | |
95 <param name="input_alignment" value="test.sam" ftype="sam" /> | |
96 <param name="reference_source_selector" value="history" /> | |
97 <param name="input_reference" value="test.fa" /> | |
98 <param name="target_region" value="entire_input_file" /> | |
99 | |
100 <output name="output_alignment" file="test.cram" compare="sim_size" delta="250" /> | |
101 </test> | |
102 <test> | |
103 <param name="input_alignment" value="test.bam" ftype="bam" /> | |
104 <param name="reference_source_selector" value="history" /> | |
105 <param name="input_reference" value="test.fa" /> | |
106 <param name="target_region" value="region" /> | |
107 <param name="region_string" value="CHROMOSOME_I" /> | |
108 | |
109 <output name="output_alignment" file="test.cram" compare="sim_size" delta="250" /> | |
110 </test> | |
111 <test> | |
112 <param name="input_alignment" value="test.bam" ftype="bam" /> | |
113 <param name="reference_source_selector" value="history" /> | |
114 <param name="input_reference" value="test.fa" /> | |
115 <param name="target_region" value="regions_bed_file" /> | |
116 <param name="regions_bed_file" value="test.bed" ftype="bed" /> | |
117 | |
118 <output name="output_alignment" file="test.cram" compare="sim_size" delta="250" /> | |
119 </test> | |
120 <test> | |
121 <param name="input_alignment" ftype="bam" dbkey="equCab2" value="sam_to_bam_out2.bam" /> | |
122 <param name="reference_source_selector" value="cached" /> | |
123 <param name="input_reference" value="equCab2chrM" /> | |
124 <param name="target_region" value="entire_input_file" /> | |
125 <output name="output_alignment" file="test2.cram" compare="sim_size" delta="250" /> | |
126 </test> | |
127 </tests> | |
128 | |
129 <help><![CDATA[ | |
130 **What this tool does** | |
131 | |
132 Converts alignments from the BAM format to the CRAM format using the ``samtools view`` command. | |
133 The CRAM format does additional compression relative to the reference genome which makes the compression in terms of file size more efficient. | |
134 ]]></help> | |
135 | |
136 <expand macro="citations" /> | |
137 </tool> |