view easyfig_cpt.xml @ 2:f44e2da53cc4 draft default tip

planemo upload commit f33bdf952d796c5d7a240b132af3c4cbd102decc
author cpt
date Fri, 05 Jan 2024 05:50:36 +0000
parents afce956686a1
children
line wrap: on
line source

<tool id="edu.tamu.cpt2.gbk_viz.easyfig" name="Easyfig:" version="2.2.3">
  <description> Galaxy wrapper for genbank visualization</description>
  <macros>
    <import>macros.xml</import>

  </macros>
  <expand macro="requirements"/>
  <command detect_errors="aggressive"><![CDATA[
IFS=',' read -r -a genList <<< "$gbkIn";
IFS=' ' read -r -a revList <<< "$revString";
lenGBK=\${#genList[@]};
lenREV=\${#revList[@]};
for (( i=0; i<\$lenGBK; i++ )); do
for (( j=0; j<\$lenREV; j++ )); do
if [[ \$((i+1)) -eq revList[\$j]  ]]; then
genList[\$i]="\${genList[\$i]} R";
fi
done;
done;        

python '$__tool_directory__/Easyfig.py'
-e '$eVal'
#if $blast.input_type == "files":
-blast_files 
#for $file in $blast.blastIn:
    '$file'
#end for
#else if $blast.input_type == "blastN":
-blastn
$blast.keepBlast
#else if $blast.input_type == "blastX":
-tblastx
'$blast.keepBlast'
#end if
-aln '$align'
-i '$identity'
-min_length '$blastLen'
-legend '$leg' 
-leg_name '$nameLoc'
-f1 '$tfF'
-f2 '$intF'
-blast_col '$color' 
#if $gc != "":
    -G '$gc' 
#end if

-o '$SVG_Out' 
-svg 
-filter
\${genList[@]}
#if $blast.input_type !=  "files"
#if $blast.keepBlast
&&
tar -cvf tempTar temp_easyfig
&&
mv tempTar '$blastDir'
#end if
#end if
]]></command>
  <inputs>
    <param label="Genbanks" name="gbkIn" type="data" multiple="true" format="genbank"/>
    <param label="Reverse Items (See 'Reverse Option' in help text)" name="revString" type="text" value=""/>
    <conditional name="blast">
      <param name="input_type" type="select" label="Choose BLAST file source/generation: ">
        <option value="files" selected="true">Use existing BLAST result</option>
        <option value="blastN">Auto-run blastN</option>
        <option value="blastX">Auto-run tblastX</option>
      </param>
      <when value="files">
        <param label="Blast Results (12-Column .tsv)" name="blastIn" type="data" format="tabular" multiple="True"/>
      </when>
      <when value="blastN">
        <param name="keepBlast" type="boolean" checked="false" label="Keep generated blast results" truevalue="-keep" falsevalue=""/>
      </when>
      <when value="blastX">
        <param name="keepBlast" type="boolean" checked="false" label="Keep generated blast results" truevalue="-keep" falsevalue=""/>
      </when>
    </conditional>
    <param label="Minimum E Value" name="eVal" type="float" value="0.001"/>
    <param label="Minimum Percent Identity Value" name="identity" type="float" value="0.00"/>
    <param label="Minimum Length for Blast Hit to be drawn" name="blastLen" type="integer" value="0"/>
    <param label="Draw colour gradient figure for blast hits." name="tfF" type="boolean" checked="false" truevalue="T" falsevalue="F"/>
    <param label="How many base pairs long to draw the scale legend item (0 to not draw it)" name="intF" type="integer" value="0"/>
    <param label="Customize location of gene name" name="leg" type="select">
      <option value="single">Single</option>
      <option value="double">Double</option>
      <option value="top">Top</option>
      <option value="bottom">Bottom</option>
      <option value="both">Both</option>
      <option value="None">None</option>
    </param>
    <param label="What property to get feature name from" name="nameLoc" type="text" value="gene"/>
    <param label="Customize alignment for Blast hits" name="align" type="select">
      <option value="best">Best</option>
      <option value="left">Left</option>
      <option value="right">Right</option>
      <option value="centre">Center</option>
    </param>
    <param label="Customize color for Blast hits" name="color" type="select">
      <option value="gray">Gray</option>
      <option value="red">Red</option>
      <option value="blue">Blue</option>
    </param>
    <param label="Select GC Content plot" name="gc" type="select">
      <option value="">No GC</option>
      <option value="GCContent">GC Content</option>
      <option value="GCSkew">GC Skew</option>
    </param>
    <param name="out_format" type="select" label="Output data type">
      <option value="svg">SVG</option>
      <option value="html">HTML</option>
    </param>
  </inputs>
  <outputs>
    <data format="svg" name="SVG_Out" label="Easyfig Output">
      <change_format>
        <when input="out_format" value="html" format="html"/>
      </change_format>
    </data>
    <data format="tar.gz" name="blastDir" label="Easyfig-generated Blast data">
      <filter>blast['input_type'] != 'files'</filter>
      <filter>blast['keepBlast']</filter>
    </data>
  </outputs>
  <help><![CDATA[
**What it does**

EasyFig Version 2.2.3 generates a linear genomic comparison of 1 to an infinite number of GenBank/EMBL files as a customizable graphic output.

**Input**
An input GenBank or EMBL file must have source line, or Sequence.
'     source  1..<sequence length>' or 'FT   source    1..<sequence length>'
Only 'CDS' features will be recorded.


**Reverse Option**
Easyfig can plot a genbank file in reverse, effectively inverting the sequence and its annotations. Specify which genbanks to reverse
by providing their list index position in the Reverse Items field. The list is in order from the bottom-up, so if three genbanks are selected, 
the bottom-most one is 1, the middle is 2, and the top-most 3. 
The numbers must be separated by a space. Entering "2 3" will reverse the middle and top items, and the bottom "1" will be read in the forward orientation.


**Nucleotide BLAST**
 - run BLASTn, run tBLASTx, or provide 12-column BLAST results for each input.  


**General options**
- E-value: Select the minimum e-value of blast hits to be drawn. Default is 0.001

- Percent identity: Enter the minimum hit percent identity to be drawn. Default is 0.

- Hit length: Enter the minimum length of similarity (in nucleotides) for the output to be included on the drawing.

- BLAST scale: Toggle the BLAST similarity scale key for display.

- Genome scale bar: Enter a value in base pairs for the length of scale bar. Default is zero, which does not draw a scale bar.

- Position for feature labels : single (single column), double (two columns), top (feature labels of top genome drawn above figure), bottom (feature labels from bottom genome drawn below figure), both (top and bottom genome features drawn above and below figure), none (no legend or gene labelling, default)

- Source of feature label: default is gene. Other options include the product tag.

- Alignment: align the graphic according to best/left/right/center. Alignment of genomes best aligns feature file perpendicular to best blast hit. Default is center. 

- BLAST similarity gradient color: options are gray, red, and blue.

- GCContent plot: select to display GC content or GCSkew graphs with the output.


**Output**
A Scalable Vector Graphics (svg) file or static html display are returned.


Blast Wrapper written by Criscione, Anthony, Center for Phage Technology, Texas A&M University, 2020
     ]]></help>
  <expand macro="citations">
    <citation type="doi">10.1093/bioinformatics/btr039</citation>
  </expand>
</tool>