GithubHelp home page GithubHelp logo

xcelris-labs-ltd / publication-ready-taxonomic-charts-from-qiime Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 3.0 22.13 MB

Ultra fast program to generate publication ready taxonomic pie charts from QIIME.

Home Page: https://github.com/Xcelris-Labs-Ltd/Publication-ready-taxonomic-charts-from-QIIME

License: Other

Python 100.00%
pie-chart qiime taxonomy python

publication-ready-taxonomic-charts-from-qiime's Introduction

Publication-ready-taxonomic-charts-from-QIIME

Ultra fast program to generate publication ready taxonomic pie charts from QIIME.

About the script:

This script parses the pie_chart.html file coming from plot_taxa_summary.py script from QIIME (for details, visit http://qiime.org/scripts/plot_taxa_summary.html.) and do the following:

1.Maps the pie chart and legend image names to corresponding samples.

2.Copies the files to user defined directory

3.Rename the files according to sample ids

4.Merges the pie charts and legends

List of Python modules used in prepare_taxa_charts.py

S. No. Module
1. fnmatch
2. os
3. getopt
4. PIL
5. re
6. shutil
7. sys
8. timeit

Usage:

prepare_taxa_charts.py -p path_to_pie_charts.html -c path_to_charts_folder -o output_path_to_final_images

Important Note:

Prerequisites for prepare_taxa_charts.py

  1. Python version 2.7

  2. The legend files should be generated in png format (default is pdf). This could be achieved by running the script plot_taxa_summary.py with the option -t/--type_of_file as png. Given below is an example:

plot_taxa_summary.py -i phylum.txt -l phylum -c pie -o phylum_charts/ -t png

** Note: High resolution images can be generated using the -d, --dpi option for the script plot_taxa_summary.py. See below example (setting the dpi to 100 produce good quality images):

plot_taxa_summary.py -i phylum.txt -l phylum -c pie -o phylum_charts/ -t png -d 100

License

This script is released under GNU GENERAL PUBLIC LICENSE, v3, 29 June 2007

Development and Maintenance

Developed by - Vijay Lakhujani:

Project Scientist, Bioinformatics

NGS division, Xcelris Labs Ltd

[email protected]


Let's connect!

alt text alt text alt text alt text

Full Details

Click here

publication-ready-taxonomic-charts-from-qiime's People

Contributors

xcelris-labs-ltd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

publication-ready-taxonomic-charts-from-qiime's Issues

Images not generated when sample names are subset of each other

The script fails to generate images for samples when samples are subset of each other

[taxonomy_plot]$ python prepare_taxa_charts_vijay.py -p pie_charts.html  -c charts/ -o out/

[Started reading]--------------------------------------- pie_charts.html
[No. of samples]---------------------------------------- 4
[Copying pie chart and legend images to]---------------- out/ directory
[Total no. of images]----------------------------------- 40
[Preparing pie chart and legend images]

 [Preparing images for sample]-------------------------- 1
 [Preparing images for sample]-------------------------- 2

[Cleaning output directory]

[Total execution time]----------------------------------  0.586 secs.

Here the sample names were

C, CT , H and HB

Images were missing for samples C and H while generated for samples CT and HB. Apparently, this is because a sorting function is not working as expected in the code. Here sample name C is a subset of sample name CT and same is for sample H and HB.

Bug appears to be generated from line #146
file_list=sorted(file_list)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.