Entering edit mode
cristinapasi
•
0
@cristinapasi-14734
Last seen 6.8 years ago
Hello,
I have tried to use the get_link function for an application I am developing in Shiny, however the link redirects to a page where of the list of proteins that I have passed as STRING_id, it only recognises the first one as the following ones are all preceded by "0D". I believe it must be some issue on how the link is created and how the list of STRING_ids are then separated when the string-db.org webpage opens.
I hope you can help me with this,
Best regards,
Cristina
Dear Cristina,
can you paste the call you are making? (including the input)
Best, Damian.
Hi Damian!
Thanks for your reply! If I use the internal example to the STRINGdb package everything works however this is the dataset of differentially expressed proteins I have:
> tomap
p-value LogFC protein
1 0.0000 3.3334 YBR117C
2 0.0003 -0.5578 YBR249C
3 0.0026 0.5085 YCL040W
4 0.0043 -0.4235 YGL148W
5 0.0000 2.0330 YGR043C
6 0.0000 1.1019 YGR248W
7 0.0000 0.9537 YMR105C
8 0.0000 2.4107 YMR169C
And this is the code I am using:
> string_db <- STRINGdb$new( version="10", species=4932, score_threshold=0, input_directory="" )
> example1_mapped <- string_db$map(tomap, "protein", removeUnmappedRows = TRUE )
> hits <- example1_mapped$STRING_id[1:10]
> link1 <- string_db$get_link(hits)
And this is the link I get: http://version10.string-db.org/10/p/8078305016
It should stay valid for a while so you can see what I mean.
Thanks for your help!!
Cristina
Hi Cristina,
The attached simple example of parsing a list of names to the get_link function seems to work. From the example you have provided it seems that you are slicing the example1_mapped vector with indices ([1:10]) which are larger than the vector length (8). This results in "NA" being appended to the vector (hence the error in the link you have attached).
I get: http://version10.string-db.org/10/p/8219305039 which is correct.
Best,
Damian.
You are right, thank you very much!