Mercurial > repos > devteam > picard
comparison picard_SamToFastq.xml @ 21:1181366ba593 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/picard commit cbe534af56ee782e8d1aa0fa872059d2a5e42db8"
| author | iuc |
|---|---|
| date | Mon, 17 Feb 2020 15:23:48 +0000 |
| parents | a5a13ea16d17 |
| children | 4740a2548206 |
comparison
equal
deleted
inserted
replaced
| 20:c1aaa5a116d0 | 21:1181366ba593 |
|---|---|
| 1 <tool name="SamToFastq" id="picard_SamToFastq" version="@TOOL_VERSION@.@WRAPPER_VERSION@"> | 1 <tool name="SamToFastq" id="picard_SamToFastq" version="@TOOL_VERSION@.@WRAPPER_VERSION@"> |
| 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@">1</token> | 5 <token name="@WRAPPER_VERSION@">2</token> |
| 6 </macros> | 6 </macros> |
| 7 <expand macro="requirements" /> | 7 <expand macro="requirements" /> |
| 8 <command detect_errors="exit_code"><![CDATA[ | 8 <command detect_errors="exit_code"><![CDATA[ |
| 9 | 9 |
| 10 echo "BAM" > $report && ## This is necessary for output dataset detection (see output tags below) | |
| 11 | |
| 12 @java_options@ | 10 @java_options@ |
| 13 @symlink_element_identifier@ | 11 @symlink_element_identifier@ |
| 14 | 12 |
| 15 picard | 13 picard |
| 16 SamToFastq | 14 SamToFastq |
| 17 | 15 |
| 18 INPUT='$escaped_element_identifier' | 16 INPUT='$escaped_element_identifier' |
| 19 | 17 |
| 20 #if str( $output_per_rg ) == "true": | 18 #if str($single_or_paired) == "pe_interleaved": |
| 21 OUTPUT_PER_RG=true | 19 FASTQ='${interleaved_fastq}' |
| 22 OUTPUT_DIR=. | 20 INTERLEAVE=TRUE |
| 23 #elif str( $output_per_rg ) == "false" and str( $interleave ) == "false": | 21 #else if str($single_or_paired) == "pe_sep": |
| 24 FASTQ=READ1.fastq | 22 F='${fq1}' |
| 25 SECOND_END_FASTQ=READ2.fastq | 23 F2='${fq2}' |
| 26 UNPAIRED_FASTQ=UNPAIRED_READS.fastq | 24 FU='${fq_u}' |
| 27 #elif str( $output_per_rg ) == "false" and str( $interleave ) == "true": | 25 #else |
| 28 FASTQ=INTERLEAVED.fastq | 26 F='${fq_single}' |
| 29 #end if | 27 #end if |
| 30 | 28 |
| 31 RE_REVERSE="${re_reverse}" | 29 RE_REVERSE="${re_reverse}" |
| 32 INTERLEAVE="${interleave}" | 30 |
| 33 INCLUDE_NON_PF_READS="${include_non_pf_reads}" | 31 INCLUDE_NON_PF_READS="${include_non_pf_reads}" |
| 34 CLIPPING_ATTRIBUTE="${clipping_attribute}" | 32 #if len(str($clipping_attribute)) > 0: |
| 35 CLIPPING_ACTION="${clipping_action}" | 33 CLIPPING_ATTRIBUTE="${clipping_attribute}" |
| 34 #end if | |
| 35 #if len(str($clipping_action)) > 0: | |
| 36 CLIPPING_ACTION="${clipping_action}" | |
| 37 #end if | |
| 36 READ1_TRIM="${read1_trim}" | 38 READ1_TRIM="${read1_trim}" |
| 37 | 39 |
| 38 #if int($read1_max_bases_to_write) > -1: | 40 #if int($read1_max_bases_to_write) > -1: |
| 39 READ1_MAX_BASES_TO_WRITE="${read1_max_bases_to_write}" | 41 READ1_MAX_BASES_TO_WRITE="${read1_max_bases_to_write}" |
| 40 #end if | 42 #end if |
| 44 #if int($read2_max_bases_to_write) > -1: | 46 #if int($read2_max_bases_to_write) > -1: |
| 45 READ2_MAX_BASES_TO_WRITE="${read2_max_bases_to_write}" | 47 READ2_MAX_BASES_TO_WRITE="${read2_max_bases_to_write}" |
| 46 #end if | 48 #end if |
| 47 | 49 |
| 48 INCLUDE_NON_PRIMARY_ALIGNMENTS="${include_non_primary_alignments}" | 50 INCLUDE_NON_PRIMARY_ALIGNMENTS="${include_non_primary_alignments}" |
| 49 | |
| 50 | 51 |
| 51 VALIDATION_STRINGENCY="${validation_stringency}" | 52 VALIDATION_STRINGENCY="${validation_stringency}" |
| 52 QUIET=true | 53 QUIET=true |
| 53 VERBOSITY=ERROR | 54 VERBOSITY=ERROR |
| 54 @TMPDIR_OPTION@ | 55 @TMPDIR_OPTION@ |
| 55 | 56 |
| 56 ]]></command> | 57 ]]></command> |
| 57 <inputs> | 58 <inputs> |
| 58 | 59 |
| 59 <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"/> | 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"/> |
| 60 <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"/> | 61 <param name="single_or_paired" type="select" label="Output format"> |
| 62 <option value="se" >Single-end</option> | |
| 63 <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> | |
| 65 </param> | |
| 66 | |
| 61 <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"/> | 67 <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"/> |
| 62 <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"/> | |
| 63 <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"/> | 68 <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"/> |
| 64 <param name="clipping_attribute" type="text" value="null" label="The attribute that stores the position at which the SAM/BAM record should be clipped" help="CLIPPING_ATTRIBUTE; default=null"/> | 69 <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"/> |
| 65 <param name="clipping_action" type="text" 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"/> | 70 <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"/> |
| 66 <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"/> | 71 <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"/> |
| 67 <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)"/> | 72 <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)"/> |
| 68 <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"/> | 73 <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"/> |
| 69 <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)"/> | 74 <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)"/> |
| 70 <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"/> | 75 <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 <expand macro="VS" /> | 77 <expand macro="VS" /> |
| 73 | 78 |
| 74 </inputs> | 79 </inputs> |
| 75 | 80 |
| 76 <outputs> | 81 <outputs> |
| 77 <!-- here dataset discovery is based on fact that if OUTPUT_PER_RG=true this tool automatically adds .fastq extension to emitted files --> | 82 <data format="fastqsanger" name="fq_single" label="${tool.name} on ${on_string}: reads as fastq"> |
| 78 <data format="txt" name="report" label="SamToFastq run" hidden="true"> | 83 <filter>output_type['single_or_paired'] == 'se'</filter> |
| 79 <discover_datasets pattern="(?P<designation>.+)\.fastq" ext="fastqsanger" visible="true"/> | 84 </data> |
| 85 | |
| 86 <data format="fastqsanger" name="interleaved_fastq" label="Interleaved pairs from ${tool.name} on ${on_string}"> | |
| 87 <filter>output_type['single_or_paired'] == 'pe_interleaved'</filter> | |
| 88 </data> | |
| 89 | |
| 90 <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> | |
| 92 </data> | |
| 93 | |
| 94 <data format="fastqsanger" name="fq2" label="Paired-end reverse strand from ${tool.name} on ${on_string}"> | |
| 95 <filter>output_type['single_or_paired'] == 'pe_sep'</filter> | |
| 96 </data> | |
| 97 | |
| 98 <data format="fastqsanger" name="fq_u" label="Paired-end unpaired reads from ${tool.name} on ${on_string}"> | |
| 99 <filter>output_type['single_or_paired'] == 'pe_sep'</filter> | |
| 80 </data> | 100 </data> |
| 81 </outputs> | 101 </outputs> |
| 82 | 102 |
| 83 <tests> | 103 <tests> |
| 84 <test> | 104 <test> |
| 85 <param name="inputFile" value="picard_SamToFastq.bam" ftype="bam"/> | 105 <param name="inputFile" value="picard_SamToFastq.bam" ftype="bam"/> |
| 106 <param name="single_or_paired" value="pe_interleaved" /> | |
| 86 <param name="output_per_rg" value="false"/> | 107 <param name="output_per_rg" value="false"/> |
| 87 <param name="re_reverse" value="true"/> | 108 <param name="re_reverse" value="true"/> |
| 88 <param name="interleave" value="true"/> | |
| 89 <param name="include_non_pf_reads" value="false"/> | 109 <param name="include_non_pf_reads" value="false"/> |
| 90 <param name="clipping_attribute" value="null" /> | 110 <param name="clipping_attribute" value="" /> |
| 91 <param name="clipping_action" value="null" /> | 111 <param name="clipping_action" value="" /> |
| 92 <param name="read1_trim" value="0" /> | 112 <param name="read1_trim" value="0" /> |
| 93 <param name="read1_max_bases_to_write" value="-1"/> | 113 <param name="read1_max_bases_to_write" value="-1"/> |
| 94 <param name="read2_trim" value="0" /> | 114 <param name="read2_trim" value="0" /> |
| 95 <param name="read2_max_bases_to_write" value="-1"/> | 115 <param name="read2_max_bases_to_write" value="-1"/> |
| 96 <param name="include_non_primary_alignments" value="false"/> | 116 <param name="include_non_primary_alignments" value="false"/> |
| 97 <output name="report"> | 117 <output name="interleaved_fastq" file="picard_SamToFastq_test1.fq" ftype="fastqsanger"/> |
| 98 <assert_contents> | 118 </test> |
| 99 <has_line line="BAM" /> | 119 <test> |
| 100 </assert_contents> | 120 <param name="inputFile" value="picard_SamToFastq.bam" ftype="bam"/> |
| 101 <discovered_dataset designation="INTERLEAVED" file="picard_SamToFastq_test1.fq" ftype="fastqsanger"/> | 121 <param name="single_or_paired" value="pe_sep" /> |
| 102 </output> | 122 <param name="output_per_rg" value="false"/> |
| 123 <param name="re_reverse" value="true"/> | |
| 124 <param name="include_non_pf_reads" value="false"/> | |
| 125 <param name="clipping_attribute" value="" /> | |
| 126 <param name="clipping_action" value="" /> | |
| 127 <param name="read1_trim" value="0" /> | |
| 128 <param name="read1_max_bases_to_write" value="-1"/> | |
| 129 <param name="read2_trim" value="0" /> | |
| 130 <param name="read2_max_bases_to_write" value="-1"/> | |
| 131 <param name="include_non_primary_alignments" value="false"/> | |
| 132 <output name="fq1" file="picard_SamToFastq_1.fq" ftype="fastqsanger"/> | |
| 133 <output name="fq2" file="picard_SamToFastq_2.fq" ftype="fastqsanger"/> | |
| 134 <output name="fq_u" file="picard_SamToFastq_u.fq" ftype="fastqsanger"/> | |
| 135 </test> | |
| 136 <test> | |
| 137 <param name="inputFile" value="picard_SamToFastq_se.bam" ftype="bam"/> | |
| 138 <param name="single_or_paired" value="se" /> | |
| 139 <param name="output_per_rg" value="false"/> | |
| 140 <param name="re_reverse" value="true"/> | |
| 141 <param name="include_non_pf_reads" value="false"/> | |
| 142 <param name="clipping_attribute" value="" /> | |
| 143 <param name="clipping_action" value="" /> | |
| 144 <param name="read1_trim" value="0" /> | |
| 145 <param name="read1_max_bases_to_write" value="-1"/> | |
| 146 <param name="read2_trim" value="0" /> | |
| 147 <param name="read2_max_bases_to_write" value="-1"/> | |
| 148 <param name="include_non_primary_alignments" value="false"/> | |
| 149 <output name="fq_single" file="picard_SamToFastq_se.fq" ftype="fastqsanger"/> | |
| 103 </test> | 150 </test> |
| 104 </tests> | 151 </tests> |
| 105 | 152 |
| 106 | 153 |
| 107 <help> | 154 <help> |
