Skip to content
Snippets Groups Projects
Commit 8c37692f authored by Aaron's avatar Aaron
Browse files

annotateBed can report counts and pct coverage for each annotation file.

parent c2664a63
No related branches found
No related tags found
No related merge requests found
......@@ -60,9 +60,16 @@ void BedAnnotate::PrintHeader() {
printf("\t");
// now print the label for each file.
for (size_t i = 0; i < _annoTitles.size(); ++i)
printf("%s\t", _annoTitles[i].c_str());
printf("\n");
if (_reportBoth == false) {
for (size_t i = 0; i < _annoTitles.size(); ++i)
printf("%s\t", _annoTitles[i].c_str());
printf("\n");
}
else {
for (size_t i = 0; i < _annoTitles.size(); ++i)
printf("%s_cnt\t%s_pct", _annoTitles[i].c_str(), _annoTitles[i].c_str());
printf("\n");
}
}
......@@ -189,7 +196,7 @@ void BedAnnotate::ReportAnnotations() {
else if (_reportCounts == true && _reportBoth == false)
printf("%d\t", bedItr->counts[i]);
else if (_reportCounts == false && _reportBoth == true)
printf("%d,%f\t", bedItr->counts[i], fractCovered);
printf("%d\t%f\t", bedItr->counts[i], fractCovered);
}
// print newline for next feature.
printf("\n");
......
......@@ -148,7 +148,7 @@ void ShowHelp(void) {
cerr << "\t-counts\t" << "Report the count of features in each file that overlap -i." << endl;
cerr << "\t\t- Default is to report the fraction of -i covered by each file." << endl << endl;
cerr << "\t-both\t" << "Report the counts and % coverage." << endl;
cerr << "\t-both\t" << "Report the counts followed by the % coverage." << endl;
cerr << "\t\t- Default is to report the fraction of -i covered by each file." << endl << endl;
cerr << "\t-s\t" << "Force strandedness. That is, only include hits in A that" << endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment