Question: Unable to map genes to KEGG pathway using pathview
1
gravatar for rice.researcher
17 months ago by
Korea, Republic Of
rice.researcher140 wrote:

I was trying to map a list of genes to Oryza sativa (rice) KEGG pathways using pathview R package. But failed to map genes. I followed this tutorial.

For example, the code below

library("pathview")
geneList<-read.table("genes.txt",header=T,sep="\t") 
pathway <- pathview(gene.data  = geneList,
                 pathway.id = "00195",
                 gene.idtype = "RAPDB",
                 species    = "Oryza sativa japonica"                     
                 )

with the input "genes.txt"

Os03t0659266-00
Os04t0473150-00

Should map input genes to a specific pathway. But showing error

Error in pathview(gene.data = geneList, pathway.id = "00195", gene.idtype = "RAPDB",  : 
 No proper gene annotation package available!

However, the online version shows mapping with the same input. So how can I solve this problem?

ADD COMMENTlink modified 17 months ago by bigmawen340 • written 17 months ago by rice.researcher140
2
gravatar for bigmawen
17 months ago by
bigmawen340
United States
bigmawen340 wrote:

Your gene IDs (eg Os03t0659266-00) are not Entrez or KEGG gene ID, hence can’t be mapped to KEGG osa pathways. That’s why you saw the warning and plain graph with no data. you can generate simulated osa data with entrez/kegg ID as below, and it will work. So you need to convert your gene IDs to entrez/kegg gene IDs manually.

gdata.osa=sim.mol.data(mol.type="gene", species ="osa", id.type="kegg", nmol=10000) pv.out=pathview(gene.data = gdata.osa, pathway.id = "00195", gene.idtype = "KEGG", species = "Oryza sativa japonica")

FYI, you can check the ID type supported by pathview for your target species (i.e. osa) using korg data in pathview like:

data(korg)
ri=korg[,"kegg.code"]=="osa"
korg[ri,]

            ktax.id                  tax.id               kegg.code
           "T01015"                 "39947"                   "osa"
    scientific.name             common.name           entrez.gnodes
    "Oryza sativa japonica"         "Japanese rice"            "1"
         kegg.geneid             ncbi.geneid          ncbi.proteinid
          "4349630"               "4349630"          "XP_015615283"
            uniprot
       "A0A0P0XY71"

So supported gene ID for osa include: kegg.geneid, ncbi.geneid (entrez), ncbi.proteinid, uniprot.
The simulated data with Entrez/KEGG IDs look like:

head(gdata.osa)

 4328398    4326389    4338593  107277186    4334918    4335759
-1.4462875  0.3158558 -0.3427475 -1.9313531  0.2428210 -0.3627679
ADD COMMENTlink written 17 months ago by bigmawen340
2
gravatar for zx8754
17 months ago by
zx87549.1k
London
zx87549.1k wrote:

There problem seems to be with gene.idtype = "RAPDB". The available gene.idtype.list can be checked:

data(gene.idtype.list); gene.idtype.list
# [1] "SYMBOL"       "GENENAME"     "ENSEMBL"      "ENSEMBLPROT"  "UNIGENE"     
# [6] "UNIPROT"      "ACCNUM"       "ENSEMBLTRANS" "REFSEQ"       "ENZYME"      
# [11] "TAIR"         "PROSITE"      "ORF"

Then from the manuals it is suggested to use KEGG, so below should work:

gene.idtype
character, ID type used for the gene.data, case insensitive. Default gene.idtype="entrez", i.e. Entrez Gene, which are the primary KEGG gene ID for many common model organisms. For other species, gene.idtype should be set to "KEGG" as KEGG use other types of gene IDs. For the common model organisms (to check the list, do: data(bods); bods), you may also specify other types of valid IDs. To check the ID list, do: data(gene.idtype.list); gene.idtype.list.

library("pathview")

geneList <- c("Os03t0659266-00", "Os04t0473150-00")
pathview(gene.data  = geneList,
         pathway.id = "00195",
         gene.idtype = "KEGG",
         species    = "Oryza sativa japonica")
ADD COMMENTlink written 17 months ago by zx87549.1k

Thanks for your help. I tried with gene.idtype = "KEGG". But it not mapping the genes and throws warnings like,

Warning: None of the genes or compounds mapped to the pathway!
Argument gene.idtype or cpd.idtype may be wrong.
Warning: No annotation package for the species osa, gene symbols not mapped!
Info: Working in directory /home/genome/KEGG
Info: Writing image file osa00195.pathview.png
ADD REPLYlink modified 17 months ago • written 17 months ago by rice.researcher140

Please paste the code you are using, so we can reproduce the problem.

ADD REPLYlink written 17 months ago by zx87549.1k

Sorry, I used exactly the same code which you have given.

library("pathview")
geneList <- c("Os03t0659266-00", "Os04t0473150-00")
pathview(gene.data  = geneList,
pathway.id = "00195",
gene.idtype = "KEGG",
species    = "Oryza sativa japonica")
ADD REPLYlink modified 17 months ago • written 17 months ago by rice.researcher140

I tried the code before posting the answer, and it worked for me. Or at least it did give an image output - osa00195.pathview.png, here are the warnings:

Info: Downloading xml files for osa00195, 1/1 pathways..
Info: Downloading png files for osa00195, 1/1 pathways..
Warning: None of the genes or compounds mapped to the pathway!
Argument gene.idtype or cpd.idtype may be wrong.
Warning: No annotation package for the species osa, gene symbols not mapped!
Info: Working in directory C:/Users/tdadaev/Documents
Info: Writing image file osa00195.pathview.png

My sessionInfo();

R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods  
[9] base     

other attached packages:
[1] pathview_1.16.7      org.Hs.eg.db_3.4.1   AnnotationDbi_1.38.2
[4] IRanges_2.10.5       S4Vectors_0.14.7     Biobase_2.36.2      
[7] BiocGenerics_0.22.1 

loaded via a namespace (and not attached):
 [1] graph_1.54.0      Rcpp_0.12.18      KEGGgraph_1.38.1  XVector_0.16.0   
 [5] zlibbioc_1.22.0   bit_1.1-14        R6_2.2.2          blob_1.1.1       
 [9] httr_1.3.1        tools_3.4.1       grid_3.4.1        png_0.1-7        
[13] DBI_1.0.0         yaml_2.2.0        bit64_0.9-7       digest_0.6.17    
[17] Rgraphviz_2.20.0  KEGGREST_1.16.1   memoise_1.1.0     RSQLite_2.1.1    
[21] compiler_3.4.1    Biostrings_2.44.2 XML_3.98-1.16     pkgconfig_2.0.2
ADD REPLYlink modified 17 months ago • written 17 months ago by zx87549.1k

Thanks,.! Yes, image for corresponding pathway is being generated. But none of the input genes are mapped to the generated pathway image. (To test purpose, I used two genes in the pathway 00195. So these two genes with highlighted red box in the pathway image is the expected result.)

ADD REPLYlink written 17 months ago by rice.researcher140

Hi, could you solve your issue ? I am facing the same problem

ADD REPLYlink written 12 months ago by pixie@bioinfo1.4k

Hi, I couldn't figure out the problem...But somehow it is possible to do

ADD REPLYlink written 12 months ago by anc.informatics0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1462 users visited in the last hour