| 
102
 | 
     1 <tool id="picard_FastqToSam" name="FASTQ to BAM / SAM" version="1.106.0">
 | 
| 
 | 
     2   <description>creates an unaligned BAM or SAM file</description>
 | 
| 
 | 
     3   <requirements><requirement type="package" version="1.106.0">picard</requirement></requirements>
 | 
| 
 | 
     4   <!-- Dan Blankenberg & dorine  -->
 | 
| 
 | 
     5   
 | 
| 
 | 
     6   <command interpreter="bash">fastq2sam_wrapper.sh
 | 
| 
 | 
     7     "${outputtype}"
 | 
| 
 | 
     8     "${output_bam}"
 | 
| 
 | 
     9     "${sample_name}" 
 | 
| 
 | 
    10     "${read_group_name}"
 | 
| 
 | 
    11     FASTQ="${input_fastq1}"
 | 
| 
 | 
    12     #if str( $input_fastq2) != "None":
 | 
| 
 | 
    13         FASTQ2="${input_fastq2}"
 | 
| 
 | 
    14     #end if
 | 
| 
 | 
    15     QUALITY_FORMAT="${ dict( fastq='Standard', fastqsanger='Standard', fastqcssanger='Standard', fastqillumina='Illumina', fastqsolexa='Solexa' )[ $input_fastq1.ext ] }" ##Solexa, Illumina, Standard
 | 
| 
 | 
    16     #if $param_type.param_type_selector == "advanced":
 | 
| 
 | 
    17         #if str( $param_type.library_name ) != "":
 | 
| 
 | 
    18             LIBRARY_NAME="${param_type.library_name}" 
 | 
| 
 | 
    19         #end if
 | 
| 
 | 
    20         #if str( $param_type.platform_unit ) != "":
 | 
| 
 | 
    21             PLATFORM_UNIT="${param_type.platform_unit}"
 | 
| 
 | 
    22         #end if
 | 
| 
 | 
    23         #if str( $param_type.platform ) != "":
 | 
| 
 | 
    24             PLATFORM="${param_type.platform}"
 | 
| 
 | 
    25         #end if 
 | 
| 
 | 
    26         #if str( $param_type.sequencing_center ) != "":
 | 
| 
 | 
    27             SEQUENCING_CENTER="${param_type.sequencing_center}"
 | 
| 
 | 
    28         #end if 
 | 
| 
 | 
    29         #if str( $param_type.predicted_insert_size ) != "":
 | 
| 
 | 
    30             PREDICTED_INSERT_SIZE="${param_type.predicted_insert_size}"
 | 
| 
 | 
    31         #end if 
 | 
| 
 | 
    32         #if str( $param_type.description.value ) != "":
 | 
| 
 | 
    33             DESCRIPTION="${param_type.description}"
 | 
| 
 | 
    34         #end if 
 | 
| 
 | 
    35         #if str( $param_type.run_date ) != "":
 | 
| 
 | 
    36             RUN_DATE="${param_type.run_date}"
 | 
| 
 | 
    37         #end if
 | 
| 
 | 
    38         #if str( $param_type.min_q ) != "":
 | 
| 
 | 
    39             MIN_Q="${param_type.min_q}"
 | 
| 
 | 
    40         #end if
 | 
| 
 | 
    41         #if str( $param_type.max_q ) != "":
 | 
| 
 | 
    42             MAX_Q="${param_type.max_q}"
 | 
| 
 | 
    43         #end if
 | 
| 
 | 
    44         SORT_ORDER="${param_type.sort_order}"
 | 
| 
 | 
    45     #else:
 | 
| 
 | 
    46         SORT_ORDER=coordinate ##unsorted, queryname, coordinate; always use coordinate
 | 
| 
 | 
    47     #end if
 | 
| 
 | 
    48     QUIET=True
 | 
| 
 | 
    49   </command>
 | 
| 
 | 
    50   <inputs>
 | 
| 
 | 
    51     <param name="input_fastq1" type="data" format="fastqsanger,fastqcsanger,fastqillumina,fastqsolexa,fastq" label="FASTQ file" /> 
 | 
