Mercurial > repos > melissacline > ucsc_cancer_utilities
diff mergeGenomicMatrixFiles.py @ 43:eb5acf81e609
improve messages
author | jingchunzhu |
---|---|
date | Fri, 07 Aug 2015 00:13:13 -0700 |
parents | 1d83dbbee373 |
children |
line wrap: on
line diff
--- a/mergeGenomicMatrixFiles.py Thu Aug 06 00:30:49 2015 -0700 +++ b/mergeGenomicMatrixFiles.py Fri Aug 07 00:13:13 2015 -0700 @@ -1,7 +1,7 @@ #!/usr/bin/env python import argparse -import string,os,sys +import string,os,sys,json def header (samples, sourceFiles, infile, labelThisFile): if labelThisFile == None: @@ -81,6 +81,13 @@ fout.close() return +def outputMergedMatrixJson(output): + fout = open(output,'w') + j={} + j["type"]="genomicMatrix" + json.dump(j, fout) + fout.close() + if __name__ == '__main__' : # # The input files to this script are two or more matrices, in which @@ -117,3 +124,4 @@ outputSourceMatrix(sourceFiles, args.outSourceMatrix) outputMergedMatrix(dataMatrix, samples, genes, args.outMergedData) +