view picard_MergeSam.xml @ 145:75aa585cfc16 draft

Deleted selected files
author rayan
date Mon, 16 Jun 2014 18:07:19 -0400
parents bc997d1de208
children
line wrap: on
line source

<tool id="picard_mergesam" name="Merge SAM or BAM files" version="1.106.0">
    <!-- Documentation: http://picard.sourceforge.net/command-line-overview.shtml#MergeSamFiles
Merges multiple SAM/BAM files into one file.
-->
  <description>merges SAM or BAM files together</description>
  <requirements><requirement type="package" version="1.106.0">picard</requirement></requirements>
  <command interpreter="bash">
    mergesam_wrapper.sh $output1 $outformat I=$input1 I=$input2 
      #for $i in $inputs
        I=${i.input}
      #end for 
      MSD=$mergeSD VALIDATION_STRINGENCY=LENIENT TMP_DIR=$__new_file_path__
          2&gt; /dev/null
    ##|| echo "Error running Picard MergeSamFiles" >&amp;2
  </command>
  <inputs>
    <param name="title" label="Name for the output merged bam file" type="text" default="Merged.bam"
       help="This name will appear in your history so use it to remember what the new file in your history contains" />
    <param name="outformat" type="select" label="Output format" >
      <option value="bam" selected="True">BAM</option>
      <option value="sam">SAM</option>
    </param>
    <param name="mergeSD" value="true" type="boolean"  label="Merge all component bam file headers into the merged bam file"
      truevalue="true" falsevalue="false" checked="yes" 
      help="Control the MERGE_SEQUENCE_DICTIONARIES flag for Picard MergeSamFiles. Default (true) correctly propagates read groups and other important metadata" />
    <param name="input1" label="First file" type="data" format="bam,sam" />
    <param name="input2" label="with file" type="data" format="bam,sam" help="Need to add more files? Use controls below." />
    <repeat name="inputs" title="Input Files">
      <param name="input" label="Add file" type="data" format="bam,sam" />
    </repeat>
  </inputs>
  <outputs>
    <data format="bam" name="output1" label="${title}.${outformat}" >
       <change_format>
           <when input="outformat" value="sam" format="sam" />
       </change_format>
    </data>
  </outputs>
  <tests>
    <test>
      <!-- command: java -jar MergeSamFiles.jar O=mergesie.bam I=picard_output_fixmate_tiny.bam I=picard_RS_output1.bam MSD=True VALIDATION_STRINGENCY=LENIENT -->
      <param name="title" value="test1" />
      <param name="mergeSD" value="True" />
      <param name="input1" value="picard_output_fixmate_tiny.bam" ftype="bam" />
      <param name="input2" value="picard_RS_output1.bam" ftype="bam" />
      <output name="output1" file="mergesie.bam" ftype="bam" />
    </test>
  </tests>
  <help>

**What it does**

This tool uses the Picard_ merge command to merge any number of BAM files together into one BAM file while preserving the BAM
metadata such as read groups

.. _Picard: http://picard.sourceforge.net/command-line-overview.shtml#MergeSamFiles

  </help>
</tool>