Mercurial > repos > devteam > picard
annotate picard_SamToFastq.xml @ 5:3d4f1fa26f0e draft
Uploaded
author | devteam |
---|---|
date | Tue, 16 Dec 2014 19:03:21 -0500 |
parents | 9227b8c3093b |
children | 3a3234d7a2e8 |
rev | line source |
---|---|
5 | 1 <tool name="SamToFastq" id="picard_SamToFastq" version="1.126.0"> |
2 <description>extract reads and qualities from SAM/BAM dataset and convert to fastq</description> | |
3 <requirements> | |
4 <requirement type="package" version="1.126.0">picard</requirement> | |
5 </requirements> | |
6 | |
7 <macros> | |
8 <import>picard_macros.xml</import> | |
9 </macros> | |
10 | |
11 <command> | |
12 | |
13 echo "BAM" > $report && ## This is necessary for output dataset detection (see output tags below) | |
14 | |
15 @java_options@ | |
16 | |
17 java -jar \$JAVA_JAR_PATH/picard.jar | |
18 SamToFastq | |
19 | |
20 INPUT="${inputFile}" | |
21 | |
22 #if str( $output_per_rg ) == "true": | |
23 OUTPUT_PER_RG=true | |
24 OUTPUT_DIR=. | |
25 #elif str( $output_per_rg ) == "false" and str( $interleave ) == "false": | |
26 FASTQ=READ1.fastq | |
27 SECOND_END_FASTQ=READ2.fastq | |
28 UNPAIRED_FASTQ=UNPAIRED_READS.fastq | |
29 #elif str( $output_per_rg ) == "false" and str( $interleave ) == "true": | |
30 FASTQ=INTERLEAVED.fastq | |
31 #end if | |
32 | |
2
9227b8c3093b
Updated command line format per dev team standards.
devteam <devteam@galaxyproject.org>
parents:
0
diff
changeset
|
33 RE_REVERSE="${re_reverse}" |
5 | 34 INTERLEAVE="${interleave}" |
2
9227b8c3093b
Updated command line format per dev team standards.
devteam <devteam@galaxyproject.org>
parents:
0
diff
changeset
|
35 INCLUDE_NON_PF_READS="${include_non_pf_reads}" |
5 | 36 CLIPPING_ATTRIBUTE="${clipping_attribute}" |
37 CLIPPING_ACTION="${clipping_action}" | |
38 READ1_TRIM="${read1_trim}" | |
39 | |
40 #if int($read1_max_bases_to_write) > -1: | |
41 READ1_MAX_BASES_TO_WRITE="${read1_max_bases_to_write}" | |
0 | 42 #end if |
5 | 43 |
44 READ2_TRIM="${read2_trim}" | |
45 | |
46 #if int($read2_max_bases_to_write) > -1: | |
47 READ2_MAX_BASES_TO_WRITE="${read2_max_bases_to_write}" | |
0 | 48 #end if |
5 | 49 |
2
9227b8c3093b
Updated command line format per dev team standards.
devteam <devteam@galaxyproject.org>
parents:
0
diff
changeset
|
50 INCLUDE_NON_PRIMARY_ALIGNMENTS="${include_non_primary_alignments}" |
0 | 51 |
5 | 52 |
53 VALIDATION_STRINGENCY="${validation_stringency}" | |
54 QUIET=true | |
55 VERBOSITY=ERROR | |
56 | |
0 | 57 </command> |
58 <inputs> | |
59 | |
5 | 60 <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"/> |
61 <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"/> | |
62 <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"/> | |
63 <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"/> | |
64 <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"/> | |
65 <param name="clipping_attribute" type="text" size="4" value="null" label="The attribute that stores the position at which the SAM/BAM record should be clipped" help="CLIPPING_ATTRIBUTE; default=null"/> | |
66 <param name="clipping_action" type="text" size="10" value="null" label="The action that should be taken with clipped reads: 'X' means the reads and qualities should be trimmed at the clipped position; 'N' means the bases should be changed to Ns in the clipped region; and any integer means that the base qualities should be set to that value in the clipped region" help="CLIPPING_ACTION; default=null"/> | |
67 <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"/> | |
68 <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)"/> | |
69 <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"/> | |
70 <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)"/> | |
71 <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"/> | |
72 | |
73 <expand macro="VS" /> | |
74 | |
75 </inputs> | |
76 | |
0 | 77 <outputs> |
5 | 78 <!-- here dataset discovery is based on fact that if OUTPUT_PER_RG=true this tool automatically adds .fastq extension to emitted files --> |
79 <data format="txt" name="report" label="SamToFastq run" hidden="true"> | |
80 <discover_datasets pattern="(?P<designation>.+)\.fastq" ext="fastqsanger" visible="true"/> | |
0 | 81 </data> |
82 </outputs> | |
5 | 83 |
0 | 84 <tests> |
5 | 85 <test> |
86 <param name="inputFile" value="picard_SamToFastq.bam" ftype="bam"/> | |
87 <param name="output_per_rg" value="false"/> | |
88 <param name="re_reverse" value="true"/> | |
89 <param name="interleave" value="true"/> | |
90 <param name="include_non_pf_reads" value="false"/> | |
91 <param name="clipping_attribute" value="null" /> | |
92 <param name="clipping_action" value="null" /> | |
93 <param name="read1_trim" value="0" /> | |
94 <param name="read1_max_bases_to_write" value="-1"/> | |
95 <param name="read2_trim" value="0" /> | |
96 <param name="read2_max_bases_to_write" value="-1"/> | |
97 <param name="include_non_primary_alignments" value="false"/> | |
98 <output name="report"> | |
99 <assert_contents> | |
100 <has_line line="BAM" /> | |
101 </assert_contents> | |
102 <discovered_dataset designation="INTERLEAVED" file="picard_SamToFastq_test1.fq" ftype="fastqsanger"/> | |
103 </output> | |
104 </test> | |
0 | 105 </tests> |
5 | 106 |
107 <stdio> | |
108 <exit_code range="1:" level="fatal"/> | |
109 </stdio> | |
110 | |
0 | 111 <help> |
112 | |
5 | 113 **Purpose** |
0 | 114 |
5 | 115 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. |
0 | 116 |
5 | 117 ----- |
0 | 118 |
5 | 119 .. class:: warningmark |
0 | 120 |
5 | 121 **DANGER: Multiple Outputs** |
0 | 122 |
5 | 123 Generating per readgroup fastq (setting **OUTPUT_PER_RG** to True) may produce very large numbers of outputs. Know what you are doing! |
0 | 124 |
5 | 125 @dataset_collections@ |
0 | 126 |
5 | 127 @description@ |
0 | 128 |
5 | 129 FASTQ=File |
130 F=File Output fastq file (single-end fastq or, if paired, first end of the pair fastq). | |
131 Required. Cannot be used in conjuction with option(s) OUTPUT_PER_RG (OPRG) | |
132 | |
133 SECOND_END_FASTQ=File | |
134 F2=File Output fastq file (if paired, second end of the pair fastq). Default value: null. | |
135 Cannot be used in conjuction with option(s) OUTPUT_PER_RG (OPRG) | |
136 | |
137 UNPAIRED_FASTQ=File | |
138 FU=File Output fastq file for unpaired reads; may only be provided in paired-fastq mode Default | |
139 value: null. Cannot be used in conjuction with option(s) OUTPUT_PER_RG (OPRG) | |
140 | |
141 OUTPUT_PER_RG=Boolean | |
142 OPRG=Boolean Output a fastq file per read group (two fastq files per read group if the group is | |
143 paired). Default value: false. Possible values: {true, false} Cannot be used in | |
144 conjuction with option(s) SECOND_END_FASTQ (F2) UNPAIRED_FASTQ (FU) FASTQ (F) | |
145 | |
146 OUTPUT_DIR=File | |
147 ODIR=File Directory in which to output the fastq file(s). Used only when OUTPUT_PER_RG is true. | |
148 Default value: null. | |
149 | |
150 RE_REVERSE=Boolean | |
151 RC=Boolean Re-reverse bases and qualities of reads with negative strand flag set before writing them | |
152 to fastq Default value: true. Possible values: {true, false} | |
153 | |
154 INTERLEAVE=Boolean | |
155 INTER=Boolean Will generate an interleaved fastq if paired, each line will have /1 or /2 to describe | |
156 which end it came from Default value: false. Possible values: {true, false} | |
157 | |
158 INCLUDE_NON_PF_READS=Boolean | |
159 NON_PF=Boolean Include non-PF reads from the SAM file into the output FASTQ files. PF means 'passes | |
160 filtering'. Reads whose 'not passing quality controls' flag is set are non-PF reads. | |
161 Default value: false. Possible values: {true, false} | |
0 | 162 |
5 | 163 CLIPPING_ATTRIBUTE=String |
164 CLIP_ATTR=String The attribute that stores the position at which the SAM record should be clipped Default | |
165 value: null. | |
166 | |
167 CLIPPING_ACTION=String | |
168 CLIP_ACT=String The action that should be taken with clipped reads: 'X' means the reads and qualities | |
169 should be trimmed at the clipped position; 'N' means the bases should be changed to Ns in | |
170 the clipped region; and any integer means that the base qualities should be set to that | |
171 value in the clipped region. Default value: null. | |
172 | |
173 READ1_TRIM=Integer | |
174 R1_TRIM=Integer The number of bases to trim from the beginning of read 1. Default value: 0. | |
175 | |
176 READ1_MAX_BASES_TO_WRITE=Integer | |
177 R1_MAX_BASES=Integer The maximum number of bases to write from read 1 after trimming. If there are fewer than | |
178 this many bases left after trimming, all will be written. If this value is null then all | |
179 bases left after trimming will be written. Default value: null. | |
180 | |
181 READ2_TRIM=Integer | |
182 R2_TRIM=Integer The number of bases to trim from the beginning of read 2. Default value: 0. | |
183 | |
184 READ2_MAX_BASES_TO_WRITE=Integer | |
185 R2_MAX_BASES=Integer The maximum number of bases to write from read 2 after trimming. If there are fewer than | |
186 this many bases left after trimming, all will be written. If this value is null then all | |
187 bases left after trimming will be written. Default value: null. | |
188 | |
189 INCLUDE_NON_PRIMARY_ALIGNMENTS=Boolean | |
190 If true, include non-primary alignments in the output. Support of non-primary alignments | |
191 in SamToFastq is not comprehensive, so there may be exceptions if this is set to true and | |
192 there are paired reads with non-primary alignments. Default value: false. | |
193 Possible values: {true, false} | |
194 | |
195 @more_info@ | |
0 | 196 |
197 </help> | |
198 </tool> | |
5 | 199 |
200 |