0
|
1 <tool name="ReplaceSamHeader" id="picard_ReplaceSamHeader" version="1.122.0">
|
|
2 <description>replace header in a SAM/BAM dataset</description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="1.122.0">picard</requirement>
|
|
5 </requirements>
|
|
6
|
|
7 <macros>
|
|
8 <import>picard_macros.xml</import>
|
|
9 </macros>
|
|
10
|
|
11 <command>
|
|
12 @java_options@
|
|
13
|
|
14
|
|
15 ## Two lines below are due to the fact that picard likes fasta files to have extension .fa
|
|
16 #set $fasta_file="local_fasta.fa"
|
|
17 ln -s "${inputFile}" "${fasta_file}" &&
|
|
18
|
|
19 java -jar \$JAVA_JAR_PATH/ReplaceSamHeader.jar
|
|
20
|
|
21 INPUT="${inputFile}"
|
|
22 HEADER="${header}"
|
|
23 OUTPUT="${outFile}"
|
|
24
|
|
25 QUIET=true
|
|
26 VERBOSITY=ERROR
|
|
27
|
|
28 </command>
|
|
29 <inputs>
|
|
30 <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"/>
|
|
31 <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"/>
|
|
32 </inputs>
|
|
33
|
|
34 <outputs>
|
|
35 <data format="bam" name="outFile" label="${tool.name} on ${on_string}: BAM file with replaced header"/>
|
|
36 </outputs>
|
|
37
|
|
38 <tests>
|
|
39 <test>
|
|
40 <param name="inputFile" value="picard_ReplaceSamHeader.bam" ftype="bam"/>
|
|
41 <param name="header" value="picard_ReplaceSamHeader_header.bam" ftype="bam"/>
|
|
42 <output name="outFile" file="picard_ReplaceSamHeader_test1.bam" ftype="bam"/>
|
|
43 </test>
|
|
44 </tests>
|
|
45
|
|
46 <stdio>
|
|
47 <exit_code range="1:" level="fatal"/>
|
|
48 </stdio>
|
|
49
|
|
50 <help>
|
|
51
|
|
52 **Purpose**
|
|
53
|
|
54 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.
|
|
55 @dataset_collections@
|
|
56
|
|
57 @description@
|
|
58
|
|
59 HEADER=File SAM file from which SAMFileHeader will be read. Required.
|
|
60
|
|
61 @more_info@
|
|
62
|
|
63 </help>
|
|
64 </tool>
|
|
65
|
|
66
|