knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
In proteomics, the typical approach is bottom-up proteomics, where proteins are digested into peptide by using proteases
Let say for example that you have obtain protein inference result (i.e. the protein that are considered by your protein inference algorithm to be in the sample that underwent mass spectrometry) based on peptide identified from raw mass spectra.
And then you are confused why a certain protein is inferred, instead of another one, and what peptide is conclusion based off of?
This is where this package can help, it can plot the protein and peptide relationship as a bipartite graph, and show you all of that.
First, we should, attach the package
require("devtools") devtools::install_github("kairenchen721/interpretproteinidentification") library(interpretproteinidentification)
you could either pass an OSW file in transition PQP format into readSQLiteFile, it returns a character vector specifying the edges of the Protein peptide graph.
dbPath <- system.file("extdata", "test_data.osw", package = "interpretproteinidentification") dbProteinPeptides <- interpretproteinidentification::readSQLiteFile(dbPath)
and then pass it to generateBipartiteGraph as its first input
graphForProteinInference <- interpretproteinidentification::generateBipartiteGraph(dbProteinPeptides, "")
or you could directly use such a character vector as the first input to generateBipartiteGraph
graphForProteinInference <- interpretproteinidentification::generateBipartiteGraph( interpretproteinidentification::allEdges, "")
note that the first file path should refer to the pre protein inference file, and the second one should refer to the post protein inference file. This function will not generate a plot
After the \code{generateBipartiteGraph} is ran, we can take it return and display a component of it
Lets say we want to display component 1
componentYouWantToDisplay <- interpretproteinidentification::displayComponent(graphForProteinInference, 1)
And it would show a plot like this, where all the node are (weakly) connected
If you only want to look at one protein (Or one peptide only), you can also display that only
You can do so by calling
interpretproteinidentification::selectProtein(componentYouWantToDisplay, "P02769")
And it would show a plot with the protein with the identifier that you inputted, along with its connected peptides, and it shows the gene ontology IDs on the top, additionally, if this protein is known to be involved in one or more disease, then it would show up on the bottom.
You can also select the peptide with the identifier that you inputted, along with its connected proteins but neither gene ontology IDs or disease involvement would show up, since peptides have neither.
interpretproteinidentification::selectProtein(componentYouWantToDisplay, "DDSPDLPK")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.