On 1/10/10 5:46 AM, anupam sinha wrote:
Hi Uwe,
              Thanks for your suggestion . Here's my code. I am confused as
to how to initialize an empty list . Here I have used pairlist()


  *list.files()->org_xml_dirs

## the following is much preferred:

org_xml_dirs <- list.files()

  for (i in org_xml_dirs)
{
  setwd(file.path("/home/anupam/Research/Anupam_data/ORG_XML_FILES/",i))
  org_xml<-list.files()
  for(j in org_xml)
  {
  graph_list<-pairlist()

graph_list <- list() ## in general, avoid pairlist

  graph<-parseKGML2Graph(j,genesOnly=TRUE)
  graph_list<-c(graph_list,list(graph))
  }
  org_met_net<-mergeKEGGgraphs(graph_list)
  met_org<-igraph.from.graphNEL(org_met_net,name=TRUE)
  
write.graph(met_org,"/home/anupam/Research/Anupam_data/ORG_XML_FILES/i.metnet",format=c("NCOL"))
  }
*
This is giving an error:

Error in UseMethod("xmlAttrs", node) :
   no applicable method for "xmlAttrs"

I apologise for asking a Bioconductor list related question on this list.
Can you figure out the problem ? Thanks in advance.

Without output of sessionInfo() it is hard to diagnose further, but this looks like a bug that has been resolved in latest version of the XML package. Please make sure you are using the latest R release and latest Bioconductor and CRAN packages.

+ seth

--
Seth Falcon
Bioconductor Core Team | FHCRC

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to