Skip to content

Commit c5fc0f9

Browse files
author
Steve Benz
committed
Adding current licensing information
1 parent 009cae2 commit c5fc0f9

11 files changed

+218
-124
lines changed

README.mediawiki

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
= PARADIGM =
2+
== PAthway Representation and Analysis by Direct Reference on Graphical Models ==
3+
4+
Developed by Charles Vaske & Steve Benz
5+
6+
A factor graph framework for pathway inference on high-throughput genomic data
7+
8+
9+
=== LICENSE & COPYRIGHT ===
10+
11+
Copyright 2009-2011 -- The Regents of the University of California
12+
13+
14+
This code is provided for research purposes to scientists at non-profit organizations. All other use is strictly prohibited.
15+
For further details please contact University of California, Santa Cruz or Five3 Genomics, LLC (http://five3genomics.com).

common.h

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/********************************************************************************/
2+
/* Copyright 2009-2011 -- The Regents of the University of California */
3+
/* This code is provided for research purposes to scientists at non-profit */
4+
/* organizations. All other use is strictly prohibited. For further */
5+
/* details please contact University of California, Santa Cruz or */
6+
/* Five3 Genomics, LLC (http://five3genomics.com). */
7+
/********************************************************************************/
8+
19
#ifndef HEADER_DIGMA_COMMON_H
210
#define HEADER_DIGMA_COMMON_H
311

configuration.cpp

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/********************************************************************************/
2+
/* Copyright 2009-2011 -- The Regents of the University of California */
3+
/* This code is provided for research purposes to scientists at non-profit */
4+
/* organizations. All other use is strictly prohibited. For further */
5+
/* details please contact University of California, Santa Cruz or */
6+
/* Five3 Genomics, LLC (http://five3genomics.com). */
7+
/********************************************************************************/
8+
19
#include "configuration.h"
210

311
const std::string RunConfiguration::INFERENCE_CONF_TOKEN("inference");
@@ -16,8 +24,8 @@ RunConfiguration::RunConfiguration(const std::string& configure_filename)
1624
addConfigurations(is);
1725
}
1826

19-
PropertySet&
20-
RunConfiguration::getInferenceProperties(const std::string& pathway_filename)
27+
PropertySet&
28+
RunConfiguration::getInferenceProperties(const std::string& pathway_filename)
2129
{
2230
for (size_t i = 0; i < _inferences.size(); i++)
2331
{

configuration.h

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/********************************************************************************/
2+
/* Copyright 2009-2011 -- The Regents of the University of California */
3+
/* This code is provided for research purposes to scientists at non-profit */
4+
/* organizations. All other use is strictly prohibited. For further */
5+
/* details please contact University of California, Santa Cruz or */
6+
/* Five3 Genomics, LLC (http://five3genomics.com). */
7+
/********************************************************************************/
8+
19
#ifndef HEADER_CONFIGURATION_H
210
#define HEADER_CONFIGURATION_H
311

@@ -11,7 +19,7 @@
1119

1220
using namespace dai;
1321

14-
class RunConfiguration
22+
class RunConfiguration
1523
{
1624
public:
1725
static const std::string INFERENCE_CONF_TOKEN;
@@ -31,7 +39,7 @@ class RunConfiguration
3139
EMSteps _emsteps;
3240
PropertySet _em;
3341
PropertySet _path;
34-
42+
3543
public:
3644

3745
/// Default constructor
@@ -40,8 +48,8 @@ class RunConfiguration
4048
}
4149

4250
/// Copy constructor
43-
RunConfiguration(const RunConfiguration &x) :
44-
_inferences(x._inferences),
51+
RunConfiguration(const RunConfiguration &x) :
52+
_inferences(x._inferences),
4553
_evidences(x._evidences),
4654
_emsteps(x._emsteps),
4755
_em(x._em),
@@ -59,7 +67,7 @@ class RunConfiguration
5967
}
6068
return *this;
6169
}
62-
70+
6371
/// Useful constructor
6472
RunConfiguration(const std::string& configure_filename);
6573

@@ -70,11 +78,11 @@ class RunConfiguration
7078
PropertySet& evidence(size_t i);
7179

7280
PropertySet& pathwayProps() {return _path;}
73-
81+
7482
size_t evidenceSize();
75-
83+
7684
const PropertySet& emProps() { return _em; }
77-
85+
7886
const EMSteps emSteps() const {return _emsteps;}
7987
};
8088

evidencesource.cpp

+21-14
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1+
/********************************************************************************/
2+
/* Copyright 2009-2011 -- The Regents of the University of California */
3+
/* This code is provided for research purposes to scientists at non-profit */
4+
/* organizations. All other use is strictly prohibited. For further */
5+
/* details please contact University of California, Santa Cruz or */
6+
/* Five3 Genomics, LLC (http://five3genomics.com). */
7+
/********************************************************************************/
8+
19
#include <fstream>
210

311
#include "common.h"
412
#include "evidencesource.h"
513

614
#define THROW(msg) throw std::runtime_error(msg)
715

8-
EvidenceFactorGen::EvidenceFactorGen(const PropertySet& p) : _params()
16+
EvidenceFactorGen::EvidenceFactorGen(const PropertySet& p) : _params()
917
{
1018
_params.reserve(9);
1119
if (p.hasKey("factorParams")) {
@@ -33,7 +41,7 @@ EvidenceFactorGen::EvidenceFactorGen(const PropertySet& p) : _params()
3341
Real minor = epsilon / 2;
3442
Real major0 = 1 - epsilon0;
3543
Real minor0 = epsilon0 / 2;
36-
44+
3745
bool flip = false;
3846
if (p.hasKey("reverse")) {
3947
if (p.getStringAs<string>("reverse") == "true") {
@@ -49,7 +57,7 @@ EvidenceFactorGen::EvidenceFactorGen(const PropertySet& p) : _params()
4957
_params.push_back(minor);
5058
_params.push_back(minor0);
5159
_params.push_back(major);
52-
60+
5361
_params.push_back(minor);
5462
_params.push_back(major0);
5563
_params.push_back(minor);
@@ -61,18 +69,18 @@ EvidenceFactorGen::EvidenceFactorGen(const PropertySet& p) : _params()
6169
_params.push_back(major);
6270
_params.push_back(minor0);
6371
_params.push_back(minor);
64-
72+
6573
_params.push_back(minor);
6674
_params.push_back(major0);
6775
_params.push_back(minor);
68-
76+
6977
_params.push_back(minor);
7078
_params.push_back(minor0);
7179
_params.push_back(major);
7280
}
7381
}
7482

75-
void EvidenceFactorGen::generateValues(const vector< string >& edge_types,
83+
void EvidenceFactorGen::generateValues(const vector< string >& edge_types,
7684
vector< Real >& outVals) const
7785
{
7886
assert(edge_types.size() == 1);
@@ -81,10 +89,10 @@ void EvidenceFactorGen::generateValues(const vector< string >& edge_types,
8189
}
8290
}
8391

84-
EvidenceSource::EvidenceSource(PropertySet &p, string base) :
92+
EvidenceSource::EvidenceSource(PropertySet &p, string base) :
8593
cutoffs(),
8694
options(p),
87-
attachPoint(),
95+
attachPoint(),
8896
_evidenceFile()
8997
{
9098
if (p.hasKey("disc"))
@@ -142,9 +150,9 @@ double stringToDouble(const string& s) {
142150
return result;
143151
}
144152

145-
void EvidenceSource::loadFromFile(PathwayTab& p,
146-
map<string, size_t>& sampleMap,
147-
vector<Evidence::Observation>& sampleData)
153+
void EvidenceSource::loadFromFile(PathwayTab& p,
154+
map<string, size_t>& sampleMap,
155+
vector<Evidence::Observation>& sampleData)
148156
{
149157
ifstream infile;
150158
infile.open( _evidenceFile.c_str() );
@@ -169,7 +177,7 @@ void EvidenceSource::loadFromFile(PathwayTab& p,
169177

170178
FactorGenerator* fgen = new EvidenceFactorGen(options);
171179
p.addFactorGenerator("protein", _suffix, fgen);
172-
180+
173181
while(getline(infile,line)) {
174182
vector<string> vals;
175183
Tokenize(line,vals,"\t");
@@ -179,7 +187,7 @@ void EvidenceSource::loadFromFile(PathwayTab& p,
179187
string sample = vals[0];
180188
_sampleNames.push_back(sample);
181189
vals.erase(vals.begin());
182-
190+
183191
for(size_t i = 0; i < vals.size(); i++) {
184192
if(p.getEntityType(header[i]) != "protein") // skip adding evidence if it's not in the pathway
185193
continue;
@@ -220,4 +228,3 @@ void Tokenize(const string& str,
220228
pos = str.find_first_of(delimiters, lastPos);
221229
}
222230
}
223-

evidencesource.h

+20-12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/********************************************************************************/
2+
/* Copyright 2009-2011 -- The Regents of the University of California */
3+
/* This code is provided for research purposes to scientists at non-profit */
4+
/* organizations. All other use is strictly prohibited. For further */
5+
/* details please contact University of California, Santa Cruz or */
6+
/* Five3 Genomics, LLC (http://five3genomics.com). */
7+
/********************************************************************************/
8+
19
#ifndef HEADER_EVIDENCESOURCE_H
210
#define HEADER_EVIDENCESOURCE_H
311

@@ -16,14 +24,14 @@ class EvidenceFactorGen : public FactorGenerator {
1624

1725
EvidenceFactorGen(const PropertySet& p);
1826
~EvidenceFactorGen() {}
19-
20-
void generateValues(const vector< string >& edge_types,
27+
28+
void generateValues(const vector< string >& edge_types,
2129
vector< Real >& outVals) const;
2230
};
2331

2432
typedef map<string, map<string,int> > SampleEvidMap;
2533

26-
class EvidenceSource
34+
class EvidenceSource
2735
{
2836
private:
2937
vector<double> cutoffs;
@@ -40,8 +48,8 @@ class EvidenceSource
4048

4149
public:
4250
/// Default constructor
43-
EvidenceSource() : cutoffs(),
44-
attachPoint(),
51+
EvidenceSource() : cutoffs(),
52+
attachPoint(),
4553
_suffix(),
4654
_evidenceFile(),
4755
_disc(),
@@ -53,16 +61,16 @@ class EvidenceSource
5361
setCutoffs("-1.3;1.3");
5462
}
5563
/// Copy constructor
56-
EvidenceSource(const EvidenceSource &x)
57-
: cutoffs(x.cutoffs),
58-
attachPoint(x.attachPoint),
64+
EvidenceSource(const EvidenceSource &x)
65+
: cutoffs(x.cutoffs),
66+
attachPoint(x.attachPoint),
5967
_suffix(x._suffix),
6068
_evidenceFile(x._evidenceFile),
6169
_disc(x._disc),
6270
_sampleNames(x._sampleNames),
6371
_sampleFactors(x._sampleFactors),
6472
_sampleFactorNum(x._sampleFactorNum) {}
65-
73+
6674
/// Assignment operator
6775
EvidenceSource& operator=(const EvidenceSource &x) {
6876
if (this != &x) {
@@ -83,10 +91,10 @@ class EvidenceSource
8391
EvidenceSource(PropertySet &p, string base);
8492

8593
void setCutoffs(string discLimits);
86-
int discCutoffs (float x);
94+
int discCutoffs (float x);
8795

88-
void loadFromFile(PathwayTab& p,
89-
map<string, size_t>& sampleMap,
96+
void loadFromFile(PathwayTab& p,
97+
map<string, size_t>& sampleMap,
9098
vector<Evidence::Observation>& sampleData);
9199

92100
const string& evidenceFile() {return _evidenceFile;}

externVars.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/********************************************************************************/
2+
/* Copyright 2009-2011 -- The Regents of the University of California */
3+
/* This code is provided for research purposes to scientists at non-profit */
4+
/* organizations. All other use is strictly prohibited. For further */
5+
/* details please contact University of California, Santa Cruz or */
6+
/* Five3 Genomics, LLC (http://five3genomics.com). */
7+
/********************************************************************************/
8+
19
#include "common.h"
210

311
// globals

0 commit comments

Comments
 (0)