Mercurial > repos > bgruening > deeptools_bam_coverage
diff bamCoverage.xml @ 0:19a6007845cc draft
planemo upload for repository https://github.com/fidelram/deepTools/tree/master/galaxy/wrapper/ commit 0a9265a12a303b54cdaa974e82e87c2ac60962ee-dirty
author | bgruening |
---|---|
date | Mon, 25 Jan 2016 20:19:01 -0500 |
parents | |
children | 36f655a04a57 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bamCoverage.xml Mon Jan 25 20:19:01 2016 -0500 @@ -0,0 +1,187 @@ +<tool id="deeptools_bam_coverage" name="bamCoverage" version="@WRAPPER_VERSION@.0"> + <description>generates a coverage bigWig file from a given BAM file</description> + <macros> + <token name="@BINARY@">bamCoverage</token> + <import>deepTools_macros.xml</import> + </macros> + <expand macro="requirements" /> + <command> +<![CDATA[ + ln -s '$bamInput' one.bam && + ln -s '${bamInput.metadata.bam_index}' one.bam.bai && + + @BINARY@ + @THREADS@ + + --bam one.bam + --outFileName '$outFileName' + --outFileFormat '$outFileFormat' + + --binSize $binSize + + #if $scaling.type=='rpkm': + --normalizeUsingRPKM + #elif $scaling.type=='1x': + #if $scaling.effectiveGenomeSize.effectiveGenomeSize_opt == "specific": + --normalizeTo1x $scaling.effectiveGenomeSize.effectiveGenomeSize + #else: + --normalizeTo1x $scaling.effectiveGenomeSize.effectiveGenomeSize_opt + #end if + #elif $scaling.type=='own': + --scaleFactor $scaling.scaleFactor + #end if + + #if str($region).strip() != '': + --region '$region' + #end if + + #if $advancedOpt.showAdvancedOpt == "yes": + #if $advancedOpt.smoothLength: + --smoothLength '$advancedOpt.smoothLength' + #end if + + @ADVANCED_OPTS_READ_PROCESSING@ + $advancedOpt.skipNAs + + #if str($advancedOpt.ignoreForNormalization).strip() != '': + --ignoreForNormalization $advancedOpt.ignoreForNormalization + #end if + #end if +]]> + </command> + + <inputs> + <param name="bamInput" format="bam" type="data" label="BAM file" + help="The BAM file must be sorted."/> + + <param name="binSize" type="integer" value="50" min="1" + label="Bin size in bases" + help="The genome will be divided into bins of the specified size. For each bin, the overlaping number of fragments (or reads) will be reported. If only half a fragment overlaps, this fraction will be reported. "/> + + <conditional name="scaling"> + <param name="type" type="select" label="Scaling/Normalization method" > + <option value="1x">Normalize coverage to 1x</option> + <option value="rpkm">Normalize to fragments (reads) per kilobase per million (RPKM)</option> + <option value="no">Do not normalize or scale</option> + </param> + <when value="rpkm"> + <expand macro="scaleFactor" /> + </when> + <when value="no"/> + <when value="1x"> + <expand macro="effectiveGenomeSize" /> + <expand macro="scaleFactor" /> + </when> + </conditional> + + <param name="outFileFormat" type="select" label="Coverage file format"> + <option value="bigwig" selected="true">bigwig</option> + <option value="bedgraph">bedgraph</option> + </param> + + <expand macro="region_limit_operation" /> + + <conditional name="advancedOpt"> + <param name="showAdvancedOpt" type="select" label="Show advanced options" > + <option value="no" selected="true">no</option> + <option value="yes">yes</option> + </param> + <when value="no" /> + <when value="yes"> + <expand macro="smoothLength" /> + + <param argument="ignoreForNormalization" type="text" value="" + label="Regions that should be excluded for normalization" + help="A list of chromosome names separated by spaces + containing those chromosomes that should be excluded + during normalization. This is useful when + considering samples with unequal coverage across + chromosomes, like male and female samples. Example: chrX chrM" /> + + <expand macro="skipNAs" /> + <expand macro="read_processing_options" /> + + <param argument="--MNase" type="boolean" truevalue="--MNase" falsevalue="" + label="Determine nucleosome positions from MNase-seq data" + help="Only the 3 nucleotides at the center of each fragment are counted. The fragment ends are defined by the two mate reads. *NOTE*: Requires paired-end data." /> + + </when> + </conditional> + </inputs> + <outputs> + <data format="bigwig" name="outFileName"> + <change_format> + <when input="outFileFormat" value="bigwig" format="bigwig" /> + <when input="outFileFormat" value="bedgraph" format="bedgraph" /> + </change_format> + </data> + </outputs> + <tests> + <test> + <param name="bamInput" value="bowtie2-test1.bam" ftype="bam" /> + <param name="outFileFormat" value="bigwig" /> + <param name="showAdvancedOpt" value="no" /> + <param name="binSize" value="10" /> + <param name="type" value="no" /> + <output name="outFileName" file="bamCoverage_result1.bw" ftype="bigwig" /> + </test> + <test> + <param name="bamInput" value="bowtie2-test1.bam" ftype="bam" /> + <param name="outFileFormat" value="bigwig" /> + <param name="showAdvancedOpt" value="no" /> + <param name="binSize" value="10" /> + <output name="outFileName" file="bamCoverage_result2.bw" ftype="bigwig" /> + </test> + <test> + <param name="bamInput" value="bowtie2-test1.bam" ftype="bam" /> + <param name="outFileFormat" value="bedgraph" /> + <param name="showAdvancedOpt" value="no" /> + <param name="binSize" value="10" /> + <output name="outFileName" file="bamCoverage_result3.bg" ftype="bedgraph" /> + </test> + <test> + <param name="bamInput" value="phiX.bam" ftype="bam" /> + <param name="outFileFormat" value="bigwig" /> + <param name="showAdvancedOpt" value="no" /> + <param name="binSize" value="10" /> + <output name="outFileName" file="bamCoverage_result4.bw" ftype="bigwig" /> + </test> + <test> + <param name="bamInput" value="phiX.bam" ftype="bam" /> + <param name="outFileFormat" value="bedgraph" /> + <param name="showAdvancedOpt" value="yes" /> + <param name="binSize" value="10" /> + <output name="outFileName" file="bamCoverage_result4.bg" ftype="bedgraph" /> + </test> + </tests> + <help> +<![CDATA[ +**What it does** + +Given a BAM file, this tool generates a bigWig or bedGraph file of fragment or +read coverages. The way the method works is by first calculating all the +number of reads (either extended to match the fragment length or not) that +overlap each bin in the genome. The resulting read counts can be normalized +using either a given scaling factor, the RPKM formula or to get a 1x depth of +coverage (RPGC). In the case of paired-end mapping, each read mate is treated +independently to avoid a bias when a mixture of concordant and discordant +pairs is present. This means that *each end* will be extended to match the +fragment length. + +.. image:: $PATH_TO_IMAGES/norm_IGVsnapshot_indFiles.png + + +You can find more details on the bamCoverage doc page: https://deeptools.readthedocs.org/en/master/content/tools/bamCoverage.html + + +**Output files**: + +- coverage file either in bigWig or bedGraph format + +----- + +@REFERENCES@ +]]> + </help> + <expand macro="citations" /> +</tool>