Mercurial > repos > schang > frp_tool
changeset 3:451df50fb4d4 draft
Uploaded
author | schang |
---|---|
date | Tue, 02 Dec 2014 19:53:37 -0500 |
parents | 348ffb045343 |
children | 398c3753c358 |
files | frp_tool.xml |
diffstat | 1 files changed, 83 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/frp_tool.xml Tue Dec 02 19:53:37 2014 -0500 @@ -0,0 +1,83 @@ +<tool id="frp_tool" name="Fragment Recruitment Plot"> + <description>for SAM outputs</description> + <requirements> + <requirement type="python-module">matplotlib.pyplot</requirement> + </requirements> + <command interpreter="python">frp_tool.py -i $identity -b $begin -l $length -t "$title" -m "$microbiome" -c $color $input $ref_genome $out_file</command> + <inputs> + <param name="input" type="data" format="sam" label="Dataset" help="Dataset missing? See help below"/> + <param name="ref_genome" type="data" format="fasta" label="Reference Genome"/> + <param name="identity" type="integer" value="50" max="100" label="Percent Identity" help="Minimum identity to include in plot (y-axis extent)"/> + <param name="begin" type="integer" value="0" label="Begin plot at the nth nucleotide of reference genome"/> + <param name="length" type="integer" value="0" label="Include n nucleotides on the x-axis of the plot" help="Default to 0 for full length"/> + <param name="title" type="text" size="30" value="E. coli" label="Plot Title" help="(e.g. name of the reference genome). Default is the accession number of reference genome."/> + <param name="microbiome" type="text" size="30" value="Human Skin" label="Microbiome Description" help="Optional subtitle"/> + <param name="color" type="select" label="Point Color" help="Color for plot points"> + <option value="0">Dark Gold</option> + <option value="1">Light Orange</option> + <option value="2">Light Green</option> + <option value="3">Fuschia</option> + <option value="4">Medium Blue</option> + <option value="5">Light Plum</option> + </param> + </inputs> + <outputs> + <data format="png" name="out_file" from_work_dir="frp_image.png"/> + </outputs> + + <tests> + <test> + <param name="input" value="frp_input.sam"/> + <param name="ref_genome" value="genomic.fasta"/> + <param name="identity" value="50"/> + <param name="begin" value="0"/> + <param name="length" value="0"/> + <param name="title" value=""/> + <param name="microbiome" value=""/> + <param name="color" value="Light Green"/> + <output name="out_file" file="frp_output.png"/> + </test> + </tests> + + <help> +**What it does** + +This tool creates a fragment recruitment plot from a SAM input file. Its main purpose is to display a graph of aligned metagenomic reads against an organism's reference genome. The percent identity is calculated based on the MD: tag in the optional form field of the SAM format. + +------ + +**Input Datasets/Files** + +Two input types are required in this tool: + +1. Reference genome: the reference sequence in FASTA format used for alignment; it can be uploaded via Get Data -> Upload File. + +2. SAM format dataset: can be uploaded via Get Data -> Upload File. It can also be obtained after alignment with Bowtie2. + +If using Bowtie2 output, follow these steps to format the file properly: + +1. Filter the BAM/SAM output from Bowtie2 by executing the "samtool_filter2" tool from the Tool Shed. More information can be found in this link: http://toolshed.g2.bx.psu.edu/view/devteam/samtool_filter2 + +2. Use these options in the samtool_filter2: + + Exclude Header + + Minimum MAPQ quality score = 1 + + .. class:: infomark + + **TIP:** This ensures the file contains all aligned reads without any missing MD tags per line. + +3. Convert BAM-to-SAM by using using the tool "bam_to_sam" installed from the Tool Shed. Additional information can be found in this link:: http://toolshed.g2.bx.psu.edu/view/devteam/bam_to_sam + +------ + +**Output Example** + +An example image (png format) of a fragment recruitment plot. + +.. image:: ${static_path}/images/frp_output_small.png + + + + </help> + +</tool> \ No newline at end of file