Download the Protein-Protein Interaction (PPI) information of a STRINGdb object
getPPI(genes, string_db, anno_df)
a list
, A list
of genes to download the respective protein-
protein interaction information
A STRINGdb object, the species of the object should match
the species of genes
.
An annotation data.frame
mapping STRINGdb ids to gene
names, e.g. downloaded with GeDi::getAnnotation()
A data.frame
of Protein-Protein interactions
## Mock example showing how the data should look like
genes <- c(c("CFTR", "RALA"), c("CACNG3", "ITGA3"), c("DVL2"))
string_db <- getStringDB(9606, cache_location = FALSE)
# string_db
anno_df <- getAnnotation(string_db)
#> Warning: URL 'https://stringdb-downloads.org/download/protein.aliases.v11.5/9606.protein.aliases.v11.5.txt.gz': status was 'SSL peer certificate or SSH remote key was not OK'
#> Error in download.file(urlStr, temp): cannot open URL 'https://stringdb-downloads.org/download/protein.aliases.v11.5/9606.protein.aliases.v11.5.txt.gz'
ppi <- getPPI(genes, string_db, anno_df)
#> Error in eval(expr, envir, enclos): object 'anno_df' not found
## Example using the data available in the package
if (FALSE) {
data(macrophage_topGO_example_small,
package = "GeDi",
envir = environment())
string_db <- getStringDB(9606)
string_db
anno_df <- getAnnotation(string_db)
genes <- GeDi::getGenes(macrophage_topGO_example_small)
ppi <- getPPI(genes, string_db, anno_df)
}