Skip to content

Commit

Permalink
display AfterQC version in report
Browse files Browse the repository at this point in the history
  • Loading branch information
sfchen committed Nov 28, 2016
1 parent d236b76 commit 18399a4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion after.py
Expand Up @@ -9,7 +9,7 @@
import copy
from util import *

AFTERQC_VERSION = "0.8.1"
AFTERQC_VERSION = "0.9.0"

def parseCommand():
usage = "Automatic Filtering, Trimming, Error Removing and Quality Control for Illumina fastq data \n\nSimplest usage:\ncd to the folder containing your fastq data, run <python after.py>"
Expand Down Expand Up @@ -189,6 +189,7 @@ def main():
print('cannot get python version, please make sure you are using python2')

(options, args) = parseCommand()
options.version = AFTERQC_VERSION
options.trim_pair_same = parseBool(options.trim_pair_same)
options.draw = parseBool(options.draw)
options.store_overlap = parseBool(options.store_overlap)
Expand Down
1 change: 1 addition & 0 deletions preprocesser.py
Expand Up @@ -713,6 +713,7 @@ def run(self):

self.addFiguresToReport(reporter)
reporter.setStat(stat)
reporter.setVersion(self.options.version)
reporter.output(os.path.join(qc_dir, "report.html"))

def addFiguresToReport(self, reporter):
Expand Down
4 changes: 4 additions & 0 deletions qcreporter.py
Expand Up @@ -17,6 +17,9 @@ def addFigure(self, title, figure, div='', summary=''):
def setStat(self, stat):
self.stat = stat

def setVersion(self, ver):
self.version = ver

def output(self, filename):
io = open(filename, "w")
self.outputHeader(io)
Expand Down Expand Up @@ -86,6 +89,7 @@ def outputSummary(self, io):
io.write("<div class='figure-div'>\n")
io.write("<div class='figure-title'><a name='summary'>1, AfterQC summary</a></div>\n")
io.write("<table class='summary-table'>\n")
self.outputRow(io, "AfterQC Version:", self.version)
self.outputRow(io, "sequencing:", self.getSequencing())
if self.stat["command"]["read2_file"] != None:
self.outputRow(io, "estimated seq error:", str(self.stat["overlap"]["error_rate"]*100) + "%")
Expand Down

0 comments on commit 18399a4

Please sign in to comment.