Skip to content

Customize Barchart

moshi edited this page Mar 30, 2022 · 6 revisions

Customize Barchart

In this page, explain COGclassifier barchart customized figure.

Usage

Basic Command

plot_cog_classifier_barchart -i [classifier count file] -o [output barchart html file]

Options

-h, --help         show this help message and exit
-i I, --infile I   Input COGclassifier count results file ('classifier_count.tsv')
-o O, --outfile O  Output plot result html file (must be '*.html')
--width            Fig width [px] (Default: 520)
--height           Fig height [px] (Default: 340)
--bar_width        Fig bar width [px] (Default: 15)
--y_limit          Y-axis max limit value (Default: 'Auto')
--percent_style    Plot y-axis as percent style instead of number count (Default: OFF)
--sort             Enable descending sort by number count (Default: OFF)

Example Gallery

Example input file = classifier_count.tsv

Default parameter:

plot_cog_classifier_barchart -i classifier_count.tsv -o 01_barchart_default.html

01_barchart_default.png

Adjust figure width, height, barwidth:

plot_cog_classifier_barchart -i classifier_count.tsv -o 02_barchart_adjust_figsize.html \
                             --width 280 --width 340 --bar_width 8

02_barchart_adjust_figsize.png

Percentage style instead of count number style:

plot_cog_classifier_barchart -i classifier_count.tsv -o 03_barchart_percent_style.html \
                             --percent_style

03_barchart_percent_style.png

Fix maximum value of Y-axis:

plot_cog_classifier_barchart -i classifier_count.tsv -o 04_barchart_fix_yaxis.html \
                             --percent_style --y_limit 20

04_barchart_fix_yaxis.png

Descending sort by count number:

plot_cog_classifier_barchart -i classifier_count.tsv -o 05_barchart_descending_sort.html \
                             --sort

05_barchart_descending_sort.png

User-customized (Add no classified):

Use user-customized classifier count file (classifier_count_add_no_classify.tsv)

plot_cog_classifier_barchart -i classifier_count_add_no_classify.tsv -o 06_barchart_custom_add_no_classify.html

06_barchart_custom_add_no_classify.png

User-customized (Change color):

Use user-customized classifier count file (classifier_count_change_color.tsv)

plot_cog_classifier_barchart -i classifier_count_change_color.tsv -o 07_barchart_custom_change_color.html

07_barchart_custom_change_color.png

Clone this wiki locally