view parseAlignment.xml @ 0:0475e4175855 draft default tip

planemo upload commit 81ece2551cea27cbd0e718ef5b7a2fe8d4abd071-dirty
author yqiancolumbia
date Mon, 30 Apr 2018 05:25:11 -0400
parents
children
line wrap: on
line source

<tool id="parseAlignment" name="Parse alignment">
  <description>in SAM format to BED format</description>

  <command interpreter="perl">
	/home/galaxy/tools/CTK/parseAlignment.pl -v 
	#if $MAPQ.MAPQRequired == "yes":
		--map-qual $MAPQ.MapQual 
	#end if
	#if $MinLen.MinLenRequired == "yes":
		--min-len $MinLen.MinimalReadLength
	#end if
	#if $IndeltoEnd.IndeltoEndRequired == "yes":
		--indel-to-end $IndeltoEnd.NucleotidesfromIndeltoEnd
	#end if
	$SplitDel $IndelinScore --mutation-file $outputMutationFile $input $outputBedFile 
  </command>

  <inputs>
        <param name="input"  format="sam"  type="data" label="Input SAM file (.gz file accepted)" /> 
	<conditional name="MAPQ">
                <param name="MAPQRequired" type="select" label="Min MAPQ score (e.g. to keep only uniquely mapped reads)">
                <option value="yes" selected="True">Yes</option>
                <option value="no">No</option>
                </param>
                <when value="yes">
                        <param name="MapQual" type="integer" value="1" label="Input an integer" />
                </when>
                <when value="no">
                </when>
        </conditional>

        <conditional name="MinLen">
                <param name="MinLenRequired" type="select" label="Minimal read length to report">
                <option value="yes" selected="True">Yes</option>
                <option value="no">No</option>
                </param>
                <when value="yes">
                        <param name="MinimalReadLength" type="integer" value="18" label="Input an integer" />
                </when>
                <when value="no">
                </when>
        </conditional>

        <conditional name="IndeltoEnd">
                <param name="IndeltoEndRequired" type="select" label="Nucleotides from indel to end">
                <option value="yes">Yes</option>
                <option value="no" selected="True">No</option>
                </param>
                <when value="yes">
                        <param name="NucleotidesfromIndeltoEnd" type="integer" value="" label="Input an integer" />
                </when>
                <when value="no">
                </when>
        </conditional>

        <param name="SplitDel" type="boolean" truevalue="--split-del" falsevalue="" checked="no" label="Split oligo deletion into single nucleotides"/>
        <param name="IndelinScore" type="boolean" truevalue="--indel-in-score" falsevalue="" checked="no" label="Count indels in as mismatches reported in the score column"/>
  </inputs>

  <outputs>
	<data name="outputBedFile" format="bed" label="Parse tag bed file on ${on_string}"></data>
	<data name="outputMutationFile" format="tabular" label="Parse tag mutation file on ${on_string}"></data>	
  </outputs>

  <help>

.. class:: infomark

**What this tool does**

This tool will parse alignment in SAM format to BED format (both tags and mutations).

It will take as input files in SAM format after alignment and output BED files that keeps only unique mappings (with MAPQ >=1, specific for BWA) and a minimal mapping size of 18 nt. It will also generate mutation files. 

Note 1: In the tag bed file, the 5′ column records the number of mismatches (substitutions) in each read.

Note 2: The parsing script relies on MD tags, which is an optional field without strict definition in SAM file format specification. Some aligners might have a slightly different format than bwa in how they report mismatches.

Note 3: Other aligners might not use a positive MAPQ as an indication of unique mapping. Another useful option is "nucleotides from indel to end", which specifies the number of nucleotides towards the end from which indels should not be called (default=5 nt). 

    </help>

</tool>