view picard_MarkDuplicates.xml @ 12:a459ead5ab75 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/picard commit a55cff7dfc145ed17ec2ee9f6a70d51c6f9d74b6
author iuc
date Thu, 13 Apr 2017 19:09:04 -0400
parents 41b8d087a2d2
children c7dd8d7946b8
line wrap: on
line source

<tool name="MarkDuplicates" id="picard_MarkDuplicates" version="@TOOL_VERSION@.1">
  <description>examine aligned records in BAM datasets to locate duplicate molecules</description>
  <macros>
    <import>picard_macros.xml</import>
  </macros>
  <expand macro="requirements" />
  <command detect_errors="exit_code"><![CDATA[
    @java_options@
    @symlink_element_identifier@
    picard
    MarkDuplicates

    INPUT='$escaped_element_identifier'
    OUTPUT='${outFile}'

    METRICS_FILE='${metrics_file}'
    #for $element in $comments:
      COMMENT='${element.comment}'
    #end for

    REMOVE_DUPLICATES='${remove_duplicates}'
    ASSUME_SORTED='${assume_sorted}'

    DUPLICATE_SCORING_STRATEGY='${duplicate_scoring_strategy}'

    #import pipes
    READ_NAME_REGEX=${ pipes.quote( str( $read_name_regex ) ) or "''" }
    OPTICAL_DUPLICATE_PIXEL_DISTANCE='${optical_duplicate_pixel_distance}'

    # Optional arguments
    #if $barcode_tag:
    BARCODE_TAG='${barcode_tag}'
    #end if

    VALIDATION_STRINGENCY='${validation_stringency}'
    QUIET=true
    VERBOSITY=ERROR

  ]]></command>
  <inputs>
    <param format="bam" name="inputFile" type="data" label="Select SAM/BAM dataset or dataset collection" help="If empty, upload or import a SAM/BAM dataset"/>
    <repeat name="comments" title="Comment" min="0" help="You can provide multiple comments">
      <param name="comment" type="text" label="Add this comment to BAM dataset"/>
    </repeat>
    <param name="remove_duplicates" type="boolean" label="If true do not write duplicates to the output file instead of writing them with appropriate flags set" help="REMOVE_DUPLICATES; default=False"/>
    <param name="assume_sorted" type="boolean" label="Assume the input file is already sorted" checked="true" truevalue="true" falsevalue="false" help="ASSUME_SORTED; default=True"/>

    <param name="duplicate_scoring_strategy" type="select" label="The scoring strategy for choosing the non-duplicate among candidates" help="DUPLICATE_SCORING_STRATEGY; default=SUM_OF_BASE_QUALITIES">
      <option value="SUM_OF_BASE_QUALITIES">SUM_OF_BASE_QUALITIES</option>
      <option value="TOTAL_MAPPED_REFERENCE_LENGTH">TOTAL_MAPPED_REFERENCE_LENGTH</option>
    </param>


    <param name="read_name_regex" type="text" value="[a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*." label="Regular expression that can be used to parse read names in the incoming SAM/BAM dataset" help="READ_NAME_REGEX; Read names are parsed to extract three variables: tile/region, x coordinate and y coordinate. These values are used to estimate the rate of optical duplication in order to give a more accurate estimated library size. See help below for more info; default=[a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*.">
      <sanitizer>
        <valid initial="string.printable">
        </valid>
      </sanitizer>
    </param>
    <param name="optical_duplicate_pixel_distance" type="integer" value="100" min="0" max="500" label="The maximum offset between two duplicte clusters in order to consider them optical duplicates" help="OPTICAL_DUPLICATE_PIXEL_DISTANCE; default=100"/>

    <param name="barcode_tag" type="text" optional="True" label="Barcode Tag" help="Barcode SAM tag. This tag can be utilized when you have data from an assay that includes Unique Molecular Indices."/>

   <expand macro="VS" />

  </inputs>

  <outputs>
    <data format="txt" name="metrics_file" label="${tool.name} on ${on_string}: MarkDuplicate metrics"/>
    <data format="bam" name="outFile" label="${tool.name} on ${on_string}: MarkDuplicates BAM output"/>
  </outputs>

  <tests>
    <test>
      <param name="inputFile" value="picard_MarkDuplicates.bam" ftype="bam"/>
      <param name="comment" value="test-run"/>
      <param name="assume_sorted" value="True"/>
      <param name="remove_duplicates" value="True"/>
      <param name="read_name_regex" value="[a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*."/>
      <param name="optical_duplicate_pixel_distance" value="100"/>
      <param name="duplicate_scoring_strategy" value="SUM_OF_BASE_QUALITIES"/>
      <param name="validation_stringency" value="LENIENT"/>
      <output name="outFile" file="picard_MarkDuplicates_test1.bam" ftype="bam" lines_diff="4"/>
    </test>
  </tests>


  <help>

**Purpose**

Examines aligned records in the supplied SAM or BAM dataset to locate duplicate molecules. All records are then written to the output file with the duplicate records flagged.

@dataset_collections@

@description@

  COMMENT=String
  CO=String                     Comment(s) to include in the output file's header.  This option may be specified 0 or
                                more times.

  REMOVE_DUPLICATES=Boolean     If true do not write duplicates to the output file instead of writing them with
                                appropriate flags set.  Default value: false.

  READ_NAME_REGEX=String        Regular expression that can be used to parse read names in the incoming SAM file. Read
                                names are parsed to extract three variables: tile/region, x coordinate and y coordinate.
                                These values are used to estimate the rate of optical duplication in order to give a more
                                accurate estimated library size. Set this option to null to disable optical duplicate
                                detection. The regular expression should contain three capture groups for the three
                                variables, in order. It must match the entire read name. Note that if the default regex
                                is specified, a regex match is not actually done, but instead the read name  is split on
                                colon character. For 5 element names, the 3rd, 4th and 5th elements are assumed to be
                                tile, x and y values. For 7 element names (CASAVA 1.8), the 5th, 6th, and 7th elements
                                are assumed to be tile, x and y values.  Default value:
                                [a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*.

  DUPLICATE_SCORING_STRATEGY=ScoringStrategy
  DS=ScoringStrategy            The scoring strategy for choosing the non-duplicate among candidates.  Default value:
                                SUM_OF_BASE_QUALITIES. Possible values: {SUM_OF_BASE_QUALITIES, TOTAL_MAPPED_REFERENCE_LENGTH}

  OPTICAL_DUPLICATE_PIXEL_DISTANCE=Integer
                                The maximum offset between two duplicte clusters in order to consider them optical
                                duplicates. This should usually be set to some fairly small number (e.g. 5-10 pixels)
                                unless using later versions of the Illumina pipeline that multiply pixel values by 10, in
                                which case 50-100 is more normal.  Default value: 100.

  BARCODE_TAG=String            Barcode SAM tag (ex. BC for 10X Genomics)  Default value: null.

@more_info@

  </help>
</tool>