supplying proteins to STRINGdb package results in an error
0
0
Entering edit mode
4.0 years ago
peter.berry5 ▴ 60

When I try to map a set of proteins using the map function in the STRINGdb package I get the following error

Error in `[.data.frame`(dfToMap, , strColsFrom[i]) : undefined columns selected

My code is as follows

 ```{r}
    BiocManager::install("STRINGdb")
    library("STRINGdb")

#remove all previous files
rm(list=ls())

#read in proteins to be mapped
Attached_DE_Proteins <- read.csv("C:/PETER PROJECT/3d. Mass Spec Processing/Results of R Analysis/DE Gene Lists/Effect of Serum/WCL Analysis/0% Attached v 5% Attached/DE Cutoff equal 1.5/DE 1-5 Attached Cells DE Gene IDs WCL Apr19 Serum Removal.csv")

#call the string database. 
#note if you supply a local input directory the DB will be cached here allowing offline use.
#species = 9606 for human
#species = 10029 for CHO
string_db <- STRINGdb$new( version="11", species=9606, score_threshold=400, input_directory="")

#map my DE proteins to the String DB
Proteins <- data.frame(Attached_DE_Proteins$HGNC_Symbol)
mapped_proteins <- string_db$map(Proteins, "gene", removeUnmappedRows = TRUE)
dput(str(Proteins))
'data.frame':   1541 obs. of  1 variable:
 $ Attached_DE_Proteins$HGNC_Symbol: chr  "ENO1 " "ANXA1 " "TALDO1 " "LTA4H " ...
NULL

Would I be correct in thinking that the term "gene" in the map command should be the name of the column containing the info I want to map?

Thanks

STRINGdb • 1.1k views
ADD COMMENT

Login before adding your answer.

Traffic: 1563 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