Untitled
library(STRINGdb) # Initialize STRING database, it is for human 9606, threshold is for up to 200 proteins string_db <- STRINGdb$new(species = 9606, score_threshold = 200) # Map your proteins, use a dataframe called upregulated and choose accession ID in it mapped_proteins <- string_db$map(data.frame(accession = upregulated$Accession), "accession", removeUnmappedRows = TRUE) # Get protein network string_db$plot_network(mapped_proteins$STRING_id) # Optional: Save network as PNG string_db$get_png(mapped_proteins$STRING_id, file="protein_network.png")
Leave a Comment