Mercurial > repos > rdvelazquez > mmvc
comparison extract_mmvc_consensus @ 0:c5c1faa433e4 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mmvc/ commit b'f226ae444ad694bb8d4f8faa80ed541b41cbc993\n'
author | rdvelazquez |
---|---|
date | Fri, 15 Mar 2019 13:29:34 -0400 |
parents | |
children | 4ca91bf87f1f |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c5c1faa433e4 |
---|---|
1 #!/usr/bin/env python3 | |
2 | |
3 import json | |
4 import sys | |
5 | |
6 # first argument is script name; second should be mmvcOutput path; third should be name for fasta header; the fourth argument should be the path to save the fasta at | |
7 mmvcOutput = sys.argv[1] | |
8 fastaHeaderName = sys.argv[2] | |
9 fastaFilePath = sys.argv[3] | |
10 | |
11 with open(mmvcOutput) as f: | |
12 data = json.load(f) | |
13 consensus = data["consensus"] | |
14 consensusFasta = ">" + fastaHeaderName + "\n" + consensus | |
15 f = open(fastaFilePath, "w") | |
16 f.write(consensusFasta) |