Mercurial > repos > alenail > pieplot_macs
comparison pieplot_macs/pieplots_macs.py @ 16:8dae9fdd2afe draft default tip
Uploaded
author | alenail |
---|---|
date | Fri, 15 Apr 2016 11:51:20 -0400 |
parents | 4ec317901ac3 |
children |
comparison
equal
deleted
inserted
replaced
15:4ec317901ac3 | 16:8dae9fdd2afe |
---|---|
104 # df = pd.DataFrame(data=fracs, index=indexDataFrame) | 104 # df = pd.DataFrame(data=fracs, index=indexDataFrame) |
105 # dfFileName = outfile.replace("pdf","csv") | 105 # dfFileName = outfile.replace("pdf","csv") |
106 # df.to_csv(dfFileName, sep=',') | 106 # df.to_csv(dfFileName, sep=',') |
107 #plt.title('MACS peaks in %s'%(name)) | 107 #plt.title('MACS peaks in %s'%(name)) |
108 plt.figtext(.5, .1, 'Total: %i'%totalpks, ha='center') | 108 plt.figtext(.5, .1, 'Total: %i'%totalpks, ha='center') |
109 fig.savefig(outfile) | 109 fig.savefig(outfile, format='pdf') |
110 | 110 |
111 def main(): | 111 def main(): |
112 usage = "usage: %prog --genefile MACSoutfile_genes.txt --peakfile MACSoutfile_peaks.bed --outfile MACSdirectory/piechart.pdf" | 112 usage = "usage: %prog --genefile MACSoutfile_genes.txt --peakfile MACSoutfile_peaks.bed --outfile MACSdirectory/piechart.pdf" |
113 parser = ArgumentParser(usage) | 113 parser = ArgumentParser(usage) |
114 parser.add_argument("--genefile", dest="genefile", help="Path to file MACS_mfold10,30_pval1e-5_genes.txt") | 114 parser.add_argument("--genefile", dest="genefile", help="Path to file MACS_mfold10,30_pval1e-5_genes.txt") |
115 parser.add_argument("--peakfile", dest="peakfile", help="Path to file MACS_mfold10,30_pval1e-5_peaks.bed") | 115 parser.add_argument("--peakfile", dest="peakfile", help="Path to file MACS_mfold10,30_pval1e-5_peaks.bed") |
116 parser.add_argument("--outfile", dest="outfile", default="MACS_piechart.pdf", help="Path to pdf file where you want to store the piechart") | 116 parser.add_argument("--outfile", dest="outfile", default="MACS_piechart.pdf", help="Path to pdf file where you want to store the piechart") |
117 parser.add_argument('--MACS',action='store_true',default=False,help='Set this value if you have MACS peaks') | 117 parser.add_argument('--MACS', action='store_true', default=False, help='Set this value if you have MACS peaks') |
118 | 118 |
119 args=parser.parse_args() | 119 args=parser.parse_args() |
120 | 120 |
121 map_peaks(args.genefile, args.peakfile, args.outfile, args.MACS) | 121 map_peaks(args.genefile, args.peakfile, args.outfile, args.MACS) |
122 | 122 |