Question about package "RpsiXML", URL as input for parsePsimi25Interaction()
1
0
Entering edit mode
Qian Liu ▴ 110
@qian-liu-4216
Last seen 10.2 years ago
Hi there, I need some help with the RpsiXML. Question1:I have about 200 genes on the list, is it possible to pull out protein-protein interaction in one step or into one XML file? Question2: I use FOR Loop to pull out the protein-protein interaction data for each gene. I have list of genes. The 3rd gene "DRD1" dosen't have output from IntAct. the function parsePsimi25Interaction will show the following error message R code: genelist=c("HTR7","FRG1","DRD1","BRCA2") n=length(genelist) for (k in 1:n){ url254L=paste(" http://www.ebi.ac.uk/intact/export?query=q%3Dspecies%253Ahuman%2BAND%2 B",genelist[k ], "%26sort%3Drigid%2Basc%26rows%3D30%26start%3D0%26facet%3Dtrue%26facet. missing%3Dtrue%26facet.field%3Dexpansion%26facet.field%3DinteractorTyp e_id&format=xml_2_54&conversationContext=1",sep='') intactSample=parsePsimi25Interaction(url254L,INTACT.PSIMI25,verbose=FA LSE) ........ } The first two genes works fine, but 3rd one show the following error message,and program stopped. I try to add if statement like is.na, NULL, exists, but none of them can test whether the URL leads to real output. So what statement should I use so that the program can move on? Thank you, Qian 1 Entries found Parsing entry 1 Parsing experiments: .. Parsing interactors: 25% ==========> 50% ====================> 75% ==============================> 100% ========================================> Parsing interactions: .. 1 Entries found Parsing entry 1 Parsing experiments: ... Parsing interactors: 17% =======> 33% =============> 50% ====================> 67% ===========================> 83% =================================> 100% ========================================> Parsing interactions: ... EntityRef: expecting ';' EntityRef: expecting ';' EntityRef: expecting ';' EntityRef: expecting ';' EntityRef: expecting ';' EntityRef: expecting ';' EntityRef: expecting ';' Error: 1: EntityRef: expecting ';' 2: EntityRef: expecting ';' 3: EntityRef: expecting ';' 4: EntityRef: expecting ';' 5: EntityRef: expecting ';' 6: EntityRef: expecting ';' 7: EntityRef: expecting ';' [[alternative HTML version deleted]]
RpsiXML RpsiXML • 1.4k views
ADD COMMENT
0
Entering edit mode
Dan Tenenbaum ★ 8.2k
@dan-tenenbaum-4256
Last seen 4 months ago
United States
On Tue, Dec 28, 2010 at 9:35 AM, Qian Liu <littleduck24@gmail.com> wrote: > Hi there, > I need some help with the RpsiXML. > > Question1:I have about 200 genes on the list, is it possible to pull out > protein-protein interaction in one step or into one XML file? > > Question2: I use FOR Loop to pull out the protein-protein interaction data > for each gene. > I have list of genes. The 3rd gene "DRD1" dosen't have output from IntAct. > the function parsePsimi25Interaction will show the following error message > > R code: > genelist=c("HTR7","FRG1","DRD1","BRCA2") > n=length(genelist) > for (k in 1:n){ > url254L=paste(" > http://www.ebi.ac.uk/intact/export?query=q%3Dspecies%253Ahuman%2BAND %2B > ",genelist[k > ], > > "%26sort%3Drigid%2Basc%26rows%3D30%26start%3D0%26facet%3Dtrue%26face t.missing%3Dtrue%26facet.field%3Dexpansion%26facet.field%3DinteractorT ype_id&format=xml_2_54&conversationContext=1",sep='') > intactSample=parsePsimi25Interaction(url254L,INTACT.PSIMI25,verbose= FALSE) > ........ > } > > The first two genes works fine, but 3rd one show the following error > message,and program stopped. > I try to add if statement like is.na, NULL, exists, but none of them can > test whether the URL leads to real output. > So what statement should I use so that the program can move on? > > ?try for (k in 1:n) { url254L=paste(" http://www.ebi.ac.uk/intact/export?query=q%3Dspecies%253Ahuman%2BAND%2 B ",genelist[k], "%26sort%3Drigid%2Basc%26rows%3D30%26start%3D0%26facet%3Dtrue%26facet. missing%3Dtrue%26facet.field%3Dexpansion%26facet.field%3DinteractorTyp e_id&format=xml_2_54&conversationContext=1",sep='') intactSample = try(parsePsimi25Interaction(url254L,INTACT.PSIMI25,verbose=FALSE), silent=TRUE) print (class(intactSample)) if (class(intactSample) == "try-error") { print("oops, an error") } else { print ("we can continue....") } } > Thank you, > Qian > > > > 1 Entries found > Parsing entry 1 > Parsing experiments: .. > Parsing interactors: > 25% ==========> > 50% ====================> > 75% ==============================> > 100% ========================================> > Parsing interactions: > .. > 1 Entries found > Parsing entry 1 > Parsing experiments: ... > Parsing interactors: > 17% =======> > 33% =============> > 50% ====================> > 67% ===========================> > 83% =================================> > 100% ========================================> > Parsing interactions: > ... > EntityRef: expecting ';' > EntityRef: expecting ';' > EntityRef: expecting ';' > EntityRef: expecting ';' > EntityRef: expecting ';' > EntityRef: expecting ';' > EntityRef: expecting ';' > Error: 1: EntityRef: expecting ';' > 2: EntityRef: expecting ';' > 3: EntityRef: expecting ';' > 4: EntityRef: expecting ';' > 5: EntityRef: expecting ';' > 6: EntityRef: expecting ';' > 7: EntityRef: expecting ';' > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Thanks for the tips of Dan! For the first question, you have to pull down the files of PPI data from different servers. For the second question, it seems to be a problem of parsing. I will check the file and try to fix the problem if possible. Thanks for reporting the issue, Jitao David Zhang 2010/12/28 Dan Tenenbaum <dtenenba@fhcrc.org> > On Tue, Dec 28, 2010 at 9:35 AM, Qian Liu <littleduck24@gmail.com> wrote: > > > Hi there, > > I need some help with the RpsiXML. > > > > Question1:I have about 200 genes on the list, is it possible to pull out > > protein-protein interaction in one step or into one XML file? > > > > Question2: I use FOR Loop to pull out the protein-protein interaction > data > > for each gene. > > I have list of genes. The 3rd gene "DRD1" dosen't have output from > IntAct. > > the function parsePsimi25Interaction will show the following error > message > > > > R code: > > genelist=c("HTR7","FRG1","DRD1","BRCA2") > > n=length(genelist) > > for (k in 1:n){ > > url254L=paste(" > > http://www.ebi.ac.uk/intact/export?query=q%3Dspecies%253Ahuman%2BA ND%2B > > ",genelist[k > > ], > > > > > "%26sort%3Drigid%2Basc%26rows%3D30%26start%3D0%26facet%3Dtrue%26face t.missing%3Dtrue%26facet.field%3Dexpansion%26facet.field%3DinteractorT ype_id&format=xml_2_54&conversationContext=1",sep='') > > > intactSample=parsePsimi25Interaction(url254L,INTACT.PSIMI25,verbose= FALSE) > > ........ > > } > > > > The first two genes works fine, but 3rd one show the following error > > message,and program stopped. > > I try to add if statement like is.na, NULL, exists, but none of them > can > > test whether the URL leads to real output. > > So what statement should I use so that the program can move on? > > > > > > ?try > > for (k in 1:n) { > url254L=paste(" > http://www.ebi.ac.uk/intact/export?query=q%3Dspecies%253Ahuman%2BAND %2B > ",genelist[k], > > "%26sort%3Drigid%2Basc%26rows%3D30%26start%3D0%26facet%3Dtrue%26face t.missing%3Dtrue%26facet.field%3Dexpansion%26facet.field%3DinteractorT ype_id&format=xml_2_54&conversationContext=1",sep='') > > intactSample = > try(parsePsimi25Interaction(url254L,INTACT.PSIMI25,verbose=FALSE), > silent=TRUE) > print (class(intactSample)) > if (class(intactSample) == "try-error") { > print("oops, an error") > } else { > print ("we can continue....") > } > } > > > > > > Thank you, > > Qian > > > > > > > > 1 Entries found > > Parsing entry 1 > > Parsing experiments: .. > > Parsing interactors: > > 25% ==========> > > 50% ====================> > > 75% ==============================> > > 100% ========================================> > > Parsing interactions: > > .. > > 1 Entries found > > Parsing entry 1 > > Parsing experiments: ... > > Parsing interactors: > > 17% =======> > > 33% =============> > > 50% ====================> > > 67% ===========================> > > 83% =================================> > > 100% ========================================> > > Parsing interactions: > > ... > > EntityRef: expecting ';' > > EntityRef: expecting ';' > > EntityRef: expecting ';' > > EntityRef: expecting ';' > > EntityRef: expecting ';' > > EntityRef: expecting ';' > > EntityRef: expecting ';' > > Error: 1: EntityRef: expecting ';' > > 2: EntityRef: expecting ';' > > 3: EntityRef: expecting ';' > > 4: EntityRef: expecting ';' > > 5: EntityRef: expecting ';' > > 6: EntityRef: expecting ';' > > 7: EntityRef: expecting ';' > > > > [[alternative HTML version deleted]] > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor@r-project.org > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: > > http://news.gmane.org/gmane.science.biology.informatics.conductor > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Jitao David Zhang Pre-doc staff of Computational Biology and Biostatistics Division of Molecular Genome Analysis DKFZ, Heidelberg D-69120, Germany http://www.NextBioMotif.com/ [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
I don't think that it is a question of parsing perse. Here is what I would do: Obtain the XML file(s) you would like; that is the XML files pertaining your organism of interest. Parse the entire file and get the all the interactions contained in those files. RpsiXML should build you a graph (or graphs if you have more than one single data set). Now you can obtain node induced subgraph(s) based on your genes of interest. You can either merge the graphs or study them individually if you have more than one graph. There is a bit of coding that you will need to do because you will want a graph of your 200 genes plus all the genes to which each gene is adjacent. That should not be too hard to do. I think that you will get an error if you try to obtain a subgraph you supply a node that is not in the original graph. For this problem simple take the intersection of your gene list and nodes(g) where g is the name of your graph. Now find the node induced subgraph on this list making sure you get all adjacent nodes as well. HTH, --tony On Wed, Dec 29, 2010 at 3:48 AM, Jitao David Zhang <davidvonpku@gmail.com>wrote: > Thanks for the tips of Dan! > > For the first question, you have to pull down the files of PPI data from > different servers. > > For the second question, it seems to be a problem of parsing. I will check > the file and try to fix the problem if possible. > > Thanks for reporting the issue, > > Jitao David Zhang > > 2010/12/28 Dan Tenenbaum <dtenenba@fhcrc.org> > > > On Tue, Dec 28, 2010 at 9:35 AM, Qian Liu <littleduck24@gmail.com> > wrote: > > > > > Hi there, > > > I need some help with the RpsiXML. > > > > > > Question1:I have about 200 genes on the list, is it possible to pull > out > > > protein-protein interaction in one step or into one XML file? > > > > > > Question2: I use FOR Loop to pull out the protein-protein interaction > > data > > > for each gene. > > > I have list of genes. The 3rd gene "DRD1" dosen't have output from > > IntAct. > > > the function parsePsimi25Interaction will show the following error > > message > > > > > > R code: > > > genelist=c("HTR7","FRG1","DRD1","BRCA2") > > > n=length(genelist) > > > for (k in 1:n){ > > > url254L=paste(" > > > > http://www.ebi.ac.uk/intact/export?query=q%3Dspecies%253Ahuman%2BAND %2B > > > ",genelist[k > > > ], > > > > > > > > > "%26sort%3Drigid%2Basc%26rows%3D30%26start%3D0%26facet%3Dtrue%26face t.missing%3Dtrue%26facet.field%3Dexpansion%26facet.field%3DinteractorT ype_id&format=xml_2_54&conversationContext=1",sep='') > > > > > > intactSample=parsePsimi25Interaction(url254L,INTACT.PSIMI25,verbose= FALSE) > > > ........ > > > } > > > > > > The first two genes works fine, but 3rd one show the following error > > > message,and program stopped. > > > I try to add if statement like is.na, NULL, exists, but none of them > > can > > > test whether the URL leads to real output. > > > So what statement should I use so that the program can move on? > > > > > > > > > > ?try > > > > for (k in 1:n) { > > url254L=paste(" > > http://www.ebi.ac.uk/intact/export?query=q%3Dspecies%253Ahuman%2BA ND%2B > > ",genelist[k], > > > > > "%26sort%3Drigid%2Basc%26rows%3D30%26start%3D0%26facet%3Dtrue%26face t.missing%3Dtrue%26facet.field%3Dexpansion%26facet.field%3DinteractorT ype_id&format=xml_2_54&conversationContext=1",sep='') > > > > intactSample = > > try(parsePsimi25Interaction(url254L,INTACT.PSIMI25,verbose=FALSE), > > silent=TRUE) > > print (class(intactSample)) > > if (class(intactSample) == "try-error") { > > print("oops, an error") > > } else { > > print ("we can continue....") > > } > > } > > > > > > > > > > > Thank you, > > > Qian > > > > > > > > > > > > 1 Entries found > > > Parsing entry 1 > > > Parsing experiments: .. > > > Parsing interactors: > > > 25% ==========> > > > 50% ====================> > > > 75% ==============================> > > > 100% ========================================> > > > Parsing interactions: > > > .. > > > 1 Entries found > > > Parsing entry 1 > > > Parsing experiments: ... > > > Parsing interactors: > > > 17% =======> > > > 33% =============> > > > 50% ====================> > > > 67% ===========================> > > > 83% =================================> > > > 100% ========================================> > > > Parsing interactions: > > > ... > > > EntityRef: expecting ';' > > > EntityRef: expecting ';' > > > EntityRef: expecting ';' > > > EntityRef: expecting ';' > > > EntityRef: expecting ';' > > > EntityRef: expecting ';' > > > EntityRef: expecting ';' > > > Error: 1: EntityRef: expecting ';' > > > 2: EntityRef: expecting ';' > > > 3: EntityRef: expecting ';' > > > 4: EntityRef: expecting ';' > > > 5: EntityRef: expecting ';' > > > 6: EntityRef: expecting ';' > > > 7: EntityRef: expecting ';' > > > > > > [[alternative HTML version deleted]] > > > > > > _______________________________________________ > > > Bioconductor mailing list > > > Bioconductor@r-project.org > > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > > Search the archives: > > > http://news.gmane.org/gmane.science.biology.informatics.conductor > > > > > > > [[alternative HTML version deleted]] > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor@r-project.org > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: > > http://news.gmane.org/gmane.science.biology.informatics.conductor > > > > > > -- > Jitao David Zhang > Pre-doc staff of Computational Biology and Biostatistics > Division of Molecular Genome Analysis > DKFZ, Heidelberg D-69120, Germany > > http://www.NextBioMotif.com/ > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

Traffic: 858 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6