Protein workflow (original) (raw)
library(ComPrAn)
inputFile <- system.file("extData", "dataNormProts.txt", package = "ComPrAn")
forAnalysis <- protImportForAnalysis(inputFile)
Visualization of normalised protein data
Have a look at a selected protein (line plot)
protein <- "P52815"
max_frac <- 23
# example protein plot, quantitative comparison between labeled and unlabeled
# samples (default settings)
proteinPlot(forAnalysis[forAnalysis$scenario == "B",], protein, max_frac)
Make a heatmap for a selected group of proteins
groupDataFileName <- system.file("extData","exampleGroup.txt",package="ComPrAn")
groupName <- 'group1'
groupData <- data.table::fread(groupDataFileName)
# example heatmap, quantitative comparison between labeled and unlabeled samples
# (default settings)
groupHeatMap(dataFrame = forAnalysis[forAnalysis$scenario == "B",],
groupData, groupName)
#> Joining with `by = join_by(`Protein Group Accessions`)`
Co-migration plot of single protein group between label states
groupDataVector <- c("Q16540","P52815","P09001","Q13405","Q9H2W6")
groupName <- 'group1'
max_frac <- 23
# example co-migration plot, non-quantitative comparison of migration profile
# of a sigle protein goup between labeled and unlabeled samples
# (default settings)
oneGroupTwoLabelsCoMigration(forAnalysis, max_frac = max_frac,
groupDataVector,groupName)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's linetype values.
Co-migration plot of two protein groups within label state
group1DataVector <- c("Q16540","P52815","P09001","Q13405","Q9H2W6")
group1Name <- 'group1'
group2DataVector <- c("Q9NVS2","Q9NWU5","Q9NX20","Q9NYK5","Q9NZE8")
group2Name <- 'group2'
max_frac <- 23
# example co-migration plot, non-quantitative comparison of migration profile
# of two protein goups within label states (default settings)
twoGroupsWithinLabelCoMigration(dataFrame = forAnalysis, max_frac = max_frac,
group1Data = group1DataVector,
group1Name = group1Name,
group2Data = group2DataVector,
group2Name = group2Name)
#> Joining with `by = join_by(`Protein Group Accessions`)`
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's linetype values.
Cluster analysis
Create components neccessary for clustering: (distance matrix for labeled and unlabeled samples, protein table for both samples)
clusteringDF <- clusterComp(forAnalysis,scenar = "A", PearsCor = "centered")
Assign clusters to data frames
labTab_clust <- assignClusters(.listDf = clusteringDF,sample = "labeled",
method = 'average', cutoff = 0.85)
unlabTab_clust <- assignClusters(.listDf = clusteringDF,sample = "unlabeled",
method = 'average', cutoff = 0.85)
Make bar plots summarizing numbers of proteins per cluster for labeled and unlabeled samples
makeBarPlotClusterSummary(labTab_clust, name = 'labeled')
makeBarPlotClusterSummary(unlabTab_clust, name = 'unlabeled')
Create table containing proteins and their assigned clusters
tableForClusterExport <- exportClusterAssignments(labTab_clust,unlabTab_clust)