annotate picard_ReplaceSamHeader.xml @ 74:7ac57a72687e draft

Deleted selected files
author devteam
date Wed, 19 Feb 2014 23:03:26 -0500
parents c810e9bc55af
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
40
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
1 <tool name="Replace SAM/BAM Header" id="picard_ReplaceSamHeader" version="1.106.0">
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
2 <!-- taken from https://github.com/najoshi/ucd-biocore-galaxy/blob/master/tools/picard/picard_ReplaceSamHeader.xml -->
43
c810e9bc55af Uploaded
devteam
parents: 40
diff changeset
3 <requirements><requirement type="package" version="1.106.0">picard</requirement></requirements>
40
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
4 <command interpreter="python">
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
5 picard_wrapper.py
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
6 --input "$inputFile"
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
7 -o $outFile
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
8 --header-file $headerFile
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
9 --output-format $outputFormat
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
10 -j "\$JAVA_JAR_PATH/ReplaceSamHeader.jar"
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
11 --tmpdir "${__new_file_path__}"
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
12 </command>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
13 <inputs>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
14 <param format="bam,sam" name="inputFile" type="data" label="SAM/BAM dataset to replace header in (TARGET)"
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
15 help="If empty, upload or import a SAM/BAM dataset." />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
16 <param format="bam,sam" name="headerFile" type="data" label="SAM/BAM to reader header from (SOURCE)"
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
17 help="If empty, upload or import a SAM/BAM dataset." />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
18 <param name="outputFormat" type="boolean" checked="True" truevalue="bam" falsevalue="sam" label="Output BAM instead of SAM" help="Uncheck for SAM output" />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
19 </inputs>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
20 <outputs>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
21 <data name="outFile" format="bam" label="${tool.name} on ${on_string}: ${outputFormat} with replaced header">
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
22 <change_format>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
23 <when input="outputFormat" value="sam" format="sam" />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
24 </change_format>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
25 </data>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
26 </outputs>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
27 <tests>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
28 <test>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
29 <!-- Command:
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
30 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
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
31 picard_RSH_input1.bam can be made from picard_RSH_input1.sam
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
32 -->
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
33 <param name="inputFile" value="picard_input_tiny_coord.bam" ftype="bam" />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
34 <param name="headerFile" value="picard_RSH_input1.bam" ftype="bam" />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
35 <param name="outputFormat" value="False" />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
36 <output name="outFile" file="picard_RSH_output1.sam" ftype="sam" />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
37 </test>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
38 <test>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
39 <!-- Command:
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
40 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
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
41 picard_RSH_input1.bam can be made from picard_RSH_input1.sam
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
42 -->
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
43 <param name="inputFile" value="picard_input_tiny_coord.sam" ftype="sam" />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
44 <param name="headerFile" value="picard_RSH_input1.bam" ftype="bam" />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
45 <param name="outputFormat" value="False" />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
46 <output name="outFile" file="picard_RSH_output2.sam" ftype="sam" />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
47 </test>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
48 <test>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
49 <!-- Command:
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
50 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
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
51 -->
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
52 <param name="inputFile" value="picard_input_tiny_coord.sam" ftype="sam" />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
53 <param name="headerFile" value="picard_RSH_input1.sam" ftype="sam" />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
54 <param name="outputFormat" value="True" />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
55 <output name="outFile" file="picard_RSH_output2.bam" ftype="bam" />
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
56 </test>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
57 </tests>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
58 <help>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
59
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
60
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
61 .. class:: infomark
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
62
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
63 **Purpose**
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
64
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
65 Replace Sam Header with the header from another sam file. The tool does not do any
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
66 significant validation, so it's up to the user to make sure that the elements in
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
67 the header are relevant and that the new header has all the required things.
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
68
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
69 Replace the SAMFileHeader in a SAM file with the given header. Validation is
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
70 minimal. It is up to the user to ensure that all the elements referred to in the
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
71 SAMRecords are present in the new header. Sort order of the two input files must
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
72 be the same.
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
73
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
74 **Picard documentation**
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
75
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
76 This is a Galaxy wrapper for ReplaceSamHeader, a part of the external package Picard-tools_.
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
77
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
78 .. _Picard-tools: http://www.google.com/search?q=picard+samtools
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
79
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
80 ------
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
81
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
82 .. class:: infomark
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
83
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
84 **Inputs and outputs**
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
85
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
86 Either a sam file or a bam file is required as the file whose header will be replaced.
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
87 The header file is also required and can also be either sam or bam (it does not have
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
88 to be the same type as the other file). In both cases, if a bam file is used, it must
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
89 be coordinate-sorted. Galaxy currently coordinate-sorts all bam files.
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
90
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
91 The tool will output either bam (the default) or sam. Bam is recommended since it is smaller.
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
92
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
93 .. class:: warningmark
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
94
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
95 **Warning on SAM/BAM quality**
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
96
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
97 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**
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
98 flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
99 to be the only way to deal with SAM/BAM that cannot be parsed.
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
100
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
101
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
102
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
103 </help>
67d9a5a686ec Uploaded
devteam
parents:
diff changeset
104 </tool>