Mercurial > repos > bgruening > deeptools
changeset 14:b0d64a9930d6 draft
Uploaded
author | bgruening |
---|---|
date | Thu, 14 Nov 2013 05:43:15 -0500 |
parents | 06311d89da81 |
children | 351cd1f8791b |
files | bamCompare.xml bamCorrelate.xml bamCoverage.xml bamFingerprint.xml bigwigCompare.xml computeGCBias.xml computeMatrix.xml correctGCBias.xml deepTools_macros.xml heatmapper.xml profiler.xml readme.rst test-data/master.mat.gz test-data/master.png test-data/test.bw test-data/test2.bed tool-data/deepTools_seqs.loc.sample tool_data_table_conf.xml.sample tool_dependencies.xml |
diffstat | 6 files changed, 178 insertions(+), 185 deletions(-) [+] |
line wrap: on
line diff
--- a/bamCorrelate.xml Wed Oct 30 09:44:05 2013 -0400 +++ b/bamCorrelate.xml Thu Nov 14 05:43:15 2013 -0500 @@ -10,22 +10,8 @@ #set files=[] #set labels=[] - #for $i in $inputs - #set $temp_input_handle = tempfile.NamedTemporaryFile( dir=$temp_dir ) - #set $temp_input_path = $temp_input_handle.name - #silent $temp_input_handle.close() - #silent os.system("ln -s %s %s.bam" % (str($i.bamfile), $temp_input_path)) - #silent os.system("ln -s %s %s.bam.bai" % (str($i.bamfile.metadata.bam_index), $temp_input_path)) - #silent $files.append('%s.bam' % $temp_input_path) - - ##set $files += [str($i.bamfile)] - #if str($i.label.value) != "": - #set $labels += ["\"%s\"" % ($i.label.value)] - #else - #set $labels += ["\"%s\"" % ($i.bamfile.name)] - #end if - #end for + @multiple_input_bams@ bamCorrelate @@ -84,49 +70,49 @@ <inputs> <expand macro="multiple_input_bams" /> - <param name="fragmentLength" type="integer" value="300" min="1" - label="Length of the average fragment size" - help ="Reads will be extended to match this length unless they are paired-end, in which case they will be extended to match the fragment length. *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will be extended to match the fragment length."/> + <param name="fragmentLength" type="integer" value="300" min="1" + label="Length of the average fragment size" + help ="Reads will be extended to match this length unless they are paired-end, in which case they will be extended to match the fragment length. *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will be extended to match the fragment length."/> - <param name="corMethod" type="select" label="Correlation method"> - <option value="pearson">Pearson</option> - <option value="spearman">Spearman</option> - </param> + <param name="corMethod" type="select" label="Correlation method"> + <option value="pearson">Pearson</option> + <option value="spearman">Spearman</option> + </param> - <conditional name="mode"> - <param name="modeOpt" type="select" label="Choose computation mode" - help="In the bins mode, the correlation is computed based on equal length bins. In the BED file mode, as list of genomic regions in BED format has to be given. For each region in the BED file the number of overlapping reads is counted in each of the BAM files. Then the correlation is computed."> - <option value="bins" selected="true">Bins</option> - <option value="BED-file">Limit correlation to certain regions (BED file)</option> - </param> - <when value="bins"> - <param name="binSize" type="integer" value="10000" min="1" - label="Bin size in bp" - help="Length in base pairs for a window used to sample the genome."/> + <conditional name="mode"> + <param name="modeOpt" type="select" label="Choose computation mode" + help="In the bins mode, the correlation is computed based on equal length bins. In the BED file mode, as list of genomic regions in BED format has to be given. For each region in the BED file the number of overlapping reads is counted in each of the BAM files. Then the correlation is computed."> + <option value="bins" selected="true">Bins</option> + <option value="BED-file">Limit correlation to certain regions (BED file)</option> + </param> + <when value="bins"> + <param name="binSize" type="integer" value="10000" min="1" + label="Bin size in bp" + help="Length in base pairs for a window used to sample the genome."/> - <param name="numberOfSamples" type="integer" value="100000" min="1" - label="Number of samples" - help="Number of samples taken from the genome to compute the scaling factors"/> - <expand macro="bamCorrelate_mode_actions" /> - </when> - <when value="BED-file"> - <param name="region_file" type="data" format="bed" label="Region file in BED format" help="Correlation is computed for the number of reads that overlap such regions."/> - <expand macro="bamCorrelate_mode_actions" /> - </when> + <param name="numberOfSamples" type="integer" value="100000" min="1" + label="Number of samples" + help="Number of samples taken from the genome to compute the scaling factors"/> + <expand macro="bamCorrelate_mode_actions" /> + </when> + <when value="BED-file"> + <param name="region_file" type="data" format="bed" label="Region file in BED format" help="Correlation is computed for the number of reads that overlap such regions."/> + <expand macro="bamCorrelate_mode_actions" /> + </when> - </conditional> + </conditional> - <conditional name="outputOpt"> - <param name="showOutputOpt" type="select" label="Show additional output options" > - <option value="no" selected="true">no</option> - <option value="yes">yes</option> - </param> - <when value="no" /> - <when value="yes"> - <param name="saveRawCounts" type="boolean" label="Save the bin counts"/> - <param name="saveCorMatrix" type="boolean" label="Save the correlation matrix"/> - </when> - </conditional> + <conditional name="outputOpt"> + <param name="showOutputOpt" type="select" label="Show additional output options" > + <option value="no" selected="true">no</option> + <option value="yes">yes</option> + </param> + <when value="no" /> + <when value="yes"> + <param name="saveRawCounts" type="boolean" label="Save the bin counts"/> + <param name="saveCorMatrix" type="boolean" label="Save the correlation matrix"/> + </when> + </conditional> </inputs> <outputs>
--- a/bamCoverage.xml Wed Oct 30 09:44:05 2013 -0400 +++ b/bamCoverage.xml Thu Nov 14 05:43:15 2013 -0500 @@ -7,77 +7,77 @@ <command> bamCoverage - @THREADS@ + @THREADS@ - --bam '$bamInput' - --bamIndex ${bamInput.metadata.bam_index} - --outFileName '$outFileName' - --outFileFormat '$outFileFormat' + --bam '$bamInput' + --bamIndex ${bamInput.metadata.bam_index} + --outFileName '$outFileName' + --outFileFormat '$outFileFormat' - --fragmentLength $fragmentLength - --binSize $binSize + --fragmentLength $fragmentLength + --binSize $binSize - #if $scaling.type=='rpkm': - --normalizeUsingRPKM - #elif $scaling.type=='1x': - --normalizeTo1x $scaling.normalizeTo1x - #elif $scaling.type=='own': - --scaleFactor $scaling.scaleFactor - #end if + #if $scaling.type=='rpkm': + --normalizeUsingRPKM + #elif $scaling.type=='1x': + --normalizeTo1x $scaling.normalizeTo1x + #elif $scaling.type=='own': + --scaleFactor $scaling.scaleFactor + #end if - ##if str($ignoreForNormalization).strip() != '': - ## --ignoreForNormalization $ignoreForNormalization - ##end if + ##if str($ignoreForNormalization).strip() != '': + ## --ignoreForNormalization $ignoreForNormalization + ##end if - #if $advancedOpt.showAdvancedOpt == "yes": - #if $advancedOpt.smoothLength: - --smoothLength '$advancedOpt.smoothLength' - #end if + #if $advancedOpt.showAdvancedOpt == "yes": + #if $advancedOpt.smoothLength: + --smoothLength '$advancedOpt.smoothLength' + #end if - #if str($advancedOpt.region.value) != '': - --region '$advancedOpt.region' - #end if - $advancedOpt.doNotExtendPairedEnds - $advancedOpt.ignoreDuplicates + #if str($advancedOpt.region.value) != '': + --region '$advancedOpt.region' + #end if + $advancedOpt.doNotExtendPairedEnds + $advancedOpt.ignoreDuplicates - #if $advancedOpt.minMappingQuality: - --minMappingQuality '$advancedOpt.minMappingQuality' - #end if + #if $advancedOpt.minMappingQuality: + --minMappingQuality '$advancedOpt.minMappingQuality' + #end if - #end if - </command> + #end if + </command> - <inputs> - <param name="bamInput" format="bam" type="data" label="Input BAM file" - help="The BAM file must be sorted."/> + <inputs> + <param name="bamInput" format="bam" type="data" label="Input BAM file" + help="The BAM file must be sorted."/> - <param name="fragmentLength" type="integer" value="300" min="1" - label="Length of the average fragment size" - help ="Reads will be extended to match this length unless they are paired-end, in which case they will be extended to match the fragment length. If this value is set to the read length or smaller, the read will not be extended. *Warning* the fragment length affects the normalization to 1x (see "normalize coverage to 1x"). The formula to normalize using the sequencing depth is genomeSize/(number of mapped reads * fragment length). *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will be extended to match the fragment length."/> + <param name="fragmentLength" type="integer" value="300" min="1" + label="Length of the average fragment size" + help ="Reads will be extended to match this length unless they are paired-end, in which case they will be extended to match the fragment length. If this value is set to the read length or smaller, the read will not be extended. *Warning* the fragment length affects the normalization to 1x (see "normalize coverage to 1x"). The formula to normalize using the sequencing depth is genomeSize/(number of mapped reads * fragment length). *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will be extended to match the fragment length."/> - <param name="binSize" type="integer" value="50" min="1" - label="Bin size in bp" - help="The genome will be divided in bins (also called tiles) of the specified length. For each bin the overlaping number of fragments (or reads) will be reported. If only half a fragment overlaps, this fraction will be reported. "/> + <param name="binSize" type="integer" value="50" min="1" + label="Bin size in bp" + help="The genome will be divided in bins (also called tiles) of the specified length. 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="own">Set your own scaling factor</option> - <option value="no">Do not normalize or scale</option> - </param> - <when value="rpkm"/> - <when value="no"/> - <when value="1x"> - <param name="normalizeTo1x" type="integer" value="2150570000" - label="Genome size" - help ="Enter the genome size to normalize the reads counts. Sequencing depth is defined as the total number of mapped reads * fragment length / effective genome size. To use this option, the effective genome size has to be given. Common values are: mm9: 2150570000, hg19:2451960000, dm3:121400000 and ce10:93260000."/> - </when> - <when value="own"> - <param name="scaleFactor" type="float" value="1" size="3" - label="Scale factor to multiply all values" /> - </when> - </conditional> + <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="own">Set your own scaling factor</option> + <option value="no">Do not normalize or scale</option> + </param> + <when value="rpkm"/> + <when value="no"/> + <when value="1x"> + <param name="normalizeTo1x" type="integer" value="2150570000" + label="Genome size" + help ="Enter the genome size to normalize the reads counts. Sequencing depth is defined as the total number of mapped reads * fragment length / effective genome size. To use this option, the effective genome size has to be given. Common values are: mm9: 2150570000, hg19:2451960000, dm3:121400000 and ce10:93260000."/> + </when> + <when value="own"> + <param name="scaleFactor" type="float" value="1" size="3" + label="Scale factor to multiply all values" /> + </when> + </conditional> <!-- Not yet supported. @@ -86,49 +86,49 @@ help="Sometimes it makes sense to exclude certain regions when calculating the scaling factor. For example, if you know some regions that you suspect to be present more often in your sample's genome than in the reference genome that will therefore accumulate reads (CNV). Another typical example is the single X chromosome in male samples that should be scaled separately from the diploid autosomes. For example chrX,chrY,chr3. or chr10:12220-128932" /> --> - <param name="outFileFormat" type="select" label="Coverage file format"> - <option value="bigwig" selected="true">bigwig</option> - <option value="bedgraph">bedgraph</option> - </param> - - <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 name="outFileFormat" type="select" label="Coverage file format"> + <option value="bigwig" selected="true">bigwig</option> + <option value="bedgraph">bedgraph</option> </param> - <when value="no" /> - <when value="yes"> - <param name="smoothLength" type="integer" value="1" optional="true" min="1" - label="Smooth values using the following length (in bp)" - help ="The smooth length defines a window, larger than the bin size, to average the number of reads. For example, if the bin size is set to 20 bp and the smooth length is set to 60 bp, then, for each bin size the average of it and its left and right neighbors is considered. Any value smaller than the bin size will be ignored and no smoothing will be applied."/> - <param name="region" type="text" value="" - label="Region of the genome to limit the operation to" - help="This is useful when testing parameters to reduce the computing time. The format is chr:start:end, for example "chr10" or "chr10:456700:891000"" /> + <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"> + <param name="smoothLength" type="integer" value="1" optional="true" min="1" + label="Smooth values using the following length (in bp)" + help ="The smooth length defines a window, larger than the bin size, to average the number of reads. For example, if the bin size is set to 20 bp and the smooth length is set to 60 bp, then, for each bin size the average of it and its left and right neighbors is considered. Any value smaller than the bin size will be ignored and no smoothing will be applied."/> + + <param name="region" type="text" value="" + label="Region of the genome to limit the operation to" + help="This is useful when testing parameters to reduce the computing time. The format is chr:start:end, for example "chr10" or "chr10:456700:891000"" /> - <param name="doNotExtendPairedEnds" type="boolean" truevalue="--doNotExtendPairedEnds" falsevalue="" - label="Do not extend paired ends" - help="If set, reads are not extended to match the fragment length reported in the BAM file, instead they will be extended to match the fragment length. Default is to extend the reads if paired end information is available."/> + <param name="doNotExtendPairedEnds" type="boolean" truevalue="--doNotExtendPairedEnds" falsevalue="" + label="Do not extend paired ends" + help="If set, reads are not extended to match the fragment length reported in the BAM file, instead they will be extended to match the fragment length. Default is to extend the reads if paired end information is available."/> - <param name="ignoreDuplicates" type="boolean" truevalue="--ignoreDuplicates" falsevalue="" - label="Ignore duplicates" - help="If set, reads that have the same orientation and start position will be considered only once. If reads are paired, the mate position also has to coincide to ignore a read." /> + <param name="ignoreDuplicates" type="boolean" truevalue="--ignoreDuplicates" falsevalue="" + label="Ignore duplicates" + help="If set, reads that have the same orientation and start position will be considered only once. If reads are paired, the mate position also has to coincide to ignore a read." /> - <param name="minMappingQuality" type="integer" optional="true" value="1" min="1" - label="Minimum mapping quality" - help= "If set, only reads that have a mapping quality score higher than the given value are considered. *Note* Bowtie's Mapping quality is related to uniqueness: the higher the score, the more unique is a read. A mapping quality defined by Bowtie of 10 or less indicates that there is at least a 1 in 10 chance that the read truly originated elsewhere."/> - </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> - <help> + <param name="minMappingQuality" type="integer" optional="true" value="1" min="1" + label="Minimum mapping quality" + help= "If set, only reads that have a mapping quality score higher than the given value are considered. *Note* Bowtie's Mapping quality is related to uniqueness: the higher the score, the more unique is a read. A mapping quality defined by Bowtie of 10 or less indicates that there is at least a 1 in 10 chance that the read truly originated elsewhere."/> + </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> + <help> **What it does**
--- a/bamFingerprint.xml Wed Oct 30 09:44:05 2013 -0400 +++ b/bamFingerprint.xml Thu Nov 14 05:43:15 2013 -0500 @@ -10,21 +10,8 @@ #set files=[] #set labels=[] - #for $i in $inputs - #set $temp_input_handle = tempfile.NamedTemporaryFile( dir=$temp_dir ) - #set $temp_input_path = $temp_input_handle.name - #silent $temp_input_handle.close() - #silent os.system("ln -s %s %s.bam" % (str($i.bamfile), $temp_input_path)) - #silent os.system("ln -s %s %s.bam.bai" % (str($i.bamfile.metadata.bam_index), $temp_input_path)) - #silent $files.append('%s.bam' % $temp_input_path) - ##set $files += [str($i.bamfile)] - #if str($i.label.value) != "": - #set $labels += ["\"%s\"" % ($i.label.value)] - #else - #set $labels += ["\"%s\"" % ($i.bamfile.name)] - #end if - #end for + @multiple_input_bams@ bamFingerprint
--- a/deepTools_macros.xml Wed Oct 30 09:44:05 2013 -0400 +++ b/deepTools_macros.xml Thu Nov 14 05:43:15 2013 -0500 @@ -68,7 +68,7 @@ </token> <macro name="multiple_input_bams"> - <repeat name="inputs" title="Input files" min="2"> + <repeat name="input_files" title="Input files" min="2"> <param name="bamfile" type="data" format="bam" label="Bam file" help="The BAM file must be sorted."/> @@ -78,6 +78,24 @@ </repeat> </macro> + <token name="@multiple_input_bams@"> + #for $i in $input_files: + #set $temp_input_handle = tempfile.NamedTemporaryFile( dir=$temp_dir ) + #set $temp_input_path = $temp_input_handle.name + #silent $temp_input_handle.close() + #silent os.system("ln -s %s %s.bam" % (str($i.bamfile), $temp_input_path)) + #silent os.system("ln -s %s %s.bam.bai" % (str($i.bamfile.metadata.bam_index), $temp_input_path)) + #silent $files.append('%s.bam' % $temp_input_path) + + ##set $files += [str($i.bamfile)] + #if str($i.label.value) != "": + #set $labels += ["\"%s\"" % ($i.label.value)] + #else + #set $labels += ["\"%s\"" % ($i.bamfile.name)] + #end if + #end for + </token> + <macro name="reference_genome_source"> <conditional name="source"> <param name="ref_source" type="select" label="Reference genome">
--- a/readme.rst Wed Oct 30 09:44:05 2013 -0400 +++ b/readme.rst Thu Nov 14 05:43:15 2013 -0500 @@ -29,7 +29,7 @@ Citation ======== -deeptools are currently under review. In the meantime please refere to https://github.com/fidelram/deepTools. +deeptools are currently under review. In the meantime please refere to ======= @@ -39,23 +39,25 @@ - v1.0: Initial public release -Licence (MIT) -============= - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +=============================== +Wrapper Licence (MIT/BSD style) +=============================== -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +Permission to use, copy, modify, and distribute this software and its +documentation with or without modifications and for any purpose and +without fee is hereby granted, provided that any copyright notices +appear in all copies and that both those copyright notices and this +permission notice appear in supporting documentation, and that the +names of the contributors or copyright holders not be used in +advertising or publicity pertaining to distribution of the software +without specific prior permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THE CONTRIBUTORS AND COPYRIGHT HOLDERS OF THIS SOFTWARE DISCLAIM ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT +OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE +OR PERFORMANCE OF THIS SOFTWARE. +
--- a/tool_dependencies.xml Wed Oct 30 09:44:05 2013 -0400 +++ b/tool_dependencies.xml Thu Nov 14 05:43:15 2013 -0500 @@ -10,7 +10,7 @@ <repository changeset_revision="966f29c955b9" name="package_matplotlib_1_2" owner="iuc" toolshed="http://testtoolshed.g2.bx.psu.edu" /> </package> <package name="scipy" version="0.12.0"> - <repository changeset_revision="00ebc3417b7e" name="package_scipy_0_12" owner="iuc" toolshed="http://testtoolshed.g2.bx.psu.edu" /> + <repository changeset_revision="3c1bf479158c" name="package_scipy_0_12" owner="iuc" toolshed="http://testtoolshed.g2.bx.psu.edu" /> </package> <package name="pysam" version="0.7.6"> <repository changeset_revision="247e5e5bee87" name="package_pysam_0_7_6" owner="iuc" toolshed="http://testtoolshed.g2.bx.psu.edu" />