Skip to content

Commit

Permalink
release 1.2.660
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiri Novak committed Feb 21, 2018
1 parent 115eed4 commit 2622b24
Show file tree
Hide file tree
Showing 57 changed files with 4,983 additions and 1,162 deletions.
4 changes: 3 additions & 1 deletion CycloBranch/CycloBranch-Linux.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TEMPLATE = app
TARGET = CycloBranch
QT += core gui widgets printsupport svg
INCLUDEPATH += . core gui parallel
QMAKE_CXXFLAGS += -std=c++0x -DLINUX -m64
QMAKE_CXXFLAGS += -std=c++11 -DLINUX -m64
QMAKE_LIBS += -lboost_regex -lxerces-c
OBJECTS_DIR = build/
MOC_DIR = moc/
Expand All @@ -21,6 +21,7 @@ HEADERS += core/cBrick.h \
core/cDeNovoGraphNode.h \
core/cFragmentIons.h \
core/cImzML.h \
core/cIsotopePatternCache.h \
core/cMzML.h \
core/cParameters.h \
core/cPeak.h \
Expand Down Expand Up @@ -78,6 +79,7 @@ SOURCES += core/cBrick.cpp \
core/cDeNovoGraphNode.cpp \
core/cFragmentIons.cpp \
core/cImzML.cpp \
core/cIsotopePatternCache.cpp \
core/cMzML.cpp \
core/cParameters.cpp \
core/cPeak.cpp \
Expand Down
4 changes: 3 additions & 1 deletion CycloBranch/CycloBranch-MacOSX.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TEMPLATE = app
TARGET = CycloBranch
QT += core gui widgets printsupport svg
INCLUDEPATH += . core gui parallel /usr/local/opt/boost/include /usr/local/opt/xerces-c/include
QMAKE_CXXFLAGS += -std=c++0x -DMACOSX -m64
QMAKE_CXXFLAGS += -std=c++11 -DMACOSX -m64
QMAKE_LIBS += -lboost_regex -lxerces-c
QMAKE_LIBDIR = /usr/local/opt/boost/lib /usr/local/opt/xerces-c/lib
OBJECTS_DIR = build/
Expand All @@ -23,6 +23,7 @@ HEADERS += core/cBrick.h \
core/cDeNovoGraphNode.h \
core/cFragmentIons.h \
core/cImzML.h \
core/cIsotopePatternCache.h \
core/cMzML.h \
core/cParameters.h \
core/cPeak.h \
Expand Down Expand Up @@ -80,6 +81,7 @@ SOURCES += core/cBrick.cpp \
core/cDeNovoGraphNode.cpp \
core/cFragmentIons.cpp \
core/cImzML.cpp \
core/cIsotopePatternCache.cpp \
core/cMzML.cpp \
core/cParameters.cpp \
core/cPeak.cpp \
Expand Down
2 changes: 1 addition & 1 deletion CycloBranch/CycloBranch.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Comment=A tool for de novo sequencing of nonribosomal peptides from accurate product ion mass spectra.
Comment=CycloBranch
Exec=CycloBranch
Icon=/usr/share/cyclobranch/images/cb.png
Name=CycloBranch
Expand Down
2 changes: 2 additions & 0 deletions CycloBranch/CycloBranch.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
<ClCompile Include="core\cDeNovoGraphNode.cpp" />
<ClCompile Include="core\cFragmentIons.cpp" />
<ClCompile Include="core\cImzML.cpp" />
<ClCompile Include="core\cIsotopePatternCache.cpp" />
<ClCompile Include="core\cMzML.cpp" />
<ClCompile Include="core\cParameters.cpp" />
<ClCompile Include="core\cPeak.cpp" />
Expand Down Expand Up @@ -529,6 +530,7 @@
<ClInclude Include="core\cDeNovoGraphNode.h" />
<ClInclude Include="core\cFragmentIons.h" />
<ClInclude Include="core\cImzML.h" />
<ClInclude Include="core\cIsotopePatternCache.h" />
<ClInclude Include="core\cMzML.h" />
<ClInclude Include="core\cParameters.h" />
<ClInclude Include="core\cPeak.h" />
Expand Down
6 changes: 6 additions & 0 deletions CycloBranch/CycloBranch.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,9 @@
<ClCompile Include="gui\cChromatogramWindowWidget.cpp">
<Filter>Source Files\gui</Filter>
</ClCompile>
<ClCompile Include="core\cIsotopePatternCache.cpp">
<Filter>Source Files\core</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="gui\cAboutWidget.h">
Expand Down Expand Up @@ -630,6 +633,9 @@
<ClInclude Include="core\cMzML.h">
<Filter>Header Files\core</Filter>
</ClInclude>
<ClInclude Include="core\cIsotopePatternCache.h">
<Filter>Header Files\core</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="cyclobranch.rc">
Expand Down
16 changes: 16 additions & 0 deletions CycloBranch/core/cBrick.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "core/cBrick.h"

