Mercurial > repos > bgruening > deeptools
changeset 28:1e5fcb1555de draft
Uploaded
author | bgruening |
---|---|
date | Mon, 16 Dec 2013 04:51:41 -0500 |
parents | f996339050ac |
children | 60788be7b346 |
files | bamFingerprint.xml computeGCBias.xml correctGCBias.xml deepTools_macros.xml tool_dependencies.xml |
diffstat | 5 files changed, 139 insertions(+), 143 deletions(-) [+] |
line wrap: on
line diff
--- a/bamFingerprint.xml Sat Dec 14 16:13:11 2013 -0500 +++ b/bamFingerprint.xml Mon Dec 16 04:51:41 2013 -0500 @@ -26,12 +26,16 @@ #set newoutFileName=str($outFileName)+".png" --plotFile $newoutFileName - #if $outputOpt.showOutputOpt == "yes" - #if $outputOpt.saveRawCounts: + #if $output.showOutputSettings == "yes" + --plotFileFormat $output.outFileFormat + #if $output.saveRawCounts: --outRawCounts '$outFileRawCounts' #end if + #else + --plotFileFormat 'png' #end if + #if $advancedOpt.showAdvancedOpt == "yes": #if str($advancedOpt.region.value) != '': @@ -95,22 +99,28 @@ </when> </conditional> - <conditional name="outputOpt"> - <param name="showOutputOpt" type="select" label="Show additional output options" > + <conditional name="output"> + <param name="showOutputSettings" type="select" label="Show advanced output settings"> <option value="no" selected="true">no</option> <option value="yes">yes</option> </param> <when value="no" /> <when value="yes"> + <expand macro="input_image_file_format" /> <param name="saveRawCounts" type="boolean" label="Save the bin counts"/> </when> </conditional> </inputs> <outputs> - <data format="png" name="outFileName" /> + <expand macro="output_image_file_format" /> <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts"> - <filter>(outputOpt['showOutputOpt'] == 'yes' and outputOpt['saveRawCounts'] == True)</filter> + <filter> + (( + outputOpt['showOutputOpt'] == 'yes' and + outputOpt['saveRawCounts'] is True + )) + </filter> </data> </outputs> <help>
--- a/computeGCBias.xml Sat Dec 14 16:13:11 2013 -0500 +++ b/computeGCBias.xml Mon Dec 16 04:51:41 2013 -0500 @@ -10,7 +10,6 @@ ln -s $bamInput.metadata.bam_index local_bamInput.bam.bai; computeGCBias - @THREADS@ --bamfile 'local_bamInput.bam' @@ -42,79 +41,73 @@ #end if #end if - #if $saveBiasPlot: - --biasPlot $biasPlot + #if str($image_format) != 'none': + --biasPlot $outImageName + --plotFileFormat $image_format #end if - - ## #if $output.showOutputSettings == "yes" - ## #if $output.saveBiasPlot: - ## --biasPlot biasPlot.png ; - ## mv biasPlot.png $biasPlot - ## #end if - ## #end if - </command> <inputs> - <param name="bamInput" format="bam" type="data" label="BAM file" help="The BAM file must be sorted."/> <expand macro="reference_genome_source" /> <expand macro="effectiveGenomeSize" /> - <param name="fragmentLength" type="integer" value="300" min="1" - label="Fragment length used for the sequencing" - help ="If paired-end reads are used, the fragment length is computed from the BAM file."/> + <param name="fragmentLength" type="integer" value="300" min="1" + label="Fragment length used for the sequencing" + help ="If paired-end reads are used, the fragment length is computed from the BAM file."/> + <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="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="sampleSize" type="integer" value="50000000" min="1" + label="Number of sampling points to be considered" /> - <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="regionSize" type="integer" value="300" min="1" + label="Region size" + help ="To plot the reads per GC over a region, the size of the region is required (see below for more details of the mthod). By default, the bin size is set to 300 bp, which is close to the standard fragment size many sequencing applications. However, if the depth of sequencing is low, a larger bin size will be required, otherwise many bins will not overlap with any read."/> + + <param name="filterOut" type="data" format="bed" optional="true" + label="BED file containing genomic regions to be excluded from the estimation of the correction" + help="Such regions usually contain repetitive regions and peaks that if included will bias the correction. It is recommended to filter out known repetitive regions if multi-reads (reads that map to more than one genomic position) were excluded. In the case of ChIP-seq data, it is recommended to first use a peak caller to identify and filter out the identified peaks." /> + <param name="extraSampling" type="data" format="bed" optional="true" + label="BED file containing genomic regions for which extra sampling is required because they are underrepresented in the genome" + help="" /> + </when> + </conditional> + <param name="image_format" type="select" label="GC bias plot" help="If given, a diagnostic image summarizing the GC bias found on the sample will be created."> + <option value="none" selected="true">No image</option> + <option value="png">Image in png format</option> + <option value="pdf">Image in pdf format</option> + <option value="svg">Image in svg format</option> + <option value="eps">Image in eps format</option> + <option value="emf">Image in emf format</option> </param> - <when value="no" /> - <when value="yes"> - <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="sampleSize" type="integer" value="50000000" min="1" - label="Number of sampling points to be considered" /> - - <param name="regionSize" type="integer" value="300" min="1" - label="Region size" - help ="To plot the reads per GC over a region, the size of the region is required (see below for more details of the mthod). By default, the bin size is set to 300 bp, which is close to the standard fragment size many sequencing applications. However, if the depth of sequencing is low, a larger bin size will be required, otherwise many bins will not overlap with any read."/> - - <param name="filterOut" type="data" format="bed" optional="true" - label="BED file containing genomic regions to be excluded from the estimation of the correction" - help="Such regions usually contain repetitive regions and peaks that if included will bias the correction. It is recommended to filter out known repetitive regions if multi-reads (reads that map to more than one genomic position) were excluded. In the case of ChIP-seq data, it is recommended to first use a peak caller to identify and filter out the identified peaks." /> - <param name="extraSampling" type="data" format="bed" optional="true" - label="BED file containing genomic regions for which extra sampling is required because they are underrepresented in the genome" - help="" /> - </when> - </conditional> - - <param name="saveBiasPlot" type="boolean" truevalue="--biasPlot" falsevalue="" checked="True" label="Save a diagnostic image summarizing the GC bias found on the sample"/> - <!-- - <conditional name="output" > - <param name="showOutputSettings" 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="saveBiasPlot" type="boolean" label="Save a diagnostic image summarizing the GC bias found on the sample"/> - </when> - </conditional> - --> - </inputs> - <outputs> - <data format="tabular" name="outFileName" /> - <data format="png" name="biasPlot" label="${tool.name} on ${on_string}: bias plot"> - <filter>saveBiasPlot is True</filter> - <!--<filter>(output['showOutputSettings'] == 'yes' and output['saveBiasPlot'] == True)</filter>--> - </data> - </outputs> - <help> + </inputs> + <outputs> + <data format="tabular" name="outFileName" /> + <data format="png" name="outImageName" label="${tool.name} GC-bias Plot"> + <filter> + (( + image_format != 'none' + )) + </filter> + <change_format> + <when input="image_format" value="pdf" format="pdf" /> + <when input="image_format" value="svg" format="svg" /> + <when input="image_format" value="eps" format="eps" /> + <when input="image_format" value="emf" format="emf" /> + </change_format> + </data> + </outputs> + <help> **What it does**
--- a/correctGCBias.xml Sat Dec 14 16:13:11 2013 -0500 +++ b/correctGCBias.xml Mon Dec 16 04:51:41 2013 -0500 @@ -5,91 +5,84 @@ <macros> <import>deepTools_macros.xml</import> </macros> - <command> - #import tempfile - #set $temp_dir = os.path.abspath(tempfile.mkdtemp()) + <command> + #import tempfile + #set $temp_dir = os.path.abspath(tempfile.mkdtemp()) - #set $temp_bam_handle = tempfile.NamedTemporaryFile( dir=$temp_dir ) - #set $temp_bam_path = $temp_bam_handle.name + '.bam' - #silent $temp_bam_handle.close() - #silent os.system("ln -s %s %s" % (str($bamInput), $temp_bam_path)) - #silent os.system("ln -s %s %s.bai" % (str($bamInput.metadata.bam_index), $temp_bam_path)) + #set $temp_bam_handle = tempfile.NamedTemporaryFile( dir=$temp_dir ) + #set $temp_bam_path = $temp_bam_handle.name + '.bam' + #silent $temp_bam_handle.close() + #silent os.system("ln -s %s %s" % (str($bamInput), $temp_bam_path)) + #silent os.system("ln -s %s %s.bai" % (str($bamInput.metadata.bam_index), $temp_bam_path)) - correctGCBias + correctGCBias - @THREADS@ + @THREADS@ - --bamfile '$temp_bam_path' - --GCbiasFrequenciesFile $GCbiasFrequenciesFile + --bamfile '$temp_bam_path' + --GCbiasFrequenciesFile $GCbiasFrequenciesFile - @reference_genome_source@ + @reference_genome_source@ - #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific": - --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize - #else: - --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt - #end if - + #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific": + --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize + #else: + --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt + #end if - #if $advancedOpt.showAdvancedOpt == "yes": - #if str($advancedOpt.region.value) != '': - --region '$advancedOpt.region' - #end if - - --binSize '$advancedOpt.binSize' - #end if - - #set newoutFileName="corrected."+str($outFileFormat) - - --correctedFile $newoutFileName; mv $newoutFileName $outFileName + #if $advancedOpt.showAdvancedOpt == "yes": + #if str($advancedOpt.region.value) != '': + --region '$advancedOpt.region' + #end if + --binSize '$advancedOpt.binSize' + #end if - </command> - - <inputs> + #set newoutFileName="corrected."+str($outFileFormat) + --correctedFile $newoutFileName; - <param name="GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" /> - - <param name="bamInput" format="bam" type="data" label="BAM file" help="This should be same file that was used for computeGCbias. The BAM file must be sorted."/> - + mv $newoutFileName $outFileName + </command> + <inputs> + <param name="GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" /> + <param name="bamInput" format="bam" type="data" label="BAM file" help="This should be same file that was used for computeGCbias. The BAM file must be sorted."/> <expand macro="reference_genome_source" /> <expand macro="effectiveGenomeSize" /> - <param name="outFileFormat" type="select" label="File format of the output"> - <option value="bam">bam</option> - <option value="bw">bigwig</option> - <option value="bg">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> - <when value="no" /> - <when value="yes"> - <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="binSize" type="integer" value="50" min="1" - label="Bin size in bp" - help="Size of the bins in bp for the ouput of the bigwig/bedgraph file."/> - </when> - </conditional> - </inputs> - - <outputs> - <data format="bam" name="outFileName"> - <change_format> - <when input="outFileFormat" value="bw" format="bigwig" /> - <when input="outFileFormat" value="bam" format="bam" /> - <when input="outFileFormat" value="bg" format="bedgraph" /> - </change_format> - </data> - </outputs> - <help> + <param name="outFileFormat" type="select" label="File format of the output"> + <option value="bam">bam</option> + <option value="bw">bigwig</option> + <option value="bg">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> + <when value="no" /> + <when value="yes"> + <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="binSize" type="integer" value="50" min="1" + label="Bin size in bp" + help="Size of the bins in bp for the ouput of the bigwig/bedgraph file."/> + </when> + </conditional> + </inputs> + <outputs> + <data format="bam" name="outFileName"> + <change_format> + <when input="outFileFormat" value="bw" format="bigwig" /> + <when input="outFileFormat" value="bam" format="bam" /> + <when input="outFileFormat" value="bg" format="bedgraph" /> + </change_format> + </data> + </outputs> + <help> **What it does**
--- a/deepTools_macros.xml Sat Dec 14 16:13:11 2013 -0500 +++ b/deepTools_macros.xml Mon Dec 16 04:51:41 2013 -0500 @@ -43,7 +43,7 @@ <requirement type="package" >samtools</requirement> <requirement type="package" >deepTools</requirement> <requirement type="package" >ucsc_tools</requirement> - <requirement type="package" version="1.5.4_6765c227d9628f8e6ba690e6fde7f1d86c497b49">deepTools</requirement> + <requirement type="package" version="1.5.4_74aac0843a956ca352e3e85087f20c8f158e2f7d">deepTools</requirement> <requirement type="package" version="0.1">ucsc_tools</requirement> <requirement type="package" version="1.7.1">numpy</requirement> <requirement type="package" version="0.7.7">pysam</requirement>
--- a/tool_dependencies.xml Sat Dec 14 16:13:11 2013 -0500 +++ b/tool_dependencies.xml Mon Dec 16 04:51:41 2013 -0500 @@ -57,7 +57,7 @@ <readme>The tools downloaded by this dependency definition are free for academic use. TODO: UCSC tools are only available with their latest version. That is not good for reproducibility.</readme> </package> - <package name="deepTools" version="1.5.4_6765c227d9628f8e6ba690e6fde7f1d86c497b49"> + <package name="deepTools" version="1.5.4_74aac0843a956ca352e3e85087f20c8f158e2f7d"> <install version="1.0"> <actions> <action type="shell_command">git clone --recursive https://github.com/fidelram/deepTools.git</action> @@ -79,7 +79,7 @@ <package name="scipy" version="0.12.0" /> </repository> </action> - <action type="shell_command">git reset --hard 6765c227d9628f8e6ba690e6fde7f1d86c497b49</action> + <action type="shell_command">git reset --hard 74aac0843a956ca352e3e85087f20c8f158e2f7d</action> <action type="make_directory">$INSTALL_DIR/lib/python</action> <action type="shell_command"> export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python &&