Update by asebastian on Fri Oct 27 18:27:03 EDT 2017 from Aswathys-iMac.local
@@ -45,6 +45,7 @@ def parse_idxstats(fname):
def plot(data1, data2):
+ # Plot 1
# Sort by counts.
data1.sort(key=lambda x: int(x[1]), reverse=True)
@@ -54,25 +55,20 @@ def plot(data1, data2):
p1 = ChartParams()
p1.type = 'BarChart'
-
p1.data = data1
-
p1.xlabel = "Flag category"
p1.ylabel = "Read counts"
-
p1.options = '''
title: 'Alignment details.',
legend: {position: 'none'},
'''
+ # Plot 2
p2 = ChartParams()
p2.type = 'BarChart'
-
p2.data = data2
-
p2.xlabel = "Chromosomes"
p2.ylabel = "Read counts"
-
p2.options = '''
title: 'Mapped counts per chromosome.',
legend: {position: 'none'},
@@ -86,10 +82,6 @@ def plot(data1, data2):
html = render_template(data, name)
print(html)
- #with open('index.html', 'wt') as fp:
- # fp.write(html)
-
-
if __name__ == '__main__':
fname1 = sys.argv[1]
@@ -98,7 +90,3 @@ if __name__ == '__main__':
flag_stats = parse_flagstats(fname1)
idx_stats = parse_idxstats(fname2)
plot(flag_stats, idx_stats)
-
- #flag_stats = parse_flagstats("alignment_stats.txt")
- #idx_stats = parse_idxstats("chrom_mapping.txt")
- #plot(flag_stats, idx_stats)