#include "core/cSummaryFormula.h"


int getNumberOfBricks(const string& composition) {
if (composition.size() == 0) {
Expand All @@ -26,6 +28,7 @@ void cBrick::clear() {
acronyms.clear();
references.clear();
summary = "";
summarymap.clear();
mass = 0;
composition = "";
artificial = false;
Expand Down Expand Up @@ -54,6 +57,11 @@ string& cBrick::getSummary() {
}


map<string, int>& cBrick::getSummaryMap() {
return summarymap;
}


vector<string>& cBrick::getAcronyms() {
return acronyms;
}
Expand Down Expand Up @@ -106,6 +114,12 @@ void cBrick::setSummary(const string& summary) {
}


void cBrick::createSummaryMap() {
summarymap.clear();
addStringFormulaToMap(summary, summarymap);
}


void cBrick::setAcronyms(const string& acronyms) {
this->acronyms.clear();
string s = "";
Expand Down Expand Up @@ -360,6 +374,7 @@ void cBrick::store(ofstream& os) {
storeStringVector(acronyms, os);
storeStringVector(references, os);
storeString(summary, os);
storeStringIntMap(summarymap, os);
os.write((char *)&mass, sizeof(double));
storeString(composition, os);
os.write((char *)&artificial, sizeof(bool));
Expand All @@ -372,6 +387,7 @@ void cBrick::load(ifstream& is) {
loadStringVector(acronyms, is);
loadStringVector(references, is);
loadString(summary, is);
loadStringIntMap(summarymap, is);
is.read((char *)&mass, sizeof(double));
loadString(composition, is);
is.read((char *)&artificial, sizeof(bool));
Expand Down
17 changes: 16 additions & 1 deletion CycloBranch/core/cBrick.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include "core/utilities.h"

using namespace std;
Expand Down Expand Up @@ -42,6 +43,7 @@ class cBrick {
vector<string> acronyms;
vector<string> references;
string summary;
map<string, int> summarymap;
double mass;
string composition;
bool artificial;
Expand Down Expand Up @@ -89,6 +91,13 @@ class cBrick {
string& getSummary();


/**
\brief Access to a map which stores a summary molecular formula of the brick.
\retval map<string, int> reference to a map
*/
map<string, int>& getSummaryMap();


/**
\brief Access to a vector of strings which stores acronyms of all izomers corresponding to the brick.
\retval reference to a vector of strings
Expand Down Expand Up @@ -142,10 +151,16 @@ class cBrick {
/**
\brief Set the summary molecular formula of the brick.
\param summary reference to a string
*/
*/
void setSummary(const string& summary);


/**
\brief Create an internal map of atoms from the summary formula.
*/
void createSummaryMap();


/**
\brief Set acronyms of all izomers corresponding to the brick.
\param acronyms reference to a string where the acronyms are separated by '/'
Expand Down
2 changes: 1 addition & 1 deletion CycloBranch/core/cBricksDatabase.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "core/cBricksDatabase.h"


#include "gui/cMainThread.h"


Expand Down Expand Up @@ -184,6 +183,7 @@ int cBricksDatabase::loadFromPlainTextStream(ifstream &stream, string& errormess
pos = s.find('\t');
if (pos != string::npos) {
b.setSummary(s.substr(0, pos));
b.createSummaryMap();
s = s.substr(pos + 1);
}
else {
Expand Down
2 changes: 1 addition & 1 deletion CycloBranch/core/cCandidate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ bool cCandidate::compare(cCandidate& candidate) {
}


vector<nodeEdge> cCandidate::getPath() {
vector<nodeEdge>& cCandidate::getPath() {
return path;
}

Expand Down
2 changes: 1 addition & 1 deletion CycloBranch/core/cCandidate.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ class cCandidate {
\brief Get a path in the de novo graph corresponding to the peptide sequence candidate.
\retval vector<nodeEdge> vector of pairs node and edge
*/
vector<nodeEdge> getPath();
vector<nodeEdge>& getPath();


/**
Expand Down
16 changes: 10 additions & 6 deletions CycloBranch/core/cDeNovoGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,17 @@ int cDeNovoGraph::createGraph(bool& terminatecomputation) {
sortedpeaklist.removeChargeVariants(parameters->precursorcharge, parameters->fragmentmasserrortolerance);
*os << "Number of nodes after deconvolution: " << sortedpeaklist.size() << endl;

// remove dehydrated peaks
sortedpeaklist.removeNeutralLoss(- H2O, parameters->precursorcharge, parameters->fragmentmasserrortolerance);
*os << "Number of nodes when dehydrated ions are removed: " << sortedpeaklist.size() << endl;
//if (!parameters->generateisotopepattern) {

// remove deamidated peaks
sortedpeaklist.removeNeutralLoss(- NH3, parameters->precursorcharge, parameters->fragmentmasserrortolerance);
*os << "Number of nodes when deamidated ions are removed: " << sortedpeaklist.size() << endl;
// remove dehydrated peaks
sortedpeaklist.removeNeutralLoss(-H2O, parameters->precursorcharge, parameters->fragmentmasserrortolerance);
*os << "Number of nodes when dehydrated ions are removed: " << sortedpeaklist.size() << endl;

// remove deamidated peaks
sortedpeaklist.removeNeutralLoss(-NH3, parameters->precursorcharge, parameters->fragmentmasserrortolerance);
*os << "Number of nodes when deamidated ions are removed: " << sortedpeaklist.size() << endl;

//}

double negativeshift = (parameters->precursorcharge > 0)?0:-2*(H - e);
string negativeshiftsummary = (parameters->precursorcharge > 0)?"":"H-2+-2";
Expand Down
5 changes: 5 additions & 0 deletions CycloBranch/core/cDeNovoGraphNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ void nodeEdge::load(ifstream& is) {
}


bool operator == (nodeEdge const& a, nodeEdge const& b) {
return (a.nodeid == b.nodeid) && (a.edgeid == b.edgeid);
}


bool operator == (cEdge const& a, cEdge const& b) {
return (a.targetnode == b.targetnode) && (a.brickid == b.brickid) && (a.sourceion == b.sourceion) && (a.targetion == b.targetion);
}
Expand Down
9 changes: 9 additions & 0 deletions CycloBranch/core/cDeNovoGraphNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ struct nodeEdge {
};


/**
\brief Overloaded operator ==.
\param a first nodeEdge
\param b second nodeEdge
\retval bool true when nodeEdges are equal
*/
bool operator == (nodeEdge const& a, nodeEdge const& b);


/**
\brief The structure representing an outgoing edge from a node.
*/
Expand Down
Loading

0 comments on commit 2622b24

Please sign in to comment.