Skip to content
Prev 9793 / 21312 Next

[Bioc-devel] package review help

i would have comments on StarTrek.  if you would like me to be reviewer of
that i can do it.

a query on policy

how do you propose to handle needlessly repeated code?

the code given below is repeated many many times with slight variations for
selected KEGG_path.  i would ask the author
to implement DRY (don't repeat yourself), find a functional approach to the
repeated element, and
simplify.  i can imagine that damping enthusiasm of the contributor but I
think it is worth holding back
until such a thing is accomplished.  too meddlesome?

if (KEGG_path=="Carb_met") {
pathways.list <- keggList("pathway", "hsa")## returns the list of human
pathways
mer<-select_path_carb(Carbohydrate)
common<-intersect(pathways.list,mer)
lo<-list()
for (i in 1:length(pathways.list)){
if (length(intersect(pathways.list[[i]],common)!=0)){
lo[[i]]<-pathways.list[[i]]
names(lo)[[i]]<-names(pathways.list)[[i]]
}
}
pathways.list<-lo[lapply(lo,length)!=0]
pathway.codes <- sub("path:", "", names(pathways.list))
a<-do.call("rbind", pathways.list)
}

Another issue the author seems to raise is the need for "open cytoscape
session" for meaningful tests.
I think this will never happen on the build system.  So the author has to
emulate the cytoscape behavior
perhaps with some static objects that cytoscape might return on interaction.



On Fri, Sep 30, 2016 at 5:22 PM, Martin Morgan <
martin.morgan at roswellpark.org> wrote: