-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update amr.md * add script to plot amrfinder results * plot_amrfinder * Update amr.md * Update amr.md * Update docs/amr.md Co-authored-by: C. Titus Brown <[email protected]> --------- Co-authored-by: C. Titus Brown <[email protected]>
- Loading branch information
1 parent
7160204
commit 1eddf40
Showing
3 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#! /usr/bin/env python | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
import seaborn as sns | ||
import sys | ||
import argparse | ||
|
||
|
||
def main(): | ||
p = argparse.ArgumentParser() | ||
p.add_argument('df') | ||
p.add_argument('-o', '--output-figure', required=True) | ||
args = p.parse_args() | ||
|
||
df = pd.read_csv(args.df, sep = '\t') | ||
df_all = df.Class.value_counts().to_frame().reset_index() | ||
figure = sns.barplot(data=df_all, x="count", y="Class", hue="Class", legend=False) | ||
figure.figure.set_size_inches(15,5) | ||
figure.figure.savefig(args.output_figure) | ||
|
||
|
||
|
||
if __name__ == '__main__': | ||
sys.exit(main()) |