view VarAmpliCNV_Count.xml @ 1:5c324f9a4e20 draft default tip

Uploaded
author geert-vandeweyer
date Fri, 25 Sep 2020 08:30:57 +0000
parents
children
line wrap: on
line source

<tool id="VarAmpliCNV_Count" name="Count Aligned Amplicons" version="0.1.0" >
    <requirements>
	<container type="docker">cmgantwerpen/varamplicnv:1.0.0</container>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        ##prepare input and indices 
        ln -s '$bam' infile &&
        #if $bam.is_of_type('bam'):
            #if str( $bam.metadata.bam_index ) != "None":
                ln -s '${bam.metadata.bam_index}' infile.bai &&
            #else:
                samtools index infile infile.bai &&
            #end if
        #elif $bam.is_of_type('cram'):
            #if str( $bam.metadata.cram_index ) != "None":
                ln -s '${bam.metadata.cram_index}' infile.crai &&
            #else:
                samtools index infile infile.crai &&
            #end if
        #end if

	## Run Counter.
	parseBAM.py '$bed' 'infile' '$counts' '$unmapped' '$stats' 

	]]></command>
    <inputs>
	<param name="bed" type="data" format="BED" optional="false" label="Unique Amplicons (BED)" help="This file is created by the VarAmpliCNV 'Annotate Amplicons' tool." />
	<param name="bam" type="data" format="bam" optional="false" label="BAM file" help="Sequencing data file" />
    </inputs>
    <outputs>
	<data name="counts" format="tabular" label="VarAmpliCNV on ${on_string}: Counts" />
	<data name="unmapped" format="bam" label="VarAmpliCNV on ${on_string}: UnMapped Reads" />
	<data name="stats" format="txt" label="VarAmpliCNV on ${on_string}: Statistics" />
    </outputs>
    <help>
**VarAmpliCNV : Counting**

BAM files are parsed for readpairs exactly matching specified amplicons, based on start and end position. 

**Parameters are :** 

* Amplicon Design File (BED) : The de-duplicated amplicon list, generated by "varAmpliCNV Annotate".
* Sample Data (BAM) : The sample read data, provided as a single BAM file, or a collection of BAM files. 

**Output files :**

* Count file (txt): the amplicon-read table. 
* Unmapped (BAM)  : Reads not matching amplicons. This bam file can be used to investigate issues.
* Stats (txt): Overview of the matching performance. Use it to investigate issues.

In case a collection of BAM files is provided, the output files will be grouped in collections as well. 

    </help>
</tool>