Skip to content

Commit 4879cc3

Browse files
author
amfy10
committed
v1.1.3 pathRanker critical bugfix
1 parent a0c1335 commit 4879cc3

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: NetPathMiner
2-
Version: 1.1.2
2+
Version: 1.1.3
33
Date: 2014 onwards
44
Title: NetPathMiner for Biological Network Construction, Path Mining
55
and Visualization

R/netWeight.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ fetchAttribute <- function(graph, organism="Homo sapiens", target.attr, source.a
296296
#' missing.method = -1)
297297
#' }
298298
#'
299-
assignEdgeWeights <- function(microarray, graph, use.attr, y, weight.method="compCor",
299+
assignEdgeWeights <- function(microarray, graph, use.attr, y, weight.method="cor",
300300
complex.method="max", missing.method="median", same.gene.penalty ="median",
301301
bootstrap = 100, verbose=TRUE)
302302
{

src/PathRanker.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ st_shortest_path(const Vertex s, const Vertex t, Graph& g){
172172

173173
pair<Graph,VertexPair> R_get_st_graph_from(SEXP nodes, SEXP edges,SEXP edge_weights);
174174

175-
SEXP store_path_R(deque<Vertex>& st_path, Graph& g, double p_score);
175+
SEXP store_path_R(deque<Vertex> st_path, Graph& g, double p_score);
176176

177177
SEXP pathranker(SEXP node_list, SEXP edge_list, SEXP edge_weights, SEXP rk,SEXP minpathsize)
178178
{
@@ -242,13 +242,14 @@ SEXP pathranker(SEXP node_list, SEXP edge_list, SEXP edge_weights, SEXP rk,SEXP
242242
break;
243243
}
244244

245+
/* disabled *****/
245246
// I want to make sure the path involves more than 1 gene
246247
// so the path distance must be greater than 2 times the s-> gene and gene->t
247248
// edges have the same weight.
248249
Edge e_temp = edge(p.sequence[0],p.sequence[1],g).first;
249-
double fw = get(edge_weight, g)[e_temp];
250+
//double fw = get(edge_weight, g)[e_temp];
250251

251-
if (p.sequence.size() > mps && p.score > 2*fw) {
252+
if (p.sequence.size() > mps) {
252253
new_path = store_path_R(p.sequence,g,p.score);
253254
SET_VECTOR_ELT(all_paths,rsize,new_path);
254255
rsize = rsize + 1;
@@ -362,7 +363,7 @@ pair<Graph,VertexPair> R_get_st_graph_from(SEXP nodes, SEXP edges,SEXP edge_weig
362363
return ret;
363364
}
364365

365-
SEXP store_path_R(deque<Vertex>& st_path, Graph& g, double p_score) {
366+
SEXP store_path_R(deque<Vertex> st_path, Graph& g, double p_score) {
366367
SEXP new_path,dimnames;
367368
SEXP genes,compounds,weights,distance;
368369

src/pathScope.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ extern "C" SEXP scope(SEXP node_list,
693693
for (it=reachedTargets.begin();it < reachedTargets.end();it++) {
694694
if (last_compound.compare(*it) == 0) {
695695
alreadyreached = 1;
696-
if (echo == 1) Rprintf(" - Already found a path to %s", last_compound.c_str());
696+
if (echo == 1) Rprintf(" - Already found a path to %s\n", last_compound.c_str());
697697
}
698698
}
699699
if (alreadyreached == 0) {
@@ -702,9 +702,9 @@ extern "C" SEXP scope(SEXP node_list,
702702
if (newpath != R_NilValue) {
703703
SET_VECTOR_ELT(allpaths,vectid,newpath);
704704
reachedTargets.push_back(last_compound);
705-
if (echo == 1) Rprintf(" - Found a path to %s", last_compound.c_str());;
705+
if (echo == 1) Rprintf(" - Found a path to %s\n", last_compound.c_str());;
706706
} else {
707-
if (echo == 1) Rprintf(" - Node out of scope");
707+
if (echo == 1) Rprintf(" - Node out of scope\n");
708708
}
709709
}
710710
}

vignettes/NPMVignette.Rnw

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ binaries suitable for your system from ``Download libSBML'' link. You can follow
109109
on the website.
110110

111111
\subsubsection{Prerequisites for Windows users}
112-
#### Prerequisites for Windows users
113112
If you are installing the package through Bioconductor, you don't have to install external libraries. However, currently the Bioconductor version for Windows doesn't support SBML processing. Alternatively, we have prepared all dependencies in a tar file, downloadable from \url{https://github.com/ahmohamed/NPM_dependencies} . Please download the file and place in in the home directory of R
114113
(type "R RHOME" in command prompt to locate it).
115114

0 commit comments

Comments
 (0)