5
|
1 <tool name="ReorderSam" id="picard_ReorderSam" version="1.126.0">
|
|
2 <description>reorder reads to match ordering in reference sequences</description>
|
|
3 <requirements><requirement type="package" version="1.126.0">picard</requirement></requirements>
|
|
4
|
|
5 <macros>
|
|
6 <import>picard_macros.xml</import>
|
|
7 </macros>
|
|
8
|
|
9 <command>
|
|
10 @java_options@
|
|
11 #set $picard_dict = "localref.dict"
|
|
12 #set $ref_fasta = "localref.fa" ## This is done because picards "likes" .fa extension
|
|
13
|
|
14 ln -s "${reference_source.ref_file}" "${ref_fasta}" &&
|
|
15
|
|
16 #if str( $reference_source.reference_source_selector ) == "history":
|
|
17
|
|
18 java -jar \$JAVA_JAR_PATH/picard.jar CreateSequenceDictionary REFERENCE="${ref_fasta}" OUTPUT="${picard_dict}"
|
|
19 QUIET=true
|
|
20 VERBOSITY=ERROR
|
|
21
|
|
22 &&
|
|
23
|
|
24 #else:
|
|
25
|
|
26 #set $ref_fasta = str( $reference_source.ref_file.fields.path )
|
|
27
|
|
28 #end if
|
|
29
|
|
30 java -jar \$JAVA_JAR_PATH/picard.jar
|
|
31 ReorderSam
|
|
32 INPUT="${inputFile}"
|
|
33 OUTPUT="${outFile}"
|
|
34 REFERENCE="${ref_fasta}"
|
|
35 ALLOW_INCOMPLETE_DICT_CONCORDANCE="${allow_incomplete_dict_concordance}"
|
|
36 ALLOW_CONTIG_LENGTH_DISCORDANCE="${allow_contig_length_discordance}"
|
|
37
|
|
38 VALIDATION_STRINGENCY="${validation_stringency}"
|
|
39 QUIET=true
|
|
40 VERBOSITY=ERROR
|
|
41
|
0
|
42 </command>
|
5
|
43
|
0
|
44 <inputs>
|
5
|
45
|
|
46 <conditional name="reference_source">
|
|
47 <param name="reference_source_selector" type="select" label="Load reference genome from">
|
|
48 <option value="cached">Local cache</option>
|
0
|
49 <option value="history">History</option>
|
|
50 </param>
|
5
|
51 <when value="cached">
|
|
52 <param name="ref_file" type="select" label="Use dictionary from the list" help="Select genome from the list">
|
|
53 <options from_data_table="picard_indexes">
|
|
54 <filter type="sort_by" column="2" />
|
|
55 <validator type="no_options" message="No indexes are available" />
|
|
56 </options>
|
|
57 <validator type="no_options" message="A built-in dictionary is not available for the build associated with the selected input file"/>
|
0
|
58 </param>
|
|
59 </when>
|
5
|
60 <when value="history">
|
|
61 <param name="ref_file" type="data" format="fasta" label="Use the following dataset to create dictionary" help="You can upload a FASTA sequence to the history from which Picard will automatically generate dictionary using CreateSequenceDictionary command" />
|
0
|
62 </when>
|
|
63 </conditional>
|
5
|
64
|
|
65 <param format="sam,bam" name="inputFile" type="data" label="Select SAM/BAM dataset or dataset collection" help="If empty, upload or import a SAM/BAM dataset"/>
|
|
66 <param name="allow_incomplete_dict_concordance" type="boolean" label="If true, then allows only a partial overlap of the BAM contigs with the new reference sequence contigs" help="ALLOW_INCOMPLETE_DICT_CONCORDANCE; By default, this tool requires a corresponding contig in the new reference for each read contig; default=False"/>
|
|
67 <param name="allow_contig_length_discordance" type="boolean" label="If true, then permits mapping from a read contig to a new reference contig with the same name but a different length" help="ALLOW_CONTIG_LENGTH_DISCORDANCE; HIGHLY DANGEROUS! Only use if you know what you are doing; default=False"/>
|
|
68 <expand macro="VS" />
|
|
69
|
0
|
70 </inputs>
|
|
71 <outputs>
|
5
|
72 <data name="outFile" format="bam" label="${tool.name} on ${on_string}: Reordered BAM"/>
|
0
|
73 </outputs>
|
|
74 <tests>
|
|
75 <test>
|
5
|
76 <param name="reference_source_selector" value="history" />
|
|
77 <param name="ref_file" value="picard_ReorderSam_ref.fa" ftype="fasta" />
|
|
78 <param name="inputFile" value="picard_ReorderSam.bam" ftype="bam"/>
|
|
79 <param name="allow_incomplete_dict_concordance" value="false"/>
|
|
80 <param name="allow_contig_length_discordance" value="false"/>
|
|
81 <output name="outFile" file="picard_ReorderSam_test1.bam" ftype="bam" lines_diff="2"/>
|
0
|
82 </test>
|
|
83 </tests>
|
5
|
84
|
|
85 <stdio>
|
|
86 <exit_code range="1:" level="fatal"/>
|
|
87 </stdio>
|
|
88
|
0
|
89 <help>
|
|
90
|
|
91 .. class:: infomark
|
|
92
|
|
93 **Purpose**
|
|
94
|
5
|
95 ReorderSam reorders reads in a SAM/BAM file to match the contig ordering in a provided reference file, as determined by exact name matching of contigs. Reads mapped to contigs absent in the new reference are dropped.
|
0
|
96
|
5
|
97 @dataset_collections@
|
0
|
98
|
5
|
99 ----
|
0
|
100
|
|
101 .. class:: warningmark
|
|
102
|
5
|
103 Not to be confused with **SortSam**.
|
|
104
|
|
105 @description@
|
0
|
106
|
5
|
107 ALLOW_INCOMPLETE_DICT_CONCORDANCE=Boolean
|
|
108 S=Boolean If true, then allows only a partial overlap of the BAM contigs with the new reference
|
|
109 sequence contigs. By default, this tool requires a corresponding contig in the new
|
|
110 reference for each read contig Default value: false. Possible values: {true, false}
|
|
111
|
|
112 ALLOW_CONTIG_LENGTH_DISCORDANCE=Boolean
|
|
113 U=Boolean If true, then permits mapping from a read contig to a new reference contig with the same
|
|
114 name but a different length. Highly dangerous, only use if you know what you are doing.
|
|
115 Default value: false. Possible values: {true, false}
|
0
|
116
|
5
|
117 @more_info@
|
0
|
118 </help>
|
|
119 </tool>
|
|
120
|
|
121
|
|
122
|
|
123
|
|
124
|
|
125
|
|
126
|
|
127
|
|
128
|
|
129
|
|
130
|
|
131
|
5
|
132
|