comparison picard_ReplaceSamHeader.xml @ 3:52fdfc45590a draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/picard commit 00a7926c285bc4a339bd7deebf40b28f39c7d947-dirty
author devteam
date Thu, 16 Jul 2015 15:32:31 -0400
parents ff4ec13e496e
children 08f69add4d06
comparison
equal deleted inserted replaced
2:93ace7e49295 3:52fdfc45590a
1 <tool name="Replace SAM/BAM Header" id="picard_ReplaceSamHeader" version="1.56.0"> 1 <tool name="ReplaceSamHeader" id="picard_ReplaceSamHeader" version="@TOOL_VERSION@.0">
2 <requirements><requirement type="package" version="1.56.0">picard</requirement></requirements> 2 <description>replace header in a SAM/BAM dataset</description>
3 <command interpreter="python"> 3 <macros>
4 picard_wrapper.py 4 <import>picard_macros.xml</import>
5 --input "$inputFile" 5 </macros>
6 -o $outFile 6 <expand macro="requirements" />
7 --header-file $headerFile 7 <command>
8 --output-format $outputFormat 8 @java_options@
9 -j "\$JAVA_JAR_PATH/ReplaceSamHeader.jar" 9
10 --tmpdir "${__new_file_path__}" 10
11 ## Two lines below are due to the fact that picard likes fasta files to have extension .fa
12 #set $fasta_file="local_fasta.fa"
13 ln -s "${inputFile}" "${fasta_file}" &amp;&amp;
14
15 java -jar \$JAVA_JAR_PATH/picard.jar
16 ReplaceSamHeader
17
18 INPUT="${inputFile}"
19 HEADER="${header}"
20 OUTPUT="${outFile}"
21
22 QUIET=true
23 VERBOSITY=ERROR
24
11 </command> 25 </command>
12 <inputs> 26 <inputs>
13 <param format="bam,sam" name="inputFile" type="data" label="SAM/BAM dataset to replace header in (TARGET)" 27 <param format="sam,bam" name="inputFile" type="data" label="Select SAM/BAM dataset or dataset collection (header recepient dataset)" help="If empty, upload or import a SAM/BAM dataset"/>
14 help="If empty, upload or import a SAM/BAM dataset." /> 28 <param name="header" type="data" format="sam,bam" label="SAM/BAM dataset from which Header will be read (header source dataset)" help="HEADER; If empty, upload or import a SAM/BAM dataset"/>
15 <param format="bam,sam" name="headerFile" type="data" label="SAM/BAM to reader header from (SOURCE)" 29 </inputs>
16 help="If empty, upload or import a SAM/BAM dataset." /> 30
17 <param name="outputFormat" type="boolean" checked="True" truevalue="bam" falsevalue="sam" label="Output BAM instead of SAM" help="Uncheck for SAM output" />
18 </inputs>
19 <outputs> 31 <outputs>
20 <data name="outFile" format="bam" label="${tool.name} on ${on_string}: ${outputFormat} with replaced header"> 32 <data format="bam" name="outFile" label="${tool.name} on ${on_string}: BAM file with replaced header"/>
21 <change_format>
22 <when input="outputFormat" value="sam" format="sam" />
23 </change_format>
24 </data>
25 </outputs> 33 </outputs>
34
26 <tests> 35 <tests>
27 <test> 36 <test>
28 <!-- Command: 37 <param name="inputFile" value="picard_ReplaceSamHeader.bam" ftype="bam"/>
29 java -jar ReplaceSamHeader.jar VALIDATION_STRINGENCY=LENIENT I=test-data/picard_input_tiny_coord.bam HEADER=test-data/picard_RSH_input1.bam O=picard_RSH_output1.sam 38 <param name="header" value="picard_ReplaceSamHeader_header.bam" ftype="bam"/>
30 picard_RSH_input1.bam can be made from picard_RSH_input1.sam 39 <output name="outFile" file="picard_ReplaceSamHeader_test1.bam" ftype="bam"/>
31 -->
32 <param name="inputFile" value="picard_input_tiny_coord.bam" ftype="bam" />
33 <param name="headerFile" value="picard_RSH_input1.bam" ftype="bam" />
34 <param name="outputFormat" value="False" />
35 <output name="outFile" file="picard_RSH_output1.sam" ftype="sam" />
36 </test>
37 <test>
38 <!-- Command:
39 java -jar ReplaceSamHeader.jar VALIDATION_STRINGENCY=LENIENT I=test-data/picard_input_tiny_coord.sam HEADER=test-data/picard_RSH_input1.bam O=picard_RSH_output2.sam
40 picard_RSH_input1.bam can be made from picard_RSH_input1.sam
41 -->
42 <param name="inputFile" value="picard_input_tiny_coord.sam" ftype="sam" />
43 <param name="headerFile" value="picard_RSH_input1.bam" ftype="bam" />
44 <param name="outputFormat" value="False" />
45 <output name="outFile" file="picard_RSH_output2.sam" ftype="sam" />
46 </test>
47 <test>
48 <!-- Command:
49 java -jar ReplaceSamHeader.jar VALIDATION_STRINGENCY=LENIENT I=test-data/picard_input_tiny_coord.sam HEADER=test-data/picard_RSH_input1.sam O=picard_RSH_output2.bam
50 -->
51 <param name="inputFile" value="picard_input_tiny_coord.sam" ftype="sam" />
52 <param name="headerFile" value="picard_RSH_input1.sam" ftype="sam" />
53 <param name="outputFormat" value="True" />
54 <output name="outFile" file="picard_RSH_output2.bam" ftype="bam" />
55 </test> 40 </test>
56 </tests> 41 </tests>
42
43 <stdio>
44 <exit_code range="1:" level="fatal"/>
45 </stdio>
46
57 <help> 47 <help>
58
59
60 .. class:: infomark
61 48
62 **Purpose** 49 **Purpose**
63 50
64 Replace Sam Header with the header from another sam file. The tool does not do any 51 Replace the SAMFileHeader in a SAM/BAM dataset with the given header. Validation is minimal. It is up to the user to ensure that all the elements referred to in the SAMRecords are present in the new header. Sort order of the two input datasets must be the same.
65 significant validation, so it's up to the user to make sure that the elements in 52 @dataset_collections@
66 the header are relevant and that the new header has all the required things.
67 53
68 Replace the SAMFileHeader in a SAM file with the given header. Validation is 54 @description@
69 minimal. It is up to the user to ensure that all the elements referred to in the
70 SAMRecords are present in the new header. Sort order of the two input files must
71 be the same.
72 55
73 **Picard documentation** 56 HEADER=File SAM file from which SAMFileHeader will be read. Required.
74 57
75 This is a Galaxy wrapper for ReplaceSamHeader, a part of the external package Picard-tools_. 58 @more_info@
76
77 .. _Picard-tools: http://www.google.com/search?q=picard+samtools
78
79 ------
80
81 .. class:: infomark
82
83 **Inputs and outputs**
84
85 Either a sam file or a bam file is required as the file whose header will be replaced.
86 The header file is also required and can also be either sam or bam (it does not have
87 to be the same type as the other file). In both cases, if a bam file is used, it must
88 be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
89
90 The tool will output either bam (the default) or sam. Bam is recommended since it is smaller.
91
92 .. class:: warningmark
93
94 **Warning on SAM/BAM quality**
95
96 Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT**
97 flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
98 to be the only way to deal with SAM/BAM that cannot be parsed.
99
100
101 59
102 </help> 60 </help>
103 </tool> 61 </tool>
104 62
105 63
106
107
108
109
110
111
112
113
114
115