view correctGCBias.xml @ 30:e479c7ca5570 draft default tip

planemo upload for repository https://github.com/deeptools/deepTools/tree/master/galaxy/wrapper/ commit 4a4029b5c2e725b7cebc27217b76d23910508412
author bgruening
date Wed, 27 Sep 2023 20:24:42 +0000
parents 5bffaa8354a1
children
line wrap: on
line source

<tool id="deeptools_correct_gc_bias" name="correctGCBias" version="@TOOL_VERSION@+galaxy0" profile="@GALAXY_VERSION@">
    <description>uses the output from computeGCBias to generate GC-corrected BAM/CRAM files</description>
    <macros>
        <token name="@BINARY@">correctGCBias</token>
        <import>deepTools_macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command>
<![CDATA[
        ln -s '$bamInput' local_bamInput.bam &&
        #if $bamInput.ext == 'bam':
            ln -s '${bamInput.metadata.bam_index}' local_bamInput.bam.bai &&
        #else:
            ln -s '${bamInput.metadata.cram_index}' local_bamInput.bam.crai &&
        #end if

        @BINARY@
            @THREADS@
            --bamfile local_bamInput.bam
            --GCbiasFrequenciesFile '$GCbiasFrequenciesFile'

            @reference_genome_source@

            #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
                --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize
            #else:
                --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
            #end if

            #if str($region).strip() != '':
                --region '$region'
            #end if
            --correctedFile corrected.bam
]]>
    </command>
    <inputs>
        <param argument="--GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" help="" />
        <param argument="--bamInput" format="bam,cram" type="data"
            label="BAM/CRAM file" help="This should be same file that was used for computeGCbias." />
        <expand macro="reference_genome_source" />
        <expand macro="effectiveGenomeSize" />
        <expand macro="region_limit_operation" />
    </inputs>
    <outputs>
        <data format="bam" from_work_dir="corrected.bam" name="outFileName" />
    </outputs>
    <tests>
        <test>
            <param name="GCbiasFrequenciesFile" value="computeGCBias_result1.tabular" ftype="tabular" />
            <param name="bamInput" value="paired_chr2L.bam" ftype="bam" />
            <param name="ref_source" value="history" />
            <param name="input1" value="sequence.2bit" />
            <param name="effectiveGenomeSize_opt" value="specific" />
            <param name="effectiveGenomeSize" value="10050" />
            <output name="outFileName" file="correctGCBias_result1.bam" ftype="bam" lines_diff="200" />
        </test>
    </tests>
    <help>
<![CDATA[

What it does
-------------

This tool requires the output from computeGCBias to correct a given BAM file according to the method proposed in Benjamini and Speed (2012) Nucleic Acids Res. It will simply remove reads from regions with too high coverage compared to the expected values (typically GC-rich regions) and will add reads to regions where too few reads are seen (typically AT-rich regions). 
The resulting BAM file can be used in any downstream analyses, but be aware that you should not filter out duplicates from here on.

See the description of ``computeGCBias`` to read up on the details of the GC bias assessment and correction method.


Output files
----------------

``correctGCbias`` only has one output: a BAM file where read densities have been changed to reflect the expected read distribution based on the genome.

**Warning!** The GC-corrected BAM file will most likely contain several duplicated reads in regions where the coverage had to increased in order to match the expected read density. This means that you should absolutely avoid using any filtering of duplicate reads during your downstream analyses!

-----

@REFERENCES@
]]>
    </help>
    <expand macro="citations" />
</tool>