Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions R/dataProcessPlots.R
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,11 @@ dataProcessPlots = function(
list(PROTEIN = unique(Protein), PEPTIDE = "Run summary",
TRANSITION = "Run summary", FEATURE = "Run summary",
LABEL = "Endogenous", RUN = RUN,
ABUNDANCE = LogIntensities, FRACTION = 1)
]
ABUNDANCE = LogIntensities, FRACTION = 1,
UPPERBOUND = if("Variance" %in% names(.SD)) LogIntensities + 1.96 * sqrt(Variance) else NA_real_, # 95% confidence interval
LOWERBOUND = if("Variance" %in% names(.SD)) LogIntensities - 1.96 * sqrt(Variance) else NA_real_
)
]
if (is_censored) {
quant$censored = FALSE
}
Expand Down
10 changes: 9 additions & 1 deletion R/utils_dataprocess_plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@
aes(x = .data$RUN, y = .data$newABUNDANCE,
color = .data$analysis, size = .data$analysis,
shape = .data$censored)) +
geom_errorbar(data = input[input$PEPTIDE == "Run summary"],
aes(x = .data$RUN,
ymin = .data$LOWERBOUND,
ymax = .data$UPPERBOUND,
color = .data$analysis),
width = 0.3,
linewidth = 0.5,
linetype = "solid") +
scale_shape_manual(values = c(16, 1),
labels = c("Detected data",
"Censored missing data"))
Expand Down Expand Up @@ -288,4 +296,4 @@
theme_msstats("CONDITIONPLOT", x.axis.size, y.axis.size,
text_angle = text.angle)
plot
}
}
6 changes: 6 additions & 0 deletions vignettes/MSstatsPlus.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ will be included called `Variance` indicating the variance of the underlying
protein abundance estimate. This variance is used in the next step of the
workflow.

Meanwhile, one can generate a profile plot to visualize the variance of the underlying protein abundance estimates in the form of 95% confidence intervals. For example, with Q9UFW8, one may observe that confidence intervals are wider for runs with more imputed values.

```{r}
dataProcessPlots(summarized, "ProfilePlot", which.Protein = "Q9UFW8", address = FALSE)
```

## Differential analysis

The final step of the `MSstats+` workflow is to perform differential analysis.
Expand Down
Loading