view picard_ReplaceSamHeader.xml @ 5:3d4f1fa26f0e draft

Uploaded
author devteam
date Tue, 16 Dec 2014 19:03:21 -0500
parents 9227b8c3093b
children 3a3234d7a2e8
line wrap: on
line source

<tool name="ReplaceSamHeader" id="picard_ReplaceSamHeader" version="1.126.0">
  <description>replace header in a SAM/BAM dataset</description>
  <requirements>
    <requirement type="package" version="1.126.0">picard</requirement>
  </requirements>
  
  <macros>
    <import>picard_macros.xml</import>
  </macros>
  
  <command>
    @java_options@
    
  
    ## Two lines below are due to the fact that picard likes fasta files to have extension .fa  
    #set $fasta_file="local_fasta.fa"
    ln -s "${inputFile}" "${fasta_file}" &amp;&amp;    
    
    java -jar \$JAVA_JAR_PATH/picard.jar
    ReplaceSamHeader
    
    INPUT="${inputFile}"
    HEADER="${header}"
    OUTPUT="${outFile}"
    
    QUIET=true
    VERBOSITY=ERROR
  
  </command>
  <inputs>
    <param format="sam,bam" name="inputFile" type="data" label="Select SAM/BAM dataset or dataset collection (header recepient dataset)" help="If empty, upload or import a SAM/BAM dataset"/>
    <param name="header" type="data" format="sam,bam" label="SAM/BAM dataset from which Header will be read (header source dataset)" help="HEADER; If empty, upload or import a SAM/BAM dataset"/>
  </inputs> 
  
  <outputs>
    <data format="bam" name="outFile" label="${tool.name} on ${on_string}: BAM file with replaced header"/>
  </outputs>
  
  <tests>
    <test>
      <param name="inputFile" value="picard_ReplaceSamHeader.bam" ftype="bam"/>
      <param name="header" value="picard_ReplaceSamHeader_header.bam" ftype="bam"/>
      <output name="outFile" file="picard_ReplaceSamHeader_test1.bam" ftype="bam"/>
    </test>
  </tests>
  
  <stdio>
    <exit_code range="1:"  level="fatal"/>
  </stdio>
  
  <help>

**Purpose**

Replace the SAMFileHeader in a SAM/BAM dataset with the given header. Validation is minimal. It is up to the user to ensure that all the elements referred to in the SAMRecords are present in the new header. Sort order of the two input datasets must be the same.
@dataset_collections@

@description@

  HEADER=File                   SAM file from which SAMFileHeader will be read.  Required. 

@more_info@

  </help>
</tool>