LFQDataAggregator: Decorates LFQData with methods to aggregate protein...

LFQDataAggregatorR Documentation

Decorates LFQData with methods to aggregate protein intensities aggregates intensities

Description

Decorates LFQData with methods to aggregate protein intensities aggregates intensities

Decorates LFQData with methods to aggregate protein intensities aggregates intensities

Public fields

lfq

LFQData

lfq_agg

aggregation result

prefix

to use for aggregation results e.g. protein

Methods

Public methods


Method new()

initialize

Usage
LFQDataAggregator$new(lfq, prefix = "protein")
Arguments
lfq

LFQData

prefix

default protein


Method medpolish()

aggregate using median polish

Usage
LFQDataAggregator$medpolish()
Arguments
N

top N by intensity

Returns

LFQData


Method lmrob()

aggregate using robust regression

Usage
LFQDataAggregator$lmrob()
Arguments
N

top N by intensity

Returns

LFQData


Method mean_topN()

aggregate topN using mean

Usage
LFQDataAggregator$mean_topN(N = 3)
Arguments
N

top N by intensity

Returns

LFQData


Method sum_topN()

aggregate topN using sum

Usage
LFQDataAggregator$sum_topN(N = 3)
Arguments
N

top N by intensity

Returns

LFQData


Method plot()

creates aggregation plots

Usage
LFQDataAggregator$plot(subset = NULL, show.legend = FALSE)
Arguments
subset

create plots for a subset of the data only, e.g. proteins with more then 2 peptides.

show.legend

default FALSE

Returns

data.frame


Method write_plots()

writes plots to folder

Usage
LFQDataAggregator$write_plots(
  qcpath,
  subset = NULL,
  show.legend = FALSE,
  width = 6,
  height = 6
)
Arguments
qcpath

qcpath

subset

write plots only for some

show.legend

legend

width

figure width

height

figure height

Returns

file path


Method clone()

The objects of this class are cloneable with this method.

Usage
LFQDataAggregator$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other LFQData: LFQData, LFQDataPlotter, LFQDataStats, LFQDataSummariser, LFQDataToSummarizedExperiment(), LFQDataWriter

Examples

istar <-  prolfqua::sim_lfq_data_peptide_config()
istar$config <- istar$config
data <- istar$data |> dplyr::filter(protein_Id %in% sample(protein_Id, 100))
lfqdata <- LFQData$new(data, istar$config)

lfqTrans <- lfqdata$clone()$get_Transformer()
lfqTrans$log2()
lfqTrans <- lfqTrans$robscale()$lfq
lfqAggregator <- LFQDataAggregator$new(lfqTrans, "protein")

lfqAggregator$medpolish()
pmed <- lfqAggregator$plot()
pmed$plots[[1]]
lfqAggregator$lmrob()
prob <- lfqAggregator$plot()
prob$plots[[1]]

lfqCopy <- lfqdata$clone()
lfqCopy$is_transformed()
lfqAggregator <- LFQDataAggregator$new(lfqCopy, "protein")
lfqAggregator$sum_topN()
pSum <- lfqAggregator$plot()
pSum$plots[[1]]

lfqAggregator$mean_topN()
pMean <- lfqAggregator$plot()
pMean$plots[[1]]
protPlotter <- lfqAggregator$lfq_agg$get_Plotter()
protPlotter$heatmap()
## Not run: 
lfqAggregator$write_plots(tempdir())

## End(Not run)


wolski/prolfqua documentation built on Oct. 31, 2024, 9:22 a.m.