0
|
1 <tool id="export2graphlan" name="export2graphlan" version="1.0.0">
|
|
2 <description>Export to Graphlan</description>
|
|
3 <command interpreter="python">
|
|
4 export2graphlan.py
|
|
5 -i $inp_data
|
|
6 -o $out_data
|
|
7 -t $output_tree_file
|
|
8 -a $output_annot_file
|
|
9 --title $export_title
|
|
10 --annotations $export_annotations
|
|
11 --external_annotations $export_external_annotations
|
|
12 --skip_rows 1,2
|
|
13 </command>
|
|
14
|
|
15 <inputs>
|
|
16 <param name="export_title" type="text" format="text" label="Title" value="Title"/>
|
|
17 <param name="export_annotations" type="text" format="text" label="Annotations" value="2,3"/>
|
|
18 <param name="export_external_annotations" type="text" format="text" label="External Annotations" value="4,5,6"/>
|
|
19 <param format="tabular" name="inp_data" type="data" label="Input used to run Lefse - See samples below - Please use Galaxy Get-Data/Upload-File. Use File-Type = Tabular" help="This is the file that was used as input for Lefse"/>
|
|
20 <param format="lefse_res" name="out_data" type="data" label="Output of Lefse" help="This is the Lefse output file"/>
|
|
21 </inputs>
|
|
22 <outputs>
|
|
23 <data name="output_annot_file" format="circl" />
|
|
24 <data name="output_tree_file" format="circl" />
|
|
25 </outputs>
|
|
26
|
|
27 <help>
|
|
28 **export2graphlan** is an automatic conversion script from **LEfSe**, **MetaPhlAn2**, and **HUMAnN** input and/or output files, to **GraPhlAn**. Input file can be also given in BIOM 2.0 format.
|
|
29
|
|
30 The aim of this tool is to support biologists, helping them by automatically write the tree and the annotation file for **GraPhlAn**.
|
|
31
|
|
32 ----
|
|
33
|
|
34 .. contents::
|
|
35
|
|
36 ----
|
|
37
|
|
38 Overview
|
|
39 ========
|
|
40
|
|
41 A graphical representation of how **export2graphlan** can be used in the analysis pipeline:
|
|
42
|
|
43 .. image:: https://bitbucket.org/repo/oL6bEG/images/3364692296-graphlan_integration.png
|
|
44 :height: 500
|
|
45 :width: 600
|
|
46
|
|
47
|
|
48 ----
|
|
49
|
|
50 HMP aerobiosis
|
|
51 ==============
|
|
52
|
|
53 A taxonomic tree that shows three different classes of oxygen (low, medium, and high), highlighting biomarker clades for each class. Data are taken from the HMP project.
|
|
54
|
|
55 .. image:: https://bitbucket.org/repo/oL6bEG/images/2487320460-hmp_aerobiosis.png
|
|
56 :height: 500
|
|
57 :width: 600
|
|
58
|
|
59
|
|
60 Pipeline
|
|
61 --------
|
|
62
|
|
63
|
|
64 # download the data
|
|
65 $ wget http://huttenhower.sph.harvard.edu/webfm_send/129 -O hmp_aerobiosis_small.txt
|
|
66
|
|
67 # convert the file in LEfSe format, and run LEfSe
|
|
68 $ format_input.py hmp_aerobiosis_small.txt hmp_aerobiosis_small.in -c 1 -s 2 -u 3 -o 1000000
|
|
69 $ run_lefse.py hmp_aerobiosis_small.in hmp_aerobiosis_small.res
|
|
70
|
|
71 # convert it!
|
|
72 $ export2graphlan.py -i hmp_aerobiosis_small.txt -o hmp_aerobiosis_small.res -t tree.txt -a annot.txt --title "HMP aerobiosis" --annotations 2,3 --external_annotations 4,5,6 --fname_row 0 --skip_rows 1,2 --ftop 200
|
|
73
|
|
74 # attach annotation to the tree
|
|
75 $ graphlan_annotate.py --annot annot.txt tree.txt outtree.txt
|
|
76
|
|
77 # generate the beautiful image
|
|
78 $ graphlan.py --dpi 300 --size 7.0 outtree.txt outimg.png --external_legends
|
|
79
|
|
80 The input file is downloaded from The Huttenhower Lab and given to **LEfSe** for biomarkers discovery. The two file (the *LEfSe input* and the *LEfSe output* files) are then passed to **export2graphlan**. In this case the levels 2 (*phylum*) and 3 (*class*) are annotated on the circular tree, while levels 4 (*order*), 5 (*family*), and 6 (*genus*) are put on the external legend.
|
|
81
|
|
82
|
|
83
|
|
84 </help>
|
|
85 </tool>
|