Skip to content

NTGS is a tool for NGS and TGS taxonomic composition result visualization. User only need to prepare the composition result (.csv) from EasyMAP (QIIME2, NGS) or Mothur (TGS) output file. This tool can plot the Top10 / Top20 in any taxonomic rank.

License

ba2c7yoyo/NTGS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NTGS

NTGS is a tool for NGS and TGS taxonomic composition result visualization. User only need to prepare the composition result (.csv) from EasyMAP (Qiime2, NGS) or Mothur (TGS) output file. This tool can plot the Top10 / Top20 in any taxonomic rank.

1-1 TopN abundance by NGS

TopN_abundance_NGS.py

  • Import / Install Package
pip install pandas matplotlib
  • Parameters
path = './examples/'
#The folder path

file_name = 'level-7.csv'  
#NGS composition result in level-7 (.csv) after classifier analysis.

int_last_cloumn = -4 
#The number of column you want to ignore. (Because there are some group information in EasyMAP output.)
  • Example name list
1
2
3
4
5
6
7
8
9
10
H_J
H_J_01_03
H_J_07_09
H_J_13_15
H_J_19_21
H_J_P
H_J_P_01_03
H_J_P_07_09
H_J_P_13_15
H_J_P_19_21
HFD
HFD_01_03
HFD_07_09
HFD_13_15
HFD_19_21
ND
ND_01_03
ND_07_09
ND_13_15
ND_19_21
  • Taxonomic Hierarchy
1 : Kingdom
2 : Phylum
3 : Class
4 : Order
5 : Family
6 : Genus
7 : Specices
  • Input file - NGS composition result (.csv) In this example, you can set the int_last_cloumn = -4, because there are 4 columns about the group and sample information, not taxonomic abundance.

Input file

  • Output figures

    • Top10 taxonomic result in Order level. Example1

    • Top20 taxonomic result in Family level with customize color bar. Example2

  • Advanced parameters

    • Config the color bar If you would like to customize each bacteria color bar, just uncomment these codes to edit it. The camp array length is up to select Top10/Top20.
     cmap = ListedColormap(["#D0D0D0", "#ff9694", "#2ca02c", "#ffbb78","#D0D0D0",
                             "#c7c7c7","#ff7f0e","#D0D0D0","#D0D0D0","#dada8b",
                             "#D0D0D0","#7f7f7f","#D0D0D0","#D0D0D0","#D0D0D0",
                             "#D0D0D0","#D0D0D0","#9edae5","#e274c1","#D0D0D0",
                             ])
     df.plot(kind="bar",stacked=True,figsize=(10,8), cmap= cmap)
     
     #df.plot(kind="bar",stacked=True,figsize=(10,8), cmap= 'tab20')
     #Remember to comment this line.
    • Save the figure automatically Instead of copy the result on IDE plots window, you can uncomment this line to save the results automatically.
     plt.savefig( Target_PNG_name +'_Top' + str(TOPTOP) + '_' + level_legend[hierarchy] + '.png',dpi=150,bbox_inches ='tight')

1-2 TopN abundance by TGS

TopN_abundance_TGS.py

  • Import / Install Package
pip re collections pandas matplotlib
  • Parameters
path = './examples/'
#The folder path

file_name = 'opti_mcc.shared'  
#TGS composition result after classifier analysis.

file_name_taxa = 'opti_mcc.0.01.cons.taxonomy'
#TGS composition result after classifier analysis.

int_topN = 15 
#Range on Top2~20
  • Example name list
Dax_1
Dax_2
Dax_3
Guan_1
Guan_2
Guan_3
H50_1
Hua_1
Hua_2
Hua_3
San_1
Zhu_1
Zhu_2
Zhu_3
Z
D
H
G
  • Taxonomic Hierarchy
0 : Kingdom
1 : Phylum
2 : Class
3 : Order
4 : Family
5 : Genus
6 : Specices
  • Input file 1 - TGS composition result (.shared)

TGS_.shared

  • Input file 2 - TGS composition result (.taxonomy)

TGS_.taxonomy

  • Output figures
    • Top20 taxonomic result in Family level.

TGS_Eg.1

About

NTGS is a tool for NGS and TGS taxonomic composition result visualization. User only need to prepare the composition result (.csv) from EasyMAP (QIIME2, NGS) or Mothur (TGS) output file. This tool can plot the Top10 / Top20 in any taxonomic rank.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages