Commit 5b114601 authored by Yoann Dufresne's avatar Yoann Dufresne

accuracy/sensitivity figures

parent beef8eba
import argparse
import pandas as pd
import plotnine as p9
def parse_args():
parser = argparse.ArgumentParser(description='Take an input tsv with Acc/Sens values and generate figs')
parser.add_argument('filename', type=str,
help='The tsv file')
parser.add_argument('--output', '-o', type=str, default='', help="The output file prefix. Default prefix is <input>")
args = parser.parse_args()
if args.output == "":
args.output = ".".join(args.filename.split(".")[:-1])
return args
def main():
args = parse_args()
data = pd.read_csv(args.filename, sep='\t')
print(data)
plot = (p9.ggplot(data=data,
mapping=p9.aes(x='path length', y='Accuracy', color='experiment'))
+ p9.geom_line())
plot.save(args.output + "_acc.png", width=10, height=3, dpi=300)
plot = (p9.ggplot(data=data,
mapping=p9.aes(x='path length', y='Sensitivity', color='experiment'))
+ p9.geom_line())
plot.save(args.output + "_sens.png", width=10, height=3, dpi=300)
if __name__ == "__main__":
main()
experiment path length Accuracy Sensitivity
5000-2-0 Gb 2 0.48 1.0
5000-2-0 Gb 4 0.09 1.0
5000-2-0 Gb 10 0 0.99
5000-2-0 Gb 100 0 0.94
5000-2-0 lcp 2 1.0 1.0
5000-2-0 lcp 4 1.0 0.99
5000-2-0 lcp 10 1.0 0.98
5000-2-0 lcp 100 1.0 0.88
5000-2-1 Gb 2 0.46 1.0
5000-2-1 Gb 4 0.09 1.0
5000-2-1 Gb 10 0 1.0
5000-2-1 Gb 100 0 0.98
5000-2-1 lcp 2 1 1
5000-2-1 lcp 4 1 0.99
5000-2-1 lcp 10 1 0.98
5000-2-1 lcp 100 0.99 0.84
5000-3-0 Gb 2 0.31 1
5000-3-0 Gb 4 0.03 1
5000-3-0 Gb 10 0 0.99
5000-3-0 Gb 100 0 0.88
5000-3-0 lcp 2 1 0.99
5000-3-0 lcp 4 1 0.98
5000-3-0 lcp 10 0.99 0.95
5000-3-0 lcp 100 0.99 0.6
5000-3-1 Gb 2 0.33 1
5000-3-1 Gb 4 0.03 1
5000-3-1 Gb 10 0 1
5000-3-1 Gb 100 0 0.96
5000-3-1 lcp 2 1 0.99
5000-3-1 lcp 4 1 0.97
5000-3-1 lcp 10 0.99 0.93
5000-3-1 lcp 100 0.95 0.54
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment