Mercurial > repos > rdvelazquez > mmvc
view extract_mmvc_consensus @ 3:4ca91bf87f1f draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mmvc/ commit b'35710f754cc8be97c423c95eb91197df01d0520d\n'-dirty
author | rdvelazquez |
---|---|
date | Wed, 20 Mar 2019 15:58:26 -0400 |
parents | c5c1faa433e4 |
children |
line wrap: on
line source
#!/usr/bin/env python3 import json import sys # 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 mmvcOutput = sys.argv[1] fastaHeaderName = sys.argv[2] fastaFilePath = sys.argv[3] with open(mmvcOutput) as f: data = json.load(f) consensus = data["consensus"] consensusFasta = ">" + fastaHeaderName + "\n" + consensus + "\n" f = open(fastaFilePath, "w") f.write(consensusFasta)