view translate_bed_sequences.xml @ 5:c626a939eef7 draft default tip

Uploaded
author jjohnson
date Tue, 12 Jan 2016 14:38:03 -0500
parents 3b526a780849
children
line wrap: on
line source

<?xml version="1.0"?>
<tool id="translate_bed_sequences" name="Translate BED Sequences" version="0.1.0">
  <description>3 frame translation of BED augmented with a sequence column</description>
  <requirements>
    <requirement type="package" version="1.62">biopython</requirement>
    <requirement type="python-module">Bio</requirement>
  </requirements>
  <command interpreter="python">
  translate_bed_sequences.py  --input "$input" 
  #if $fa_db:
   --fa_db='$fa_db'
  #end if
  #if $fa_sep:
   --fa_sep='$fa_sep'
  #end if
  #if $id_prefix:
   --id_prefix='$id_prefix'
  #end if
  #if $reference:
   --reference $reference
  #else:
   --reference ${input.metadata.dbkey}
  #end if
  #if $refsource:
   --refsource $refsource
  #end if
  #if $seqtype:
    --seqtype $seqtype
  #end if
  #if $score_name:
    --score_name $score_name
  #end if
  #if $filter.filterseqs == 'yes':
    #if $filter.leading_bp:
      --leading_bp $filter.leading_bp
    #end if
    #if $filter.trailing_bp:
      --trailing_bp $filter.trailing_bp
    #end if
  #else:
    --unfiltered
  #end if
  #if $trim.trimseqs == 'no':
    --untrimmed
    #if str($trim.max_stop_codons) != '':
      --max_stop_codons $trim.max_stop_codons
    #end if
  #end if
  #if str($min_length) != '':
   --min_length $min_length 
  #end if
  --bed $translated_bed
  --output "$output"
  </command>
  <inputs>
    <param name="input" type="data" format="bed" label="BED file with added sequence column" 
           help="Output from 'Extract Genomic DNA' run on tophat junctions.bed "/> 
    <param name="fa_db" type="text" value="" optional="true" label="fasta ID source, e.g. generic"
           help="Any Compomics application such as PeptideShaker, requires a source">
    </param>
    <param name="fa_sep" type="text" value="" optional="true" label="fasta ID source, e.g. generic"
           help="Only used when a fasta ID source is given, default to the pipe character">
    </param>
    <param name="id_prefix" type="text" value="" optional="true" label="ID prefix for generated IDs"
           help="Can be used to distinguish samples">
        <validator type="regex" message="Allowed chars:a-z A-Z 0-9 _ - |">^[a-zA-Z0-9_-|]*$</validator>
    </param>
    <param name="refsource" type="text" value="Ensembl" optional="true" label="Genome reference source"
           help=""/>
    <param name="reference" type="text" value="" optional="true" label="Genome reference name"
           help="By default, the database metadata will be used."/>
    <param name="seqtype" type="text" value="" optional="true" label="The SEQTYPE:STATUS to include in the fasta ID lines"
           help="For example:  pep:splice"/>
    <param name="score_name" type="text" value="" optional="true" label="Add the bed score field fasta ID line with this tag name"
           help="For example:  with the tag name 'depth' and bed score 12:   depth:12"/>
    <conditional name="filter">
      <param name="filterseqs" type="select" label="Filter out translations with stop codons before the splice site">
        <option value="yes" selected="true">Yes</option>
        <option value="no">No</option>
      </param>
      <when value="yes">
        <param name="leading_bp" type="integer" value="" min="0" optional="true" label="Stop codon filtering start position base pairs" 
               help="Do not reject translation is stop_codons are within base pairs of the BED start position for positive strand"/>
        <param name="trailing_bp" type="integer" value="" min="0" optional="true" label="Stop codon filtering end position base pairs" 
               help="Do not reject translation is stop_codons are within base pairs of the BED end position for negative strand"/>
      </when>
      <when value="no"/>
    </conditional>
    <conditional name="trim">
      <param name="trimseqs" type="select" label="Trim translations to stop codons">
        <option value="yes" selected="true">Yes</option>
        <option value="no">No</option>
      </param>
      <when value="no">
        <param name="max_stop_codons" type="integer" value="" min="0" optional="true" label="Maximum number of stop codons allowed in a translation to be reported"/>
      </when>
    </conditional>
    <param name="min_length" type="integer" value="" min="0" optional="true" label="Minimum length of a translation to be reported"/>
  </inputs>
  <stdio>
    <exit_code range="1:" level="fatal" description="Error" />
  </stdio>
  <outputs>
    <data name="translated_bed" metadata_source="input" format="bed" label="${tool.name} on ${on_string} bed">
    </data>
    <data name="output" metadata_source="input" format="fasta" label="${tool.name} on ${on_string} fasta">
    </data>
  </outputs>
  <tests>
    <test>
      <param name="input" value="Extract_Genomic_DNA.bed" ftype="bed" dbkey="hg19"/>
      <param name="reference" value="GRCh37"/>
      <param name="seqtype" value="pep:novel"/>
      <param name="score_name" value="depth"/>
      <output name="output" file="translated_bed_sequences.fa"/>
    </test>
  </tests>
  <help>
**Translate BED Sequences**

This tool takes a BED input file that has been processed 
by the Galaxy tool "Extract Genomic DNA" to add a 13th column with the transcript sequence.

It generates a peptide fasta file with the 3-frame translations of the spliced sequence 
defined by each entry in the input BED file.

  </help>
</tool>