# HG changeset patch # User bobbledavidson # Date 1442397493 14400 # Node ID b970ba62539e3f6428c45e952ce2bc5f2cec6985 # Parent 9e8de4ce2a3cfede53a2def2d36fd59cf00dab12 Updated beagle4.py to output uncompressed VCF files - had been outputting VCF.GZ diff -r 9e8de4ce2a3c -r b970ba62539e beagle4.py --- a/beagle4.py Wed Jul 08 11:08:07 2015 -0400 +++ b/beagle4.py Wed Sep 16 05:58:13 2015 -0400 @@ -3,6 +3,7 @@ import tempfile import shutil from subprocess import call +import gzip def main(): @@ -34,11 +35,16 @@ call(['java', '-Xmx2g', '-jar', options.jarfile, options.gtgl+'='+options.gfile,'phase-its='+options.phits, 'impute-its='+options.impits , 'out='+outdir+'/'+outprefix ]) - shutil.move(outdir+'/'+outprefix+'.vcf.gz',options.outfile) + #shutil.move(outdir+'/'+outprefix+'.vcf.gz',options.outfile) + #shutil.rmtree(outdir) + with gzip.open(outdir+os.sep+outprefix+'.vcf.gz','rb') as gzinfile: + with open(options.outfile,'w') as vcfoutfile: + for line in gzinfile: + vcfoutfile.write(line) + shutil.rmtree(outdir) - if __name__=='__main__': main()