Entering edit mode
anupam sinha
▴
270
@anupam-sinha-3207
Last seen 10.2 years ago
Hi all,
I have downloaded the KGML files of for all the pathways of
some
organisms . I want to automate the process of constructing the
metabolic
networks of these organisms. In a directory by name ORG_XML_FILES I
have the
following directories and files
/aac(dir) /aae(dir) etc ......
1.xml 4.xml
2.xml 5.xml
3.xml 6.xml
I want to enter each subdirectory (for e.g. aac) read all the xml
files and
construct a metabolic network using KEGGgraph
I have written the following script:
setwd("/home/anupam/Research/Anupam_data/ORG_XML_FILES/")
list.files()->org_xml_dirs
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<-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"))
}
But it is giving the following error :
Error in UseMethod("xmlAttrs", node) :
no applicable method for "xmlAttrs"
here's my sessioninfo.
> sessionInfo()
R version 2.9.0 (2009-04-17)
x86_64-redhat-linux-gnu
locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US
.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_N
AME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTI
FICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] KEGGgraph_1.1.0 graph_1.22.2 XML_2.5-1 igraph_0.5.2-2
loaded via a namespace (and not attached):
[1] tools_2.9.0
Can anyone help me out with this ? thanks in advance.
Regards,
Anupam
[[alternative HTML version deleted]]