diff --git a/src/Metrics.cpp b/src/Metrics.cpp index 9826665..d4ec2f9 100644 --- a/src/Metrics.cpp +++ b/src/Metrics.cpp @@ -344,7 +344,6 @@ std::ofstream& operator<<(std::ofstream &stream, rnaseqc::Metrics &counter) std::vector keys = { //"Alternative Alignments", //"Chimeric Reads", - "Duplicate Reads", "End 1 Antisense", "End 2 Antisense", "End 1 Bases", @@ -375,11 +374,14 @@ std::ofstream& operator<<(std::ofstream &stream, rnaseqc::Metrics &counter) "Split Reads", "Total Bases", "Total Mapped Pairs", - "Total Reads", + // "Total Reads", "Unique Mapping, Vendor QC Passed Reads", "Unpaired Reads" }; + stream << "Total Alignments\t" << counter.get("Total Alignments") << std::endl; stream << "Alternative Alignments\t" << counter.get("Alternative Alignments") << std::endl; + stream << "Supplementary Alignments\t" << counter.get("Supplementary Alignments") << std::endl; + stream << "Total Reads\t" << counter.get("Total Alignments") - counter.get("Alternative Alignments") - counter.get("Supplementary Alignments") << std::endl; stream << "Chimeric Fragments\t"; if (counter.get("Chimeric Fragments_tag")) { diff --git a/src/RNASeQC.cpp b/src/RNASeQC.cpp index ca7c13f..98b1c9d 100644 --- a/src/RNASeQC.cpp +++ b/src/RNASeQC.cpp @@ -22,7 +22,7 @@ using namespace args; using namespace rnaseqc; const string NM = "NM"; -const string VERSION = "RNASeQC 2.4.2"; +const string VERSION = "RNASeQC 2.4.3"; const double MAD_FACTOR = 1.4826; const unsigned int LEGACY_MAX_READ_LENGTH = 100000u; const int LEGACY_SPLIT_DISTANCE = 100; @@ -89,7 +89,7 @@ int main(int argc, char* argv[]) const unsigned int BASE_MISMATCH_THRESHOLD = baseMismatchThreshold ? baseMismatchThreshold.Get() : 6u; const unsigned int MAPPING_QUALITY_THRESHOLD = mappingQualityThreshold ? mappingQualityThreshold.Get() : (LegacyMode.Get() ? 4u : 255u); const unsigned int COVERAGE_MASK = coverageMaskSize ? coverageMaskSize.Get() : 500u; -// const int SPLIT_DISTANCE = 100; + // const int SPLIT_DISTANCE = 100; const int VERBOSITY = verbosity ? verbosity.Get() : 0; const int BIAS_OFFSET = biasOffset ? biasOffset.Get() : 0; const int BIAS_WINDOW = biasWindow ? biasWindow.Get() : 100; @@ -252,6 +252,7 @@ int main(int argc, char* argv[]) } //count metrics based on basic read data if (alignment.SecondaryFlag()) counter.increment("Alternative Alignments"); + if (alignment.SupplementaryFlag()) counter.increment("Supplementary Alignments"); else if (alignment.QCFailFlag()) counter.increment("Failed Vendor QC"); else if (alignment.MapQuality() < MAPPING_QUALITY_THRESHOLD) counter.increment("Low Mapping Quality"); if (alignment.SupplementaryFlag() && !(LegacyMode.Get() || readStringTag(alignment, chimeric_tag, trash))) @@ -393,7 +394,7 @@ int main(int argc, char* argv[]) if (VERBOSITY > 1) cout << "Average Reads/Sec: " << static_cast(alignmentCount) / difftime(t2, t1) << endl; cout << "Estimating library complexity..." << endl; } - counter.increment("Total Reads", alignmentCount); + counter.increment("Total Alignments", alignmentCount); double duplicates = static_cast(counter.get("Duplicate Pairs")); double unique = static_cast(counter.get("Unique Fragments")); double numReads = duplicates + unique;