view pyCRAC/pyGTF2bedGraph.xml @ 1:7c9574213c0a draft default tip

Uploaded
author swebb
date Thu, 20 Jun 2013 12:13:43 -0400
parents 19b20927172d
children
line wrap: on
line source

<tool id="pyGTF2bedGraph" name="pyGTF2bedGraph">
	  <description>converter</description>
	  <requirements>
        	<requirement type="package">pyCRAC</requirement>
    	  </requirements>
 	  <command interpreter="perl">pyGTF2bedGraph.pl --gtf $input --po $po --mo $mo
	  --chromfile $addchr.chr
	  -t $type
	  --count $count
	  $iclip
	  #if $addtrack.track == "--track":
	   --track
	   --name $addtrack.name
	   --description $addtrack.description
	   #if $addtrack.colorscheme.colorsel == "default":
	    --color $addtrack.colorscheme.color
	   #else:
	    -s '$addtrack.colorscheme.plus,$addtrack.colorscheme.minus'
	   #end if#
	  #end if#
	  --id $po.id
 	  </command>
	  <version_command>/usr/local/bin/pyGTF2bedGraph.py --version</version_command>
 	  <inputs>
	      <param name="input" type="data" format="gtf" label="GTF file --gtf"/>
              <conditional name="addchr">
		<param name="chrfile" type="select"  label="Choose Chromosome length file from">
		  <option value="default" selected="true">Defaults</option>
		  <option value="other">History</option>
		</param>
		<when value="default">
		  <param name="chr" type="select"  label="Chromosome length file -c" help="This file should have two columns: first column is the names of the chromosomes, second column is length of the chromosomes. Use pyCrac utility pyCalculateChromosomeLengths to create.">
		    <options from_data_table="pycrac_chr"/>
		  </param>
		</when>
		<when value="other">
		  <param format="tabular" name="chr" type="data" label="Chromosome length file -c" help="This file should have two columns: first column is the names of the chromosomes, second column is length of the chromosomes"/>
		</when>
	      </conditional>
	      <param name="type" type="select"  label="Choose type of data -t">
                  <option value="reads" selected="true">Reads</option>
                  <option value="substitutions">Substitutions</option>
                  <option value="deletions">Deletions</option>
	      </param>
	      <param format="integer" name="count" type="integer" label="Count per feature --count " value="1" size="5" help="Takes the numbers in the 'score' column of the GTF file as the total number of reads for each position" >
		<validator type="in_range" min="1" message="Please enter a value >= 1"/>
	      </param>
	      <param name="iclip" type="select" label="iCLIP mode --iCLIP">
		<option value="" selected="true">OFF</option>
		<option value="--iCLIP">ON</option>
	      </param>
	      <conditional name="addtrack">
		<param name="track" type="select" label="Add UCSC track line to output">
		  <option value="" selected="true">NO</option>
		  <option value="--track">YES</option>
		</param>
		<when value=""/>
		<when value="--track">
		  <param name="name" format="txt" type="text" value="User_supplied_track" size="80" label="Track name"/>
                  <param name="description" format="txt" type="text" value="User_supplied_track" size="80" label="Track description"/>
		  <conditional name="colorscheme">
		  <param name="colorsel" type="select" label="Colouring scheme">
		    <option value="default" selected="true">One Colour</option>
		    <option value="strand">By Strand</option>
		  </param>
		  <when value="default">
		    <param name="color" type="select" label="Choose track colour">
		      <option value="black" selected="true">Black</option>
		      <option value="red">Red</option>
                      <option value="blue">Blue</option>
                      <option value="green">Green</option>
                      <option value="purple">Purple</option>
		    </param>            
		  </when>
                  <when value="strand">
                    <param name="plus" type="select" label="Choose forward strand track colour">
                      <option value="black" selected="true">Black</option>
                      <option value="red">Red</option>
                      <option value="blue">Blue</option>
                      <option value="green">Green</option>
                      <option value="purple">Purple</option>
                    </param>
		    <param name="minus" type="select" label="Choose minus strand track colour">
                      <option value="black" selected="true">Black</option>
                      <option value="red">Red</option>
                      <option value="blue">Blue</option>
                      <option value="green">Green</option>
                      <option value="purple">Purple</option>
		    </param>
                  </when>
		  </conditional>
		</when>
	      </conditional>
	      <param name="label" type="text" format="txt" size="30" value="pyGTF2bedGraph" label="Enter output file label -o" />
 	  </inputs>
 	  <outputs>
	    <data name="po" format="bedgraph" label="${label.value}_plus_strand.bg"/>
            <data name="mo" format="bedgraph" label="${label.value}_minus_strand.bg"/>
 	  </outputs>
	  <help>

.. class:: infomark

**pyGTF2bedGraph**

pyGTF2bedGraph is part of the pyCRAC_ package. Generates bedgraph files for each chromosome. An homage to bedtools genomecoverage. Takes a pyReadCounters GTF file as input file. Can also output bedGraph files for substitutions and deletions.
   
.. _pyCRAC: http://sandergranneman.bio.ed.ac.uk/Granneman_Lab/pyCRAC_software.html
        
------

**Parameter list**

File input options::

    --gtf=readdata.gtf  
                        type the path to the gtf file data file. Be default it
                        expects data from the standard input
    -o converted        
                        provide a name for an output file. A file extension or
                        strand information is not necessary.
    -c yeast.txt, --chromfile=yeast.txt
                        Location of the chromosome info file. This file should
                        have two columns: first column is the names of the
                        chromosomes, second column is length of the
                        chromosomes. Default is yeast
    -t TYPE, --type=TYPE
                        this tool can generate bedGraph files for reads,
                        substitutions or deletions. Please use
                        'reads','substitutions' or 'deletions' to indicate the
                        type of data. Default='reads'
    --count             
                        Takes the numbers in the 'score' column of the GTF
                        file as the total number of reads for each position.
                        Default is 1 for each interval.
    --iCLIP             
                        This turns on the iCLIP mode and the sgr reads or cDNA
                        files will report cross-linking site frequencies in
                        iCLIP data
    -v, --verbose       
                        to print status messages to a log file

These options can be used to add a track line for the UCSC genome browser::

    --track             
                        Use this flag to add a UCSC genome browser track line
                        to the beginning of your file
    -n NAME, --name=NAME
                        For the USCS track line: provide a track name. Default
                        = 'User_supplied_track'
    -d DESCRIPTION, --description=DESCRIPTION
                        For the USCS track line: provide a track description.
                        Default = 'User_supplied_track'
    --color=COLOR       
                        select the track color. Default = black
    -s STRANDS, --colorstrands=STRANDS
                        select the colors for each strand. Default =
                        'red,blue'

 	  </help>
</tool>