Write comment lines before a peptide/protein table.
| 562 | |
| 563 | /// Write comment lines before a peptide/protein table. |
| 564 | void writeComments_(SVOutStream& out, const ExperimentalDesign& ed, const bool proteins = true) |
| 565 | { |
| 566 | String what = (proteins ? "Protein" : "Peptide"); |
| 567 | bool old = out.modifyStrings(false); |
| 568 | bool is_ibaq = algo_params_.getValue("method") == "iBAQ"; |
| 569 | out << "# " + what + " abundances computed from file '" + |
| 570 | getStringOption_("in") + "'" << endl; |
| 571 | StringList relevant_params; |
| 572 | if (proteins) // parameters relevant only for protein output |
| 573 | { |
| 574 | relevant_params.push_back("method"); |
| 575 | if (!is_ibaq) |
| 576 | { |
| 577 | relevant_params.push_back("top:N"); |
| 578 | Size top = algo_params_.getValue("top:N"); |
| 579 | if (top != 1) |
| 580 | { |
| 581 | relevant_params.push_back("top:aggregate"); |
| 582 | if (top != 0) |
| 583 | { |
| 584 | relevant_params.push_back("top:include_all"); |
| 585 | } |
| 586 | } |
| 587 | } |
| 588 | } |
| 589 | relevant_params.push_back("best_charge_and_fraction"); // also for peptide output |
| 590 | |
| 591 | if (ed.getNumberOfSamples() > 1) // flags only for consensusXML input |
| 592 | { |
| 593 | relevant_params.push_back("consensus:normalize"); |
| 594 | if (proteins) |
| 595 | { |
| 596 | relevant_params.push_back("consensus:fix_peptides"); |
| 597 | } |
| 598 | } |
| 599 | |
| 600 | String params; |
| 601 | for (const String& str : relevant_params) |
| 602 | { |
| 603 | String value = algo_params_.getValue(str).toString(); |
| 604 | if (value != "false") |
| 605 | { |
| 606 | params += str + "=" + value + ", "; |
| 607 | } |
| 608 | } |
| 609 | if (params.empty()) |
| 610 | { |
| 611 | params = "(none)"; |
| 612 | } |
| 613 | else |
| 614 | { |
| 615 | params.resize(params.size() - 2); // remove trailing ", " |
| 616 | } |
| 617 | out << "# Parameters (relevant only): " + params << endl; |
| 618 | |
| 619 | if (ed.getNumberOfSamples() > 1 && ed.getNumberOfLabels() == 1) |
| 620 | { |
| 621 | String desc = "# Files/samples associated with abundance values below: "; |
nothing calls this directly
no test coverage detected