comparison picard_SamToFastq.xml @ 13:7e6fd3d0f16e draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/picard commit bf94a1505c131fb3f67c867b6e1d886780efa42e
author devteam
date Tue, 06 Dec 2016 10:04:41 -0500
parents 05087b27692a
children 465cbb0cf2eb
comparison
equal deleted inserted replaced
12:05087b27692a 13:7e6fd3d0f16e
3 <macros> 3 <macros>
4 <import>picard_macros.xml</import> 4 <import>picard_macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements" /> 6 <expand macro="requirements" />
7 <command detect_errors="exit_code"><![CDATA[ 7 <command detect_errors="exit_code"><![CDATA[
8 8
9 echo "BAM" > $report && ## This is necessary for output dataset detection (see output tags below) 9 echo "BAM" > $report && ## This is necessary for output dataset detection (see output tags below)
10 10
11 @java_options@ 11 @java_options@
12 12 @symlink_element_identifier@
13
13 picard 14 picard
14 SamToFastq 15 SamToFastq
15 16
16 INPUT="${inputFile}" 17 INPUT='$inputFile.element_identifier'
17 18
18 #if str( $output_per_rg ) == "true": 19 #if str( $output_per_rg ) == "true":
19 OUTPUT_PER_RG=true 20 OUTPUT_PER_RG=true
20 OUTPUT_DIR=. 21 OUTPUT_DIR=.
21 #elif str( $output_per_rg ) == "false" and str( $interleave ) == "false": 22 #elif str( $output_per_rg ) == "false" and str( $interleave ) == "false":
22 FASTQ=READ1.fastq 23 FASTQ=READ1.fastq
23 SECOND_END_FASTQ=READ2.fastq 24 SECOND_END_FASTQ=READ2.fastq
24 UNPAIRED_FASTQ=UNPAIRED_READS.fastq 25 UNPAIRED_FASTQ=UNPAIRED_READS.fastq
25 #elif str( $output_per_rg ) == "false" and str( $interleave ) == "true": 26 #elif str( $output_per_rg ) == "false" and str( $interleave ) == "true":
26 FASTQ=INTERLEAVED.fastq 27 FASTQ=INTERLEAVED.fastq
27 #end if 28 #end if
28 29
29 RE_REVERSE="${re_reverse}" 30 RE_REVERSE="${re_reverse}"
30 INTERLEAVE="${interleave}" 31 INTERLEAVE="${interleave}"
31 INCLUDE_NON_PF_READS="${include_non_pf_reads}" 32 INCLUDE_NON_PF_READS="${include_non_pf_reads}"
32 CLIPPING_ATTRIBUTE="${clipping_attribute}" 33 CLIPPING_ATTRIBUTE="${clipping_attribute}"
33 CLIPPING_ACTION="${clipping_action}" 34 CLIPPING_ACTION="${clipping_action}"
34 READ1_TRIM="${read1_trim}" 35 READ1_TRIM="${read1_trim}"
35 36
36 #if int($read1_max_bases_to_write) > -1: 37 #if int($read1_max_bases_to_write) > -1:
37 READ1_MAX_BASES_TO_WRITE="${read1_max_bases_to_write}" 38 READ1_MAX_BASES_TO_WRITE="${read1_max_bases_to_write}"
38 #end if 39 #end if
39 40
40 READ2_TRIM="${read2_trim}" 41 READ2_TRIM="${read2_trim}"
41 42
42 #if int($read2_max_bases_to_write) > -1: 43 #if int($read2_max_bases_to_write) > -1:
43 READ2_MAX_BASES_TO_WRITE="${read2_max_bases_to_write}" 44 READ2_MAX_BASES_TO_WRITE="${read2_max_bases_to_write}"
44 #end if 45 #end if
45 46
46 INCLUDE_NON_PRIMARY_ALIGNMENTS="${include_non_primary_alignments}" 47 INCLUDE_NON_PRIMARY_ALIGNMENTS="${include_non_primary_alignments}"
47 48
48 49
49 VALIDATION_STRINGENCY="${validation_stringency}" 50 VALIDATION_STRINGENCY="${validation_stringency}"
50 QUIET=true 51 QUIET=true
51 VERBOSITY=ERROR 52 VERBOSITY=ERROR
52 53
53 ]]></command> 54 ]]></command>
54 <inputs> 55 <inputs>
55 56
56 <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"/> 57 <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"/>
57 <param name="output_per_rg" type="boolean" checked="False" label="Do you want to output a fastq file per read group (two fastq files per read group if the group is paired)" help="OUTPUT_PER_RG; default=False"/> 58 <param name="output_per_rg" type="boolean" checked="False" label="Do you want to output a fastq file per read group (two fastq files per read group if the group is paired)" help="OUTPUT_PER_RG; default=False"/>
58 <param name="re_reverse" type="boolean" checked="True" label="Re-reverse bases and qualities of reads with negative strand flag set before writing them to fastq" help="RE_REVERSE; default=True"/> 59 <param name="re_reverse" type="boolean" checked="True" label="Re-reverse bases and qualities of reads with negative strand flag set before writing them to fastq" help="RE_REVERSE; default=True"/>
59 <param name="interleave" type="boolean" label="Will generate an interleaved fastq if paired, each line will have /1 or /2 to describe which end it came from" help="INTERLEAVE; default=False"/> 60 <param name="interleave" type="boolean" label="Will generate an interleaved fastq if paired, each line will have /1 or /2 to describe which end it came from" help="INTERLEAVE; default=False"/>
60 <param name="include_non_pf_reads" type="boolean" label="Include non-PF reads from the SAM/BAM dataset into the output FASTQ" help="INCLUDE_NON_PF_READS; PF means 'passes filtering'. Reads whose 'not passing quality controls' flag is set are non-PF reads; default=False"/> 61 <param name="include_non_pf_reads" type="boolean" label="Include non-PF reads from the SAM/BAM dataset into the output FASTQ" help="INCLUDE_NON_PF_READS; PF means 'passes filtering'. Reads whose 'not passing quality controls' flag is set are non-PF reads; default=False"/>
63 <param name="read1_trim" type="integer" value="0" min="0" label="The number of bases to trim from the beginning of read 1" help="READ1_TRIM; default=0"/> 64 <param name="read1_trim" type="integer" value="0" min="0" label="The number of bases to trim from the beginning of read 1" help="READ1_TRIM; default=0"/>
64 <param name="read1_max_bases_to_write" type="integer" value="-1" label="The maximum number of bases to write from read 1 after trimming" help="READ1_MAX_BASES_TO_WRITE; If there are fewer than this many bases left after trimming, all will be written. If this value is null then all bases left after trimming will be written; default=null (-1)"/> 65 <param name="read1_max_bases_to_write" type="integer" value="-1" label="The maximum number of bases to write from read 1 after trimming" help="READ1_MAX_BASES_TO_WRITE; If there are fewer than this many bases left after trimming, all will be written. If this value is null then all bases left after trimming will be written; default=null (-1)"/>
65 <param name="read2_trim" type="integer" value="0" min="0" label="The number of bases to trim from the beginning of read 2" help="READ2_TRIM; default=0"/> 66 <param name="read2_trim" type="integer" value="0" min="0" label="The number of bases to trim from the beginning of read 2" help="READ2_TRIM; default=0"/>
66 <param name="read2_max_bases_to_write" type="integer" value="-1" label="The maximum number of bases to write from read 2 after trimming" help="READ2_MAX_BASES_TO_WRITE; If there are fewer than this many bases left after trimming, all will be written. If this value is null then all bases left after trimming will be written; default=null (-1)"/> 67 <param name="read2_max_bases_to_write" type="integer" value="-1" label="The maximum number of bases to write from read 2 after trimming" help="READ2_MAX_BASES_TO_WRITE; If there are fewer than this many bases left after trimming, all will be written. If this value is null then all bases left after trimming will be written; default=null (-1)"/>
67 <param name="include_non_primary_alignments" type="boolean" label="If true, include non-primary alignments in the output" help="INCLUDE_NON_PRIMARY_ALIGNMENTS; Support of non-primary alignments in SamToFastq is not comprehensive, so there may be exceptions if this is set to true and there are paired reads with non-primary alignments; default=False"/> 68 <param name="include_non_primary_alignments" type="boolean" label="If true, include non-primary alignments in the output" help="INCLUDE_NON_PRIMARY_ALIGNMENTS; Support of non-primary alignments in SamToFastq is not comprehensive, so there may be exceptions if this is set to true and there are paired reads with non-primary alignments; default=False"/>
68 69
69 <expand macro="VS" /> 70 <expand macro="VS" />
70 71
71 </inputs> 72 </inputs>
72 73
73 <outputs> 74 <outputs>
74 <!-- here dataset discovery is based on fact that if OUTPUT_PER_RG=true this tool automatically adds .fastq extension to emitted files --> 75 <!-- here dataset discovery is based on fact that if OUTPUT_PER_RG=true this tool automatically adds .fastq extension to emitted files -->
75 <data format="txt" name="report" label="SamToFastq run" hidden="true"> 76 <data format="txt" name="report" label="SamToFastq run" hidden="true">
76 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.fastq" ext="fastqsanger" visible="true"/> 77 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.fastq" ext="fastqsanger" visible="true"/>
77 </data> 78 </data>
78 </outputs> 79 </outputs>
79 80
80 <tests> 81 <tests>
81 <test> 82 <test>
82 <param name="inputFile" value="picard_SamToFastq.bam" ftype="bam"/> 83 <param name="inputFile" value="picard_SamToFastq.bam" ftype="bam"/>
83 <param name="output_per_rg" value="false"/> 84 <param name="output_per_rg" value="false"/>
84 <param name="re_reverse" value="true"/> 85 <param name="re_reverse" value="true"/>
88 <param name="clipping_action" value="null" /> 89 <param name="clipping_action" value="null" />
89 <param name="read1_trim" value="0" /> 90 <param name="read1_trim" value="0" />
90 <param name="read1_max_bases_to_write" value="-1"/> 91 <param name="read1_max_bases_to_write" value="-1"/>
91 <param name="read2_trim" value="0" /> 92 <param name="read2_trim" value="0" />
92 <param name="read2_max_bases_to_write" value="-1"/> 93 <param name="read2_max_bases_to_write" value="-1"/>
93 <param name="include_non_primary_alignments" value="false"/> 94 <param name="include_non_primary_alignments" value="false"/>
94 <output name="report"> 95 <output name="report">
95 <assert_contents> 96 <assert_contents>
96 <has_line line="BAM" /> 97 <has_line line="BAM" />
97 </assert_contents> 98 </assert_contents>
98 <discovered_dataset designation="INTERLEAVED" file="picard_SamToFastq_test1.fq" ftype="fastqsanger"/> 99 <discovered_dataset designation="INTERLEAVED" file="picard_SamToFastq_test1.fq" ftype="fastqsanger"/>
99 </output> 100 </output>
100 </test> 101 </test>
101 </tests> 102 </tests>
102 103
103 104
104 <help> 105 <help>
105 106
106 **Purpose** 107 **Purpose**
107 108
108 Extracts read sequences and qualities from the input SAM/BAM dataset and outputs them in Sanger fastq format. In the RE_REVERSE=True mode (default behavior), if the read is aligned and the alignment is to the reverse strand on the genome, the read's sequence from input SAM.BAM dataset will be reverse-complemented prior to writing it to fastq in order restore correctly the original read sequence as it was generated by the sequencer. 109 Extracts read sequences and qualities from the input SAM/BAM dataset and outputs them in Sanger fastq format. In the RE_REVERSE=True mode (default behavior), if the read is aligned and the alignment is to the reverse strand on the genome, the read's sequence from input SAM.BAM dataset will be reverse-complemented prior to writing it to fastq in order restore correctly the original read sequence as it was generated by the sequencer.
118 @dataset_collections@ 119 @dataset_collections@
119 120
120 @description@ 121 @description@
121 122
122 FASTQ=File 123 FASTQ=File
123 F=File Output fastq file (single-end fastq or, if paired, first end of the pair fastq). 124 F=File Output fastq file (single-end fastq or, if paired, first end of the pair fastq).
124 Required. Cannot be used in conjuction with option(s) OUTPUT_PER_RG (OPRG) 125 Required. Cannot be used in conjuction with option(s) OUTPUT_PER_RG (OPRG)
125 126
126 SECOND_END_FASTQ=File 127 SECOND_END_FASTQ=File
127 F2=File Output fastq file (if paired, second end of the pair fastq). Default value: null. 128 F2=File Output fastq file (if paired, second end of the pair fastq). Default value: null.
128 Cannot be used in conjuction with option(s) OUTPUT_PER_RG (OPRG) 129 Cannot be used in conjuction with option(s) OUTPUT_PER_RG (OPRG)
129 130
130 UNPAIRED_FASTQ=File 131 UNPAIRED_FASTQ=File
131 FU=File Output fastq file for unpaired reads; may only be provided in paired-fastq mode Default 132 FU=File Output fastq file for unpaired reads; may only be provided in paired-fastq mode Default
132 value: null. Cannot be used in conjuction with option(s) OUTPUT_PER_RG (OPRG) 133 value: null. Cannot be used in conjuction with option(s) OUTPUT_PER_RG (OPRG)
133 134
134 OUTPUT_PER_RG=Boolean 135 OUTPUT_PER_RG=Boolean
135 OPRG=Boolean Output a fastq file per read group (two fastq files per read group if the group is 136 OPRG=Boolean Output a fastq file per read group (two fastq files per read group if the group is
136 paired). Default value: false. Possible values: {true, false} Cannot be used in 137 paired). Default value: false. Possible values: {true, false} Cannot be used in
137 conjuction with option(s) SECOND_END_FASTQ (F2) UNPAIRED_FASTQ (FU) FASTQ (F) 138 conjuction with option(s) SECOND_END_FASTQ (F2) UNPAIRED_FASTQ (FU) FASTQ (F)
138 139
139 OUTPUT_DIR=File 140 OUTPUT_DIR=File
140 ODIR=File Directory in which to output the fastq file(s). Used only when OUTPUT_PER_RG is true. 141 ODIR=File Directory in which to output the fastq file(s). Used only when OUTPUT_PER_RG is true.
141 Default value: null. 142 Default value: null.
142 143
143 RE_REVERSE=Boolean 144 RE_REVERSE=Boolean
144 RC=Boolean Re-reverse bases and qualities of reads with negative strand flag set before writing them 145 RC=Boolean Re-reverse bases and qualities of reads with negative strand flag set before writing them
145 to fastq Default value: true. Possible values: {true, false} 146 to fastq Default value: true. Possible values: {true, false}
146 147
147 INTERLEAVE=Boolean 148 INTERLEAVE=Boolean
148 INTER=Boolean Will generate an interleaved fastq if paired, each line will have /1 or /2 to describe 149 INTER=Boolean Will generate an interleaved fastq if paired, each line will have /1 or /2 to describe
149 which end it came from Default value: false. Possible values: {true, false} 150 which end it came from Default value: false. Possible values: {true, false}
150 151
151 INCLUDE_NON_PF_READS=Boolean 152 INCLUDE_NON_PF_READS=Boolean
152 NON_PF=Boolean Include non-PF reads from the SAM file into the output FASTQ files. PF means 'passes 153 NON_PF=Boolean Include non-PF reads from the SAM file into the output FASTQ files. PF means 'passes
153 filtering'. Reads whose 'not passing quality controls' flag is set are non-PF reads. 154 filtering'. Reads whose 'not passing quality controls' flag is set are non-PF reads.
154 Default value: false. Possible values: {true, false} 155 Default value: false. Possible values: {true, false}
155 156
156 CLIPPING_ATTRIBUTE=String 157 CLIPPING_ATTRIBUTE=String
157 CLIP_ATTR=String The attribute that stores the position at which the SAM record should be clipped Default 158 CLIP_ATTR=String The attribute that stores the position at which the SAM record should be clipped Default
158 value: null. 159 value: null.
159 160
160 CLIPPING_ACTION=String 161 CLIPPING_ACTION=String
161 CLIP_ACT=String The action that should be taken with clipped reads: 'X' means the reads and qualities 162 CLIP_ACT=String The action that should be taken with clipped reads: 'X' means the reads and qualities
162 should be trimmed at the clipped position; 'N' means the bases should be changed to Ns in 163 should be trimmed at the clipped position; 'N' means the bases should be changed to Ns in
163 the clipped region; and any integer means that the base qualities should be set to that 164 the clipped region; and any integer means that the base qualities should be set to that
164 value in the clipped region. Default value: null. 165 value in the clipped region. Default value: null.
165 166
166 READ1_TRIM=Integer 167 READ1_TRIM=Integer
167 R1_TRIM=Integer The number of bases to trim from the beginning of read 1. Default value: 0. 168 R1_TRIM=Integer The number of bases to trim from the beginning of read 1. Default value: 0.
168 169
169 READ1_MAX_BASES_TO_WRITE=Integer 170 READ1_MAX_BASES_TO_WRITE=Integer
170 R1_MAX_BASES=Integer The maximum number of bases to write from read 1 after trimming. If there are fewer than 171 R1_MAX_BASES=Integer The maximum number of bases to write from read 1 after trimming. If there are fewer than
171 this many bases left after trimming, all will be written. If this value is null then all 172 this many bases left after trimming, all will be written. If this value is null then all
172 bases left after trimming will be written. Default value: null. 173 bases left after trimming will be written. Default value: null.
173 174
174 READ2_TRIM=Integer 175 READ2_TRIM=Integer
175 R2_TRIM=Integer The number of bases to trim from the beginning of read 2. Default value: 0. 176 R2_TRIM=Integer The number of bases to trim from the beginning of read 2. Default value: 0.
176 177
177 READ2_MAX_BASES_TO_WRITE=Integer 178 READ2_MAX_BASES_TO_WRITE=Integer
178 R2_MAX_BASES=Integer The maximum number of bases to write from read 2 after trimming. If there are fewer than 179 R2_MAX_BASES=Integer The maximum number of bases to write from read 2 after trimming. If there are fewer than
179 this many bases left after trimming, all will be written. If this value is null then all 180 this many bases left after trimming, all will be written. If this value is null then all
180 bases left after trimming will be written. Default value: null. 181 bases left after trimming will be written. Default value: null.
181 182
182 INCLUDE_NON_PRIMARY_ALIGNMENTS=Boolean 183 INCLUDE_NON_PRIMARY_ALIGNMENTS=Boolean
183 If true, include non-primary alignments in the output. Support of non-primary alignments 184 If true, include non-primary alignments in the output. Support of non-primary alignments
184 in SamToFastq is not comprehensive, so there may be exceptions if this is set to true and 185 in SamToFastq is not comprehensive, so there may be exceptions if this is set to true and
185 there are paired reads with non-primary alignments. Default value: false. 186 there are paired reads with non-primary alignments. Default value: false.
186 Possible values: {true, false} 187 Possible values: {true, false}
187 188
188 @more_info@ 189 @more_info@
189 190
190 </help> 191 </help>
191 </tool> 192 </tool>
192 193