Mercurial > repos > bgruening > salmonquantmerge
comparison vpolo_convert.py @ 2:7c618ec039b8 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/salmon commit c17bc974bf9bbaa1fc1e47ea72162fd244f0e612"
| author | bgruening |
|---|---|
| date | Tue, 15 Oct 2019 11:59:28 -0400 |
| parents | |
| children | 28e01a2960a5 |
comparison
equal
deleted
inserted
replaced
| 1:e85da5693999 | 2:7c618ec039b8 |
|---|---|
| 1 #!/usr/bin/env python | |
| 2 | |
| 3 from vpolo.alevin import parser as par | |
| 4 import argparse | |
| 5 import os | |
| 6 | |
| 7 parser = argparse.ArgumentParser() | |
| 8 parser.add_argument("--mtx", "-m", action="store_true", help="--dumpMtx flag set") | |
| 9 parser.add_argument("--umi", "-u", action="store_true", help="--dumpUmiGraph flag set") | |
| 10 args = parser.parse_args() | |
| 11 | |
| 12 if args.mtx: | |
| 13 alevin_df = par.read_quants_bin("output") | |
| 14 with open("quants_mat.tsv", "w") as f: | |
| 15 f.write(alevin_df.to_csv(sep="\t")) | |
| 16 | |
| 17 if args.umi: | |
| 18 os.mkdir("umiout") | |
| 19 par.read_umi_graph("output", "umiout") |
