View source: R/count_features_per_protein.R
count_features_per_protein | R Documentation |
For differential testing with https://www.bioconductor.org/packages/release/bioc/html/DEqMS.htmlDEqMS, one needs to identify the number of features, e.g PSMs or peptides per protein. This function returns the number of features per protein per sample.
count_features_per_protein(obj, master_prot_col = "Master.Protein.Accessions")
obj |
|
master_prot_col |
|
tibble
with feature counts per sample per protein.
# Use a small example TMT dataset included with the camprotR package
df <- psm_tmt_total
# Make an MSnSet
df_exprs <- as.matrix(df[, grep("Abundance", colnames(df))])
colnames(df_exprs) <- gsub("Abundance\\.", "", colnames(df_exprs))
df_fData <- df[, grep("Abundance", colnames(df), invert = TRUE)]
psm <- MSnbase::MSnSet(exprs = df_exprs, fData = df_fData)
# Count the number of PSMs per protein
count_features_per_protein(psm, master_prot_col = "Master.Protein.Accessions")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.