view computeGCBias.xml @ 51:6a2a7374450b

Uploaded
author bgruening
date Fri, 02 Aug 2013 13:53:20 -0400
parents b716d69ac94b
children 411c871f4cfd
line wrap: on
line source

<tool id="computeGCBias" name="computeGCBias" version="1.0">
  <description></description>
  <requirements>
    <requirement type="package" version="1.5.1_98e5d8a61431ea8605c0643d991a1a5d8999b4dc">deepTools</requirement>
  </requirements>
  <stdio>
    <exit_code range="0" level="warning" description="Warning" />
  </stdio>
  <command>
  computeGCBias
  --bamfile '$bamInput'
  --species '$species'
  --GCbiasFrequenciesFile $outFileName
  --fragmentLength $fragmentLength
  
  #if $source.ref_source=="history":
    --genome $source.input1
  #else:
    --genome "${source.input1_2bit.fields.path}"
  #end if
  
  #if $advancedOpt.showAdvancedOpt == "yes":
    #if str($advancedOpt.region.value) != '':
      --region '$advancedOpt.region'
    #end if
    
    --binSize '$advancedOpt.binSize'
    --sampleSize '$advancedOpt.sampleSize'
    --regionSize '$advancedOpt.regionSize'
    
    #if $advancedOpt.filterOut:
      --filterOut $advancedOpt.filterOut
    #end if
    
    #if $advancedOpt.extraSampling:
      --extraSampling $advancedOpt.extraSampling
    #end if
    
  #end if
  
  #set move=""
  #if $output.showOutputSettings == "yes"
      #if $output.saveBiasPlot:
        --biasPlot biasPlot.png
        #set move="mv biasPlot.png $biasPlot"
      #end if
  #end if
  ; $move

  </command>

  <inputs>
  
  <param name="bamInput" format="bam" type="data" label="Input BAM file"
	   help="The BAM file must be sorted and indexed."/>
  
  <param name="species" type="text" value="" label="Species name abbreviation" />
  
  <conditional name="source">
    <param name="ref_source" type="select" label="Reference genome">
        <option value="cached">locally cached</option>
        <option value="history">in your history</option>
    </param>
    <when value="cached">
        <param name="input1_2bit" type="select" label="Using reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
            <options from_data_table="deepTools_seqs" />
        </param>
    </when>
    <when value="history">
        <param name="input1" type="data" format="twobit" label="Select a reference dataset in 2bit format" />
    </when>
  </conditional>
  <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 based 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 &quot;chr10&quot; or &quot;chr10:456700:891000&quot;" />
	       
	       <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."/>
	         
	       <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. By default, the bin size is set to 300bp, which is close to the standard fragment size for Illumina machines. 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>
  
  <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>(output['showOutputSettings'] == 'yes' and output['saveBiasPlot'] == True)</filter>
    </data>
  </outputs>
  <help>

**What it does**

Computes the GC bias ussing Benjamini's method [citation]. The resulting GC
bias can later be used to plot the bias or to correct the bias.

-----

.. class:: infomark

Please acknowledge that this tool **is still in development** and we will be very happy to receive feedback from the users. If you run into any trouble please sent an email to `Fidel Ramirez`_.

This tool is developed by the `Bioinformatics and Deep-Sequencing Unit`_ at the `Max Planck Institute for Immunobiology and Epigenetics`_.


.. _Bioinformatics and Deep-Sequencing Unit: http://www3.ie-freiburg.mpg.de/facilities/research-facilities/bioinformatics-and-deep-sequencing-unit/
.. _Max Planck Institute for Immunobiology and Epigenetics: http://www3.ie-freiburg.mpg.de
.. _Fidel Ramirez: ramirez@ie-freiburg.mpg.de

  </help>
  
</tool>