From 9d57fb2c72f231663fe93af822d7d1d95e2e9e8f Mon Sep 17 00:00:00 2001 From: tobiasrausch Date: Mon, 20 Aug 2018 17:24:27 +0200 Subject: [PATCH] no number quotes --- src/json.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/json.h b/src/json.h index 12b0ca2..3c002bd 100644 --- a/src/json.h +++ b/src/json.h @@ -56,7 +56,7 @@ namespace bamstats { rfile << "{\"id\": \"summaryTable\","; rfile << "\"title\": \"Summary Statistics\","; - rfile << "\"data\": {\"columns\": [\"Sample\", \"Library\", \"#QCFail\", \"QCFailFraction\", \"#DuplicateMarked\", \"DuplicateFraction\", \"#Unmapped\", \"UnmappedFraction\", \"#Mapped\", \"MappedFraction\"], \"rows\": ["; + rfile << "\"data\": {\"columns\": [\"Sample\", \"Library\", \"#QCFail\", \"QCFailFraction\", \"#DuplicateMarked\", \"DuplicateFraction\", \"#Unmapped\", \"UnmappedFraction\", \"#Mapped\", \"MappedFraction\", \"#MappedRead1\", \"#MappedRead2\", \"RatioMapped2vsMapped1\", \"#MappedForward\", \"MappedForwardFraction\", \"#MappedReverse\", \"MappedReverseFraction\"], \"rows\": ["; for(typename TRGMap::const_iterator itRg = rgMap.begin(); itRg != rgMap.end(); ++itRg) { uint64_t totalReadCount = _totalReadCount(itRg); uint64_t mappedCount = itRg->second.rc.mapped1 + itRg->second.rc.mapped2; @@ -64,14 +64,21 @@ namespace bamstats rfile << "["; rfile << "\"" << c.sampleName << "\"" << ","; rfile << "\"" << itRg->first << "\"" << ","; - rfile << "\"" << itRg->second.rc.qcfail << "\"" << ","; - rfile << "\"" << (double) itRg->second.rc.qcfail / (double) totalReadCount << "\"" << ","; - rfile << "\"" << itRg->second.rc.dup << "\"" << ","; - rfile << "\"" << (double) itRg->second.rc.dup / (double) totalReadCount << "\"" << ","; - rfile << "\"" << itRg->second.rc.unmap << "\"" << ","; - rfile << "\"" << (double) itRg->second.rc.unmap / (double) totalReadCount << "\"" << ","; - rfile << "\"" << mappedCount << "\"" << ","; - rfile << "\"" << (double) mappedCount / (double) totalReadCount << "\""; + rfile << itRg->second.rc.qcfail << ","; + rfile << (double) itRg->second.rc.qcfail / (double) totalReadCount << ","; + rfile << itRg->second.rc.dup << ","; + rfile << (double) itRg->second.rc.dup / (double) totalReadCount << ","; + rfile << itRg->second.rc.unmap << ","; + rfile << (double) itRg->second.rc.unmap / (double) totalReadCount << ","; + rfile << mappedCount << ","; + rfile << (double) mappedCount / (double) totalReadCount << ","; + rfile << itRg->second.rc.mapped1 << ","; + rfile << itRg->second.rc.mapped2 << ","; + rfile << (double) itRg->second.rc.mapped2 / (double) itRg->second.rc.mapped1 << ","; + rfile << itRg->second.rc.forward << ","; + rfile << (double) itRg->second.rc.forward / (double) mappedCount << ","; + rfile << itRg->second.rc.reverse << ","; + rfile << (double) itRg->second.rc.reverse / (double) mappedCount; rfile << "]"; } rfile << "]},";