|
3
|
1 <tool id="frp_tool" name="Fragment Recruitment Plot">
|
|
|
2 <description>for SAM outputs</description>
|
|
|
3 <requirements>
|
|
|
4 <requirement type="python-module">matplotlib.pyplot</requirement>
|
|
|
5 </requirements>
|
|
|
6 <command interpreter="python">frp_tool.py -i $identity -b $begin -l $length -t "$title" -m "$microbiome" -c $color $input $ref_genome $out_file</command>
|
|
|
7 <inputs>
|
|
|
8 <param name="input" type="data" format="sam" label="Dataset" help="Dataset missing? See help below"/>
|
|
|
9 <param name="ref_genome" type="data" format="fasta" label="Reference Genome"/>
|
|
|
10 <param name="identity" type="integer" value="50" max="100" label="Percent Identity" help="Minimum identity to include in plot (y-axis extent)"/>
|
|
|
11 <param name="begin" type="integer" value="0" label="Begin plot at the nth nucleotide of reference genome"/>
|
|
|
12 <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"/>
|
|
|
13 <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."/>
|
|
|
14 <param name="microbiome" type="text" size="30" value="Human Skin" label="Microbiome Description" help="Optional subtitle"/>
|
|
|
15 <param name="color" type="select" label="Point Color" help="Color for plot points">
|
|
|
16 <option value="0">Dark Gold</option>
|
|
|
17 <option value="1">Light Orange</option>
|
|
|
18 <option value="2">Light Green</option>
|
|
|
19 <option value="3">Fuschia</option>
|
|
|
20 <option value="4">Medium Blue</option>
|
|
|
21 <option value="5">Light Plum</option>
|
|
|
22 </param>
|
|
|
23 </inputs>
|
|
|
24 <outputs>
|
|
|
25 <data format="png" name="out_file" from_work_dir="frp_image.png"/>
|
|
|
26 </outputs>
|
|
|
27
|
|
|
28 <tests>
|
|
|
29 <test>
|
|
|
30 <param name="input" value="frp_input.sam"/>
|
|
|
31 <param name="ref_genome" value="genomic.fasta"/>
|
|
|
32 <param name="identity" value="50"/>
|
|
|
33 <param name="begin" value="0"/>
|
|
|
34 <param name="length" value="0"/>
|
|
|
35 <param name="title" value=""/>
|
|
|
36 <param name="microbiome" value=""/>
|
|
|
37 <param name="color" value="Light Green"/>
|
|
|
38 <output name="out_file" file="frp_output.png"/>
|
|
|
39 </test>
|
|
|
40 </tests>
|
|
|
41
|
|
|
42 <help>
|
|
|
43 **What it does**
|
|
|
44
|
|
|
45 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.
|
|
|
46
|
|
|
47 ------
|
|
|
48
|
|
|
49 **Input Datasets/Files**
|
|
|
50
|
|
|
51 Two input types are required in this tool:
|
|
|
52
|
|
|
53 1. Reference genome: the reference sequence in FASTA format used for alignment; it can be uploaded via Get Data -> Upload File.
|
|
|
54
|
|
|
55 2. SAM format dataset: can be uploaded via Get Data -> Upload File. It can also be obtained after alignment with Bowtie2.
|
|
|
56
|
|
|
57 If using Bowtie2 output, follow these steps to format the file properly:
|
|
|
58
|
|
|
59 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
|
|
|
60
|
|
|
61 2. Use these options in the samtool_filter2:
|
|
|
62 + Exclude Header
|
|
|
63 + Minimum MAPQ quality score = 1
|
|
|
64
|
|
|
65 .. class:: infomark
|
|
|
66
|
|
|
67 **TIP:** This ensures the file contains all aligned reads without any missing MD tags per line.
|
|
|
68
|
|
|
69 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
|
|
|
70
|
|
|
71 ------
|
|
|
72
|
|
|
73 **Output Example**
|
|
|
74
|
|
|
75 An example image (png format) of a fragment recruitment plot.
|
|
|
76
|
|
|
77 .. image:: ${static_path}/images/frp_output_small.png
|
|
|
78
|
|
|
79
|
|
|
80
|
|
|
81 </help>
|
|
|
82
|
|
|
83 </tool> |