Commit f2053510 authored by Edlira Nano's avatar Edlira Nano
Browse files

corrected compar result + added compar description to manual

git-svn-id: https://subversion.renater.fr/masschroq/trunk@2276 e4b6dbb4-9209-464b-83f7-6257456c460c
parent a57b45b1
......@@ -278,7 +278,7 @@ framework. Version $1.2$ is its latest public release.
{\M} comes as a stand-alone command-line program and
also with a library for integration in other software or proteomic
pipelines.
pipelines.
On the {\M} homepage (\href{\sitemasschroq}{\sitemasschroq})
you can find download and install instructions, various documentation files and
......@@ -295,8 +295,9 @@ subversion repository from
Feel free to contribute to the {\M} project by directly contacting one
of its authors.
\section{What is new in {\Mv}}
\section{What is new in {\Mv}?}
\subsection{The post-matching feature}
The main novelty in {\Mv} is the introduction of the peptide peak post-matching feature.
Indeed, before version $1.2$, {\M} performed peak
matching during peptide quantification peak by peak. The post-matching mode
......@@ -314,7 +315,22 @@ For more details on the post-matching mode and when to use it, see section
schema version being $1.2$ (the same version number as
MassChroQ). Older masschroqML files stay functional with the new
schema, but new masschroqML files (containing the post matching
feature for example) will not work with older schema versions.
feature for example) will not work with older schema versions.
\subsection{The comparison result file}
The \emph{tsv} result files produced by {\M} are well suited for
automatic statistical analysis in external tools, like the \emph{R}
software. But they are not well suited for simple manual or visual
overview or comparison purposes. Therefore, in version $1.2$, a new type of
\emph{tsv} result file has been added: the \emph{comparison result
file}. The comparison result file is well suited for immediate visual
comparison of results and simple manual statistical analysis on them.
The comparison type of file is automatically generated with the
other old \emph{tsv} result files, this means that when the user
chooses to export the quantification results in \emph{tsv} format,
from now on this has the effect of creating three \emph{tsv} files :
the \emph{\_pep}, the \emph{\_prot} and the \emph{\_compar} extension
files.
\section{{\M} features overview}\label{groups-sec}
......@@ -365,10 +381,9 @@ are two possibilities :
which uses MS level one retention times only, and
the MS2 alignment method which uses MS level 2 retention times.
The quantification results in {\M} are
summarized in a single file, sorted by group and sample, allowing
comparisons to be performed easily. Several results file formats are
available: gnumeric, tsv, xhtml and xml (masschroqML xml format).
The quantification results in {\M} are sorted by group and sample, allowing
comparisons and automatic statistics to be performed easily. Several results file formats are
available: gnumeric, tsv, xhtml and masschroqML format.
\section{Help}
......@@ -1703,7 +1718,7 @@ format and name of the files that will contain the final
quantification results. The format can be :
\bi
\item \ttt{tsv} : tab-separated values text format; this format
is ready to use for statistical analysis;
is ready to use for automatic or manual statistical analysis ;
\item \ttt{gnumeric} : Gnome spreadsheet format to use with Gnumeric software;
\item \ttt{xhtmltable} : xhtml (eXtensible HyperText Markup Language)
format; all the results are in an xhtml table and you can visualize
......@@ -1719,13 +1734,20 @@ that will be called \ttt{result2.gnumeric}, etc.
\textdbend The \ttt{tsv} and \ttt{xhtmltable} outputs
will create two files : one with extension \ttt{\_pep} containing the
quantification results and a second one with extension
quantification results, and a second one with extension
\ttt{\_prot} resuming for each peptide, the corresponding proteins and
descriptions. The \ttt{gnumeric} format will contain two separate
sheets for each of them. In the example above two files named
\ttt{results\_pep.tsv} and \ttt{results\_prot.tsv} will be created for
descriptions. Both these files are well suited for automatical
statistical analysis. The \ttt{gnumeric} format will contain two separate
sheets for each of them. The \ttt{tsv} output will also create a third file with
the extension \ttt{\_copmpar}, containing the quantification results
sorted in a different way, well suited for a first direct visual
verification of the results.
In the example above three files named
\ttt{results\_pep.tsv}, \ttt{results\_prot.tsv} and
\ttt{results\_compar.tsv} will be created for
the tsv format and a unique file named \ttt{results.gnumeric}
containing two sheets for the \ttt{gnumeric} format.
containing two sheets for the \ttt{gnumeric} format.
\subsection*{Alignment result (\ttt{.time}) files}
When {\M} reads the \ttt{align} tag in its input masschroqML file (lines $57$
......
......@@ -5,6 +5,7 @@
*/
#include "comparTsvQuantifResults.h"
#include <QDebug>
ComparTsvQuantifResults::ComparTsvQuantifResults()
:
......@@ -96,33 +97,36 @@ ComparTsvQuantifResults::setMatchedPeaks(const std::vector<xicPeak *> * p_v_peak
{
const Peptide * p_peptide(_current_quanti_item->getPeptide());
QString pepId(""), isotope_label(""), sampleId(""), tempArea(""), currentZ, pepSequence("");
// we only print peptide data
if (p_peptide != NULL)
{
currentZ.setNum(getCurrentZ());
pepId = p_peptide->getXmlId();
pepId.append("_").append(currentZ);
if (p_peptide->getIsotopeLabel() != NULL)
{
isotope_label = p_peptide->getIsotopeLabel()->getXmlId();
}
// TODO ajouter le quantiID
sampleId = _current_quantify_id;
sampleId.append("_");
sampleId.append(_current_group_id);
sampleId.append("_");
sampleId.append(((*itp)->getMsrun())->getXmlId());
sampleId.append("_");
sampleId.append(isotope_label);
// adding to the sample map
if (!_sampleIds.contains(sampleId))
if (p_peptide->getIsotopeLabel() != NULL)
{
isotope_label = p_peptide->getIsotopeLabel()->getXmlId();
sampleId.append("_");
sampleId.append(isotope_label);
}
// adding sample to the sample map
if ( !_sampleIds.contains(sampleId) )
{
_sampleIds << sampleId;
}
mcq_double area((*itp)->get_area());
tempArea = _map_peptide_quantification[pepId][sampleId];
if ( ! tempArea.isEmpty())
{
tempArea.append("|").append(formatCell(area));
......@@ -143,7 +147,6 @@ ComparTsvQuantifResults::setMatchedPeaks(const std::vector<xicPeak *> * p_v_peak
vector <const Protein *> prots = p_peptide->getProteinList();
unsigned int prot_size = prots.size();
QString protIds("");
if (prot_size > 0)
{
vector <const Protein *>::iterator it;
......@@ -155,7 +158,7 @@ ComparTsvQuantifResults::setMatchedPeaks(const std::vector<xicPeak *> * p_v_peak
}
}
list << formatCell(protIds);
_map_peptide_description[pepId]=list;
_map_peptide_description[pepId] = list;
}
}
}
......@@ -165,29 +168,46 @@ void
ComparTsvQuantifResults::debriefing()
{
/// print results
this->printHeaders();
QString sampId, pepId, tmpArea;
std::map<QString, std::map<QString, QString> >::const_iterator itpep;
std::map<QString, QString>::const_iterator itsamp;
std::map<QString, QStringList>::const_iterator itfind;
for (itpep = _map_peptide_quantification.begin();
itpep != _map_peptide_quantification.end();
++itpep)
{
QStringList list;
pepId = itpep->first;
list << formatCell(_map_peptide_description[pepId]);
itfind = _map_peptide_description.find(pepId);
if (itfind != _map_peptide_description.end())
{
list << itfind->second;
}
QStringList::const_iterator sampleIterator;
for (sampleIterator = _sampleIds.constBegin();
sampleIterator != _sampleIds.constEnd();
++sampleIterator)
std::map<QString, QString> inner_map = itpep->second;
for (itsamp = inner_map.begin();
itsamp != inner_map.end();
++itsamp)
{
sampId = (*sampleIterator);
tmpArea = _map_peptide_quantification[pepId][sampId];
list << formatCell(tmpArea);
list << formatCell(itsamp->second);
}
printPepLine(list);
// QStringList::const_iterator sampleIterator;
// for (sampleIterator = _sampleIds.constBegin();
// sampleIterator != _sampleIds.constEnd();
// ++sampleIterator)
// {
// sampId = (*sampleIterator);
// tmpArea = _map_peptide_quantification[pepId][sampId];
// list << formatCell(tmpArea);
// }
printLine(list);
}
}
......@@ -201,17 +221,11 @@ ComparTsvQuantifResults::printHeaders()
list << formatCell("sequence");
list << formatCell("proteins");
list << _sampleIds;
printPepLine(list);
}
void
ComparTsvQuantifResults::printPepLine(const QStringList & list)
{
*_compar_output_stream << list.join(_sep) << _endl;
printLine(list);
}
void
ComparTsvQuantifResults::printLine(const QStringList & list)
{
this->printPepLine(list);
*_compar_output_stream << list.join(_sep) << _endl;
}
......@@ -67,8 +67,6 @@ protected:
virtual void printHeaders();
virtual void printPepLine(const QStringList & list);
virtual void printLine(const QStringList & list);
/// Output file for compar results
......@@ -77,14 +75,14 @@ protected:
//stored data
/// hash map : peptide-z id -> map[sample id -> area]
std::map< QString, std::map<QString, QString> > _map_peptide_quantification;
/// hash map : peptide-z id -> protein id's list
std::map< QString, QStringList > _map_peptide_description;
/// hash map : peptide-z id -> protein id's separated by a space
std::map<QString, QStringList> _map_peptide_description;
//list sampleID
QStringList _sampleIds;
private :
/// The streams corresponding to each output file
/// The streams corresponding to the output file
QTextStream * _compar_output_stream;
};
......
/**
* \file quantifResultsBase.cpp
* \date Octover 05, 2010
* \date October 05, 2010
* \author Edlira Nano
*/
......
Markdown is supported
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