krashkov / steinernet Goto Github PK
View Code? Open in Web Editor NEWR Package: Steiner tree approach for graph analysis
Home Page: https://github.com/krashkov/SteinerNet
R Package: Steiner tree approach for graph analysis
Home Page: https://github.com/krashkov/SteinerNet
@krashkov @afshinsadeghi: This package does not terminate its checks when run with the release candidate for igraph 2.0.0.
Is this a problem in your package? Should we be doing things differently?
Install the 2.0.0 release candidate using pak::pak("igraph/rigraph")
.
We're planning to release igraph 2.0.0 on January 23. My sincere apologies for the short notice, I only realized today that I should have warned about the problem much earlier. Happy to postpone if it turns out that the problem is on our end. Thank you for your help!
Tracker: igraph/rigraph#989.
Hello!
I installed SteinerNet according to the documentation "https://www.rdocumentation.org/packages/SteinerNet/versions/2.0/topics/steinertree".
However, when I tried to run Example 1 in this link. I always got the error message "Error in V(g) : Not a graph object".
Could you please tell me how to solve this problem?
Thank you!
Hello all,
Can anyone tell me how to retain the name of vertices in steinertree package (R)? Below is the code I used. The final object SP (igraph object) is the one that is showing node names as 1,2,3..
library(igraph)
library(SteinerNet)
a <- read.table("interactions.txt", sep="\t", quote="")
head(a)
V1
1 ENSP00000222390
2 ENSP00000391826
3 ENSP00000222390
4 ENSP00000391669
5 ENSP00000222390
6 ENSP00000384675
el <- matrix(as.vector(a$V1), nc=2, byrow=T)
g1 =graph_from_edgelist(el, directed=F)
ter_list= c("ENSP00000306512","ENSP00000340019","ENSP00000361125","ENSP00000367207","ENSP00000384273","ENSP00000388107","ENSP00000400175","ENSP00000401303")
SP=steinertree(type ="SP",terminals = ter_list, graph = g1)
SP
[[1]]
IGRAPH 6a21ce1 UN-- 139 1600 --
+ attr: name (v/c), realname (v/c), color (v/c)
+ edges from 6a21ce1 (vertex names):
[1] 1 --2 1 --3 1 --4 1 --5 1 --6 1 --7 1 --8 1 --9 1 --10 1 --11
[11] 1 --12 1 --13 1 --14 1 --15 1 --16 1 --17 1 --18 1 --19 1 --20 1 --21
[21] 1 --22 1 --23 1 --24 1 --25 1 --26 1 --27 1 --28 1 --29 1 --30 1 --31
[31] 1 --32 1 --33 34--35 34--36 34--37 34--38 9 --34 34--39 20--34 34--40
[41] 25--34 27--34 34--41 34--42 34--43 34--44 35--45 45--46 45--47 45--48
[51] 38--45 45--49 39--45 40--45 45--50 30--51 3 --30 4 --30 30--52 30--53
[61] 30--54 5 --30 30--48 30--55 8 --30 30--56 9 --30 10--30 30--57 11--30
[71] 15--30 30--58 20--30 21--30 30--59 25--30 30--60 27--30 28--30 3 --61
+ ... omitted several edges
[[2]]
IGRAPH 886b59f UN-- 12 11 --
+ attr: name (v/c), realname (v/c), color (v/c)
+ edges from 886b59f (vertex names):
[1] 5 --8 5 --19 5 --21 5 --50 35--50 5 --51 21--53 5 --61 8 --69 53--73
[11] 5 --84
Please help me out. Thanks.
Hi,
I believe there is an issue with the merging of non-disjoint subtrees in the steinertree3 function in steinertree.R (lines 261 and following):
I encountered a case where there is no overlap between my trees with i=1 and j=2. So j is increased to 3. In this case there was an overlap between the i=1 and j=3 trees. When j reaches the end of the subtree list, i is increased. The problem is that the tree at i=1 is not the same anymore than the one that has been tested against j=2 (because it has been merged with other trees), so the new i=1 and j=2 trees may actually overlap. In my case, this lead to an empty list when calculating 'nsubtrees', which cased an error.
A solution may be to not increase i in a loop where something has been merged into the corresponding tree. My code is too complex to share here, but I hope the explanation makes sense.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.