| 
 | 
    52     <param name="input_fastq2" type="data" format="fastqsanger,fastqcsanger,fastqillumina,fastqsolexa,fastq" optional="True" label="Second FASTQ of paired end data" help="Only needed when using paired end data." >
 | 
| 
 | 
    53       <options options_filter_attribute="ext" from_parameter="tool.app.datatypes_registry.datatypes_by_extension" transform_lines="obj.keys()">
 | 
| 
 | 
    54         <column name="name" index="0"/>
 | 
| 
 | 
    55         <column name="value" index="0"/>
 | 
| 
 | 
    56         <filter type="param_value" ref="input_fastq1" ref_attribute="ext" column="0"/> 
 | 
| 
 | 
    57       </options>
 | 
| 
 | 
    58     </param>
 | 
| 
 | 
    59     <param name="read_group_name" type="text" value="A" label="Read Group Name" />
 | 
| 
 | 
    60     <param name="sample_name" type="text" value="unknown_sample" label="Sample Name" />
 | 
| 
 | 
    61     <conditional name="param_type">
 | 
| 
 | 
    62       <param name="param_type_selector" type="select" label="Basic or Advanced options">
 | 
| 
 | 
    63         <option value="basic" selected="True">Basic</option>
 | 
| 
 | 
    64         <option value="advanced">Advanced</option>
 | 
| 
 | 
    65       </param>
 | 
| 
 | 
    66       <when value="basic">
 | 
| 
 | 
    67         <!-- Do nothing here -->
 | 
| 
 | 
    68       </when>
 | 
| 
 | 
    69       <when value="advanced">
 | 
| 
 | 
    70         <param name="library_name" type="text" value="" label="Library Name" />
 | 
| 
 | 
    71         <param name="platform_unit" type="text" value="" label="Platform Unit" />
 | 
| 
 | 
    72         <param name="platform" type="text" value="" label="Platform" />
 | 
| 
 | 
    73         <param name="sequencing_center" type="text" value="" label="Sequencing Center" />
 | 
| 
 | 
    74         <param name="predicted_insert_size" type="integer" value="" optional="True" label="Predicted Insert Size" />
 | 
| 
 | 
    75         <param name="description" type="text" value="" label="Description" />
 | 
| 
 | 
    76         <param name="run_date" type="text" value="" label="Run Date" />
 | 
| 
 | 
    77         <param name="min_q" type="integer" optional="True" value="0" label="Min Q" />
 | 
| 
 | 
    78         <param name="max_q" type="integer" optional="True" value="93" label="Max Q" />
 | 
| 
 | 
    79         <param name="sort_order" type="select" label="Sort order">
 | 
| 
 | 
    80           <option value="coordinate" selected="True">coordinate</option>
 | 
| 
 | 
    81           <option value="queryname">queryname</option>
 | 
| 
 | 
    82           <option value="unsorted">unsorted</option>
 | 
| 
 | 
    83         </param>
 | 
| 
 | 
    84       </when>
 | 
| 
 | 
    85     </conditional>
 | 
| 
 | 
    86     <param name="outputtype" type="select" label="Select the output format">
 | 
| 
 | 
    87         <option value="bam">bam</option>
 | 
| 
 | 
    88         <option value="sam">sam</option>
 | 
| 
 | 
    89     </param>
 | 
| 
 | 
    90   </inputs>
 | 
| 
 | 
    91   <outputs>
 | 
| 
 | 
    92     <data format="bam" name="output_bam" >
 | 
| 
 | 
    93      <change_format>
 | 
| 
 | 
    94         <when input="outputtype" value="sam" format="sam" />
 | 
| 
 | 
    95      </change_format>
 | 
| 
 | 
    96     </data>
 | 
| 
 | 
    97   </outputs>
 | 
| 
 | 
    98   <tests>
 | 
| 
 | 
    99       <test>
 | 
| 
 | 
   100           <param name="input_fastq1" value="bwa_wrapper_in2.fastqsanger" ftype="fastqsanger" />
 | 
| 
 | 
   101           <param name="input_fastq2" />
 | 
| 
 | 
   102           <param name="read_group_name" value="A" />
 | 
| 
 | 
   103           <param name="sample_name" value="unknown sample" />
 | 
| 
 | 
   104           <param name="param_type_selector" value="basic" />
 | 
| 
 | 
   105           <output name="output_bam" file="picard_fastq_to_sam_out1.bam" ftype="bam"/> 
 | 
| 
 | 
   106       </test>
 | 
| 
 | 
   107       <test>
 | 
| 
 | 
   108           <param name="input_fastq1" value="bwa_wrapper_in2.fastqsanger" ftype="fastqsanger" />
 | 
| 
 | 
   109           <param name="input_fastq2" value="bwa_wrapper_in3.fastqsanger" ftype="fastqsanger" />
 | 
| 
 | 
   110           <param name="read_group_name" value="A" />
 | 
| 
 | 
   111           <param name="sample_name" value="unknown sample" />
 | 
| 
 | 
   112           <param name="param_type_selector" value="basic" />
 | 
| 
 | 
   113           <output name="output_bam" file="picard_fastq_to_sam_out2.bam" ftype="bam"/> 
 | 
| 
 | 
   114       </test>
 | 
| 
 | 
   115   </tests>
 | 
| 
 | 
   116   <help>
 | 
| 
 | 
   117 **What it does**
 | 
| 
 | 
   118 
 | 
| 
 | 
   119 Picard: FastqToSam converts FASTQ files to unaligned BAM files.
 | 
| 
 | 
   120 
 | 
| 
 | 
   121 ------
 | 
| 
 | 
   122 
 | 
| 
 | 
   123 Please cite the website "http://picard.sourceforge.net".
 | 
| 
 | 
   124 
 | 
| 
 | 
   125 ------
 | 
| 
 | 
   126 
 | 
| 
 | 
   127 
 | 
| 
 | 
   128 **Input formats**
 | 
| 
 | 
   129 
 | 
| 
 | 
   130 FastqToSam accepts FASTQ input files (note: the Fastq-sanger file format does not work with this Picard tool). If using paired-end data, you should select two FASTQ files.
 | 
| 
 | 
   131 
 | 
| 
 | 
   132 ------
 | 
| 
 | 
   133 
 | 
| 
 | 
   134 **Outputs**
 | 
| 
 | 
   135 
 | 
| 
 | 
   136 The output is in BAM or in SAM format, see http://samtools.sourceforge.net for more details.
 | 
| 
 | 
   137 
 | 
| 
 | 
   138 -------
 | 
| 
 | 
   139 
 | 
| 
 | 
   140 **FastqToSam settings**
 | 
| 
 | 
   141 
 | 
| 
 | 
   142 This is list of FastqToSam options::
 | 
| 
 | 
   143 
 | 
| 
 | 
   144  READ_GROUP_NAME=String	Read group name Default value: A. This option can be set to 'null' to clear the default value.
 | 
| 
 | 
   145  SAMPLE_NAME=String	Sample name to insert into the read group header Required.
 | 
| 
 | 
   146  LIBRARY_NAME=String	The library name to place into the LB attribute in the read group header Default value: null.
 | 
| 
 | 
   147  PLATFORM_UNIT=String	The platform unit (often run_barcode.lane) to insert into the read group header Default value: null.
 | 
| 
 | 
   148  PLATFORM=String	The platform type (e.g. illumina, solid) to insert into the read group header Default value: null.
 | 
| 
 | 
   149  SEQUENCING_CENTER=String	The sequencing center from which the data originated Default value: null.
 | 
| 
 | 
   150  PREDICTED_INSERT_SIZE=Integer	Predicted median insert size, to insert into the read group header Default value: null.
 | 
| 
 | 
   151  DESCRIPTION=String	Inserted into the read group header Default value: null. 
 | 
| 
 | 
   152   </help>
 | 
| 
 | 
   153 </tool>
 |