Commit 39a0e8c0 authored by Claire Kuchly's avatar Claire Kuchly
Browse files

move to BWA mem

parent f0df9644
......@@ -102,6 +102,7 @@ class AlignmentStats (Analysis):
self._add_result_element(sample, "matemapped", str(summary_info_flagstat["matemapped"]))
self._add_result_element(sample, "singletons", str(summary_info_flagstat["singletons"][0]) + ' (' + str(summary_info_flagstat["singletons"][1]) + ')')
self._add_result_element(sample, "mapch1", str(summary_info_flagstat["mapch1"]))
self._add_result_element(sample, "supplimentary" , str(summary_info_flagstat["supplimentary"]))
all_csv_files = self.csv_files_r1
if self.csv_files_r2:
......@@ -202,6 +203,8 @@ class AlignmentStats (Analysis):
singletons_regex = re.compile("(\d+) .*singletons \(([^:]*).*\)")
# mapch1 regexp
mapch1_regex = re.compile("(\d+) .*with mate mapped to a different chr")
# supplimentary regexp
supplimentary_regex = re.compile("(\d+).*supplimentary")
summary = {}
for line in open(flagstat_file, 'r').readlines():
......@@ -216,6 +219,7 @@ class AlignmentStats (Analysis):
ppr = properlypaired_regex.match(line)
sr = singletons_regex.match(line)
mc1r = mapch1_regex.match(line)
sur = supplimentary_regex.match(line)
if tr != None :
summary["total"] = tr.group(1)
if qcfr != None :
......@@ -241,6 +245,8 @@ class AlignmentStats (Analysis):
summary["singletons"] = [sr.group(1), sr.group(2)]
if mc1r != None :
summary["mapch1"] = mc1r.group(1)
if sur != None :
summary["supplimentary"] = sur.group(1)
return summary
......@@ -316,4 +322,4 @@ class AlignmentStats (Analysis):
fh_file.close()
return metrics
\ No newline at end of file
return metrics
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment