comparison picard_SamToFastq.xml @ 33:3f254c5ced1d draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/picard commit 9ecbbb878d68a980ba35a90865e524c723ca3ed8
author iuc
date Sun, 03 Mar 2024 16:06:11 +0000
parents f9242e01365a
children
comparison
equal deleted inserted replaced
32:f9242e01365a 33:3f254c5ced1d
1 <tool name="SamToFastq" id="picard_SamToFastq" version="@TOOL_VERSION@.@WRAPPER_VERSION@"> 1 <tool name="SamToFastq" id="picard_SamToFastq" version="@TOOL_VERSION@.@WRAPPER_VERSION@" profile="@PROFILE@">
2 <description>extract reads and qualities from SAM/BAM dataset and convert to fastq</description> 2 <description>extract reads and qualities from SAM/BAM dataset and convert to fastq</description>
3 <macros> 3 <macros>
4 <import>picard_macros.xml</import> 4 <import>picard_macros.xml</import>
5 <token name="@WRAPPER_VERSION@">3</token> 5 <token name="@WRAPPER_VERSION@">0</token>
6 </macros> 6 </macros>
7 <xrefs> 7 <xrefs>
8 <xref type="bio.tools">picard_samtofastq</xref> 8 <xref type="bio.tools">picard_samtofastq</xref>
9 </xrefs> 9 </xrefs>
10 <expand macro="requirements" /> 10 <expand macro="requirements"/>
11 <command detect_errors="exit_code"><![CDATA[ 11 <command detect_errors="exit_code"><![CDATA[
12 12
13 @java_options@ 13 @java_options@
14 @symlink_element_identifier@ 14 @symlink_element_identifier@
15 15
16 picard 16 picard SamToFastq
17 SamToFastq 17
18 18 --INPUT '$escaped_element_identifier'
19 INPUT='$escaped_element_identifier'
20 19
21 #if str($single_or_paired) == "pe_interleaved": 20 #if str($single_or_paired) == "pe_interleaved":
22 FASTQ='${interleaved_fastq}' 21 --FASTQ '${interleaved_fastq}'
23 INTERLEAVE=TRUE 22 --INTERLEAVE TRUE
24 #else if str($single_or_paired) == "pe_sep": 23 #else if str($single_or_paired) == "pe_sep":
25 F='${fq1}' 24 --F '${fq1}'
26 F2='${fq2}' 25 --F2 '${fq2}'
27 FU='${fq_u}' 26 --FU '${fq_u}'
28 #else 27 #else
29 F='${fq_single}' 28 --F '${fq_single}'
30 #end if 29 #end if
31 30
32 RE_REVERSE="${re_reverse}" 31 --RE_REVERSE '${re_reverse}'
33 32
34 INCLUDE_NON_PF_READS="${include_non_pf_reads}" 33 -INCLUDE_NON_PF_READS '${include_non_pf_reads}'
35 #if len(str($clipping_attribute)) > 0: 34 #if len(str($clipping_attribute)) > 0:
36 CLIPPING_ATTRIBUTE="${clipping_attribute}" 35 --CLIPPING_ATTRIBUTE '${clipping_attribute}'
37 #end if 36 #end if
38 #if len(str($clipping_action)) > 0: 37 #if len(str($clipping_action)) > 0:
39 CLIPPING_ACTION="${clipping_action}" 38 --CLIPPING_ACTION '${clipping_action}'
40 #end if 39 #end if
41 READ1_TRIM="${read1_trim}" 40 --READ1_TRIM '${read1_trim}'
42 41
43 #if int($read1_max_bases_to_write) > -1: 42 #if int($read1_max_bases_to_write) > -1:
44 READ1_MAX_BASES_TO_WRITE="${read1_max_bases_to_write}" 43 --READ1_MAX_BASES_TO_WRITE '${read1_max_bases_to_write}'
45 #end if 44 #end if
46 45
47 READ2_TRIM="${read2_trim}" 46 --READ2_TRIM '${read2_trim}'
48 47
49 #if int($read2_max_bases_to_write) > -1: 48 #if int($read2_max_bases_to_write) > -1:
50 READ2_MAX_BASES_TO_WRITE="${read2_max_bases_to_write}" 49 --READ2_MAX_BASES_TO_WRITE '${read2_max_bases_to_write}'
51 #end if 50 #end if
52 51
53 INCLUDE_NON_PRIMARY_ALIGNMENTS="${include_non_primary_alignments}" 52 --INCLUDE_NON_PRIMARY_ALIGNMENTS '${include_non_primary_alignments}'
54 53
55 VALIDATION_STRINGENCY="${validation_stringency}" 54 --VALIDATION_STRINGENCY '${validation_stringency}'
56 QUIET=true 55 --QUIET true
57 VERBOSITY=ERROR 56 --VERBOSITY ERROR
58 57
59 ]]></command> 58 ]]></command>
60 <inputs> 59 <inputs>
61 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"/>
62 <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="single_or_paired" type="select" label="Output format">
63 <param name="single_or_paired" type="select" label="Output format"> 62 <option value="se">Single-end</option>
64 <option value="se" >Single-end</option> 63 <option value="pe_interleaved" selected="true">Paired-end (one interleaved output file)</option>
65 <option value="pe_interleaved" selected="true">Paired-end (one interleaved output file)</option> 64 <option value="pe_sep">Paired-end (two separate output files)</option>
66 <option value="pe_sep">Paired-end (two separate output files)</option> 65 </param>
67 </param> 66 <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"/>
68 67 <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"/>
69 <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"/> 68 <param name="clipping_attribute" type="text" value="" label="The attribute that stores the position at which the SAM/BAM record should be clipped" help="CLIPPING_ATTRIBUTE; default=null"/>
70 <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"/> 69 <param name="clipping_action" type="text" value="" 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"/>
71 <param name="clipping_attribute" type="text" value="" label="The attribute that stores the position at which the SAM/BAM record should be clipped" help="CLIPPING_ATTRIBUTE; default=null"/> 70 <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"/>
72 <param name="clipping_action" type="text" value="" 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"/> 71 <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)"/>
73 <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"/> 72 <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"/>
74 <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)"/> 73 <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)"/>
75 <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"/> 74 <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"/>
76 <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)"/> 75 <expand macro="VS"/>
77 <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"/> 76 </inputs>
78 77 <outputs>
79 <expand macro="VS" /> 78 <data format="fastqsanger" name="fq_single" label="${tool.name} on ${on_string}: reads as fastq">
80 79 <filter>output_type['single_or_paired'] == 'se'</filter>
81 </inputs> 80 </data>
82 81 <data format="fastqsanger" name="interleaved_fastq" label="Interleaved pairs from ${tool.name} on ${on_string}">
83 <outputs> 82 <filter>output_type['single_or_paired'] == 'pe_interleaved'</filter>
84 <data format="fastqsanger" name="fq_single" label="${tool.name} on ${on_string}: reads as fastq"> 83 </data>
85 <filter>output_type['single_or_paired'] == 'se'</filter> 84 <data format="fastqsanger" name="fq1" label="Paired-end forward strand from ${tool.name} on ${on_string}">
86 </data> 85 <filter>output_type['single_or_paired'] == 'pe_sep'</filter>
87 86 </data>
88 <data format="fastqsanger" name="interleaved_fastq" label="Interleaved pairs from ${tool.name} on ${on_string}"> 87 <data format="fastqsanger" name="fq2" label="Paired-end reverse strand from ${tool.name} on ${on_string}">
89 <filter>output_type['single_or_paired'] == 'pe_interleaved'</filter> 88 <filter>output_type['single_or_paired'] == 'pe_sep'</filter>
90 </data> 89 </data>
91 90 <data format="fastqsanger" name="fq_u" label="Paired-end unpaired reads from ${tool.name} on ${on_string}">
92 <data format="fastqsanger" name="fq1" label="Paired-end forward strand from ${tool.name} on ${on_string}"> 91 <filter>output_type['single_or_paired'] == 'pe_sep'</filter>
93 <filter>output_type['single_or_paired'] == 'pe_sep'</filter> 92 </data>
94 </data> 93 </outputs>
95 94 <tests>
96 <data format="fastqsanger" name="fq2" label="Paired-end reverse strand from ${tool.name} on ${on_string}"> 95 <test expect_num_outputs="5">
97 <filter>output_type['single_or_paired'] == 'pe_sep'</filter> 96 <param name="inputFile" value="picard_SamToFastq.bam" ftype="bam"/>
98 </data> 97 <param name="single_or_paired" value="pe_interleaved"/>
99 98 <param name="re_reverse" value="true"/>
100 <data format="fastqsanger" name="fq_u" label="Paired-end unpaired reads from ${tool.name} on ${on_string}"> 99 <param name="include_non_pf_reads" value="false"/>
101 <filter>output_type['single_or_paired'] == 'pe_sep'</filter> 100 <param name="clipping_attribute" value=""/>
102 </data> 101 <param name="clipping_action" value=""/>
103 </outputs> 102 <param name="read1_trim" value="0"/>
104 103 <param name="read1_max_bases_to_write" value="-1"/>
105 <tests> 104 <param name="read2_trim" value="0"/>
106 <test expect_num_outputs="5"> 105 <param name="read2_max_bases_to_write" value="-1"/>
107 <param name="inputFile" value="picard_SamToFastq.bam" ftype="bam"/> 106 <param name="include_non_primary_alignments" value="false"/>
108 <param name="single_or_paired" value="pe_interleaved" /> 107 <output name="interleaved_fastq" file="picard_SamToFastq_test1.fq" ftype="fastqsanger"/>
109 <param name="re_reverse" value="true"/> 108 </test>
110 <param name="include_non_pf_reads" value="false"/> 109 <test expect_num_outputs="5">
111 <param name="clipping_attribute" value="" /> 110 <param name="inputFile" value="picard_SamToFastq.bam" ftype="bam"/>
112 <param name="clipping_action" value="" /> 111 <param name="single_or_paired" value="pe_sep"/>
113 <param name="read1_trim" value="0" /> 112 <param name="re_reverse" value="true"/>
114 <param name="read1_max_bases_to_write" value="-1"/> 113 <param name="include_non_pf_reads" value="false"/>
115 <param name="read2_trim" value="0" /> 114 <param name="clipping_attribute" value=""/>
116 <param name="read2_max_bases_to_write" value="-1"/> 115 <param name="clipping_action" value=""/>
117 <param name="include_non_primary_alignments" value="false"/> 116 <param name="read1_trim" value="0"/>
118 <output name="interleaved_fastq" file="picard_SamToFastq_test1.fq" ftype="fastqsanger"/> 117 <param name="read1_max_bases_to_write" value="-1"/>
119 </test> 118 <param name="read2_trim" value="0"/>
120 <test expect_num_outputs="5"> 119 <param name="read2_max_bases_to_write" value="-1"/>
121 <param name="inputFile" value="picard_SamToFastq.bam" ftype="bam"/> 120 <param name="include_non_primary_alignments" value="false"/>
122 <param name="single_or_paired" value="pe_sep" /> 121 <output name="fq1" file="picard_SamToFastq_1.fq" ftype="fastqsanger"/>
123 <param name="re_reverse" value="true"/> 122 <output name="fq2" file="picard_SamToFastq_2.fq" ftype="fastqsanger"/>
124 <param name="include_non_pf_reads" value="false"/> 123 <output name="fq_u" file="picard_SamToFastq_u.fq" ftype="fastqsanger"/>
125 <param name="clipping_attribute" value="" /> 124 </test>
126 <param name="clipping_action" value="" /> 125 <test expect_num_outputs="5">
127 <param name="read1_trim" value="0" /> 126 <param name="inputFile" value="picard_SamToFastq_se.bam" ftype="bam"/>
128 <param name="read1_max_bases_to_write" value="-1"/> 127 <param name="single_or_paired" value="se"/>
129 <param name="read2_trim" value="0" /> 128 <param name="re_reverse" value="true"/>
130 <param name="read2_max_bases_to_write" value="-1"/> 129 <param name="include_non_pf_reads" value="false"/>
131 <param name="include_non_primary_alignments" value="false"/> 130 <param name="clipping_attribute" value=""/>
132 <output name="fq1" file="picard_SamToFastq_1.fq" ftype="fastqsanger"/> 131 <param name="clipping_action" value=""/>
133 <output name="fq2" file="picard_SamToFastq_2.fq" ftype="fastqsanger"/> 132 <param name="read1_trim" value="0"/>
134 <output name="fq_u" file="picard_SamToFastq_u.fq" ftype="fastqsanger"/> 133 <param name="read1_max_bases_to_write" value="-1"/>
135 </test> 134 <param name="read2_trim" value="0"/>
136 <test expect_num_outputs="5"> 135 <param name="read2_max_bases_to_write" value="-1"/>
137 <param name="inputFile" value="picard_SamToFastq_se.bam" ftype="bam"/> 136 <param name="include_non_primary_alignments" value="false"/>
138 <param name="single_or_paired" value="se" /> 137 <output name="fq_single" file="picard_SamToFastq_se.fq" ftype="fastqsanger"/>
139 <param name="re_reverse" value="true"/> 138 </test>
140 <param name="include_non_pf_reads" value="false"/> 139 </tests>
141 <param name="clipping_attribute" value="" /> 140 <help>
142 <param name="clipping_action" value="" />
143 <param name="read1_trim" value="0" />
144 <param name="read1_max_bases_to_write" value="-1"/>
145 <param name="read2_trim" value="0" />
146 <param name="read2_max_bases_to_write" value="-1"/>
147 <param name="include_non_primary_alignments" value="false"/>
148 <output name="fq_single" file="picard_SamToFastq_se.fq" ftype="fastqsanger"/>
149 </test>
150 </tests>
151
152
153 <help>
154 141
155 **Purpose** 142 **Purpose**
156 143
157 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. 144 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.
158 145
221 Possible values: {true, false} 208 Possible values: {true, false}
222 209
223 @more_info@ 210 @more_info@
224 211
225 </help> 212 </help>
226 <expand macro="citations" /> 213 <expand macro="citations"/>
227 </tool> 214 </tool>