view sRbowtieParser.xml @ 3:3fcc752a7101 draft

planemo upload for repository https://bitbucket.org/drosofff/gedtools/
author mvdbeek
date Thu, 11 Jun 2015 10:16:18 -0400
parents 70193ce0540e
children 2c7f42686440
line wrap: on
line source

<tool id="sRbowtieParser" name="Parse items in sRbowtie alignment" version="1.0.2">
  <description></description>
  <requirements>
	<requirement type="package" version="0.12.7">bowtie</requirement>
        <requirement type="package" version="1.2">samtools</requirement>
        <requirement type="package" version="0.7.7">pysam</requirement>
        <requirement type="package" version="0.14">python_2_7_scipy</requirement>
 </requirements>
<command interpreter="python">
        sRbowtieParser.py 
	          #if $refGenomeSource.genomeSource == "history":
                    --IndexSource $refGenomeSource.ownFile
         	    --ExtractDirective fastaSource
          	  #else:
		    #silent reference= filter( lambda x: str( x[0] ) == str( $input_list.dbkey ), $__app__.tool_data_tables[ 'bowtie_indexes' ].get_fields() )[0][-1]
            	    --IndexSource $reference
            	    --ExtractDirective bowtieIndex
          	  #end if
		  --output $output
		  --polarity $polarity
                  --alignmentSource
		  #for $i in $refGenomeSource.input_list
    		    $i
		  #end for
                  --alignmentFormat
                  #for $i in $refGenomeSource.input_list
                    $i.ext
                  #end for
                  --alignmentLabel          
                  #for $i in $refGenomeSource.input_list
                    "$i.name"
                  #end for

</command>
  <inputs>
       <conditional name="refGenomeSource">
           <param name="genomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options">
               <option value="indexed">Use a built-in index</option>
               <option value="history">Use one from the history</option>
           </param>
           <when value="indexed">
               <param name="input_list" type="data" label="Select multiple alignments to parse" multiple="true">
                  <validator type="dataset_metadata_in_data_table" table_name="bowtie_indexes" metadata_name="dbkey" metadata_column="0" message="database not set for this bowtie output. Select the database(=genome used for matching) manually, or select a reference fasta from your history."/>
               </param>
           </when>
           <when value="history">
                <param name="ownFile" type="data" format="fasta"  label="Select the fasta reference" />
	        <param name="input_list" type="data" label="Select multiple alignments to parse" multiple="true"/>
           </when>
       </conditional>  <!-- refGenomeSource -->
       <param name="polarity" type="select" label="how to count sense and antisense reads">
         <option value="both">count both sense and antisense reads</option>
         <option value="forward">count only sense reads</option>
         <option value="reverse">count only antisense reads</option>
       </param>
   </inputs>
   <outputs>
   <data format="tabular" name="output" label="Read Count  Lists"/>
   </outputs>
  <help>

**What it does**

Parses read counts from one or several sRBowtie alignments (in tabular, Sam or Bam format).
Here a bowtie match done against an index composed of a set of items is parsed and expressed as a hit list of the corresponding items

Sense, antisense or both sense and antisense alignments can be counted

The library labels are infered from the input dataset names in the galaxy history.

**It is thus essential that input datasets are appropriately renamed**

**it is preferable that you do not put any space in this input dataset names. You may edit these names in the history**

  </help>
  <tests>
    <test>
      <param name="genomeSource" value="history" />
      <param name="ownFile" value ="dme-mir-v20" ftype="fasta" />
      <param name="input_list" value="matchedSample_1,matchedSample_2" ftype="tabular" />
      <param name="polarity" value="forward" />
      <output name="output" ftype="tabular" file="Read_Count_Lists.tab" />
    </test>
  </tests>
</tool>