scale_abundance {tidybulk} | R Documentation |
scale_abundance() takes as imput a 'tbl' formatted as | <SAMPLE> | <TRANSCRIPT> | <COUNT> | <...> | and Scales transcript abundance compansating for sequencing depth (e.g., with TMM algorithm, Robinson and Oshlack doi.org/10.1186/gb-2010-11-3-r25).
scale_abundance( .data, .sample = NULL, .transcript = NULL, .abundance = NULL, factor_of_interest = NULL, minimum_counts = 10, minimum_proportion = 0.7, method = "TMM", reference_selection_function = median, action = "add" ) ## S4 method for signature 'spec_tbl_df' scale_abundance( .data, .sample = NULL, .transcript = NULL, .abundance = NULL, factor_of_interest = NULL, minimum_counts = 10, minimum_proportion = 0.7, method = "TMM", reference_selection_function = median, action = "add" ) ## S4 method for signature 'tbl_df' scale_abundance( .data, .sample = NULL, .transcript = NULL, .abundance = NULL, factor_of_interest = NULL, minimum_counts = 10, minimum_proportion = 0.7, method = "TMM", reference_selection_function = median, action = "add" ) ## S4 method for signature 'tidybulk' scale_abundance( .data, .sample = NULL, .transcript = NULL, .abundance = NULL, factor_of_interest = NULL, minimum_counts = 10, minimum_proportion = 0.7, method = "TMM", reference_selection_function = median, action = "add" ) ## S4 method for signature 'SummarizedExperiment' scale_abundance( .data, .sample = NULL, .transcript = NULL, .abundance = NULL, factor_of_interest = NULL, minimum_counts = 10, minimum_proportion = 0.7, method = "TMM", reference_selection_function = median, action = "add" ) ## S4 method for signature 'RangedSummarizedExperiment' scale_abundance( .data, .sample = NULL, .transcript = NULL, .abundance = NULL, factor_of_interest = NULL, minimum_counts = 10, minimum_proportion = 0.7, method = "TMM", reference_selection_function = median, action = "add" )
.data |
A 'tbl' formatted as | <SAMPLE> | <TRANSCRIPT> | <COUNT> | <...> | |
.sample |
The name of the sample column |
.transcript |
The name of the transcript/gene column |
.abundance |
The name of the transcript/gene abundance column |
factor_of_interest |
The name of the column of the factor of interest. This is used for identifying lowly abundant transcript, to be ignored for calculating scaling fators. |
minimum_counts |
A real positive number. It is the threshold of count per million that is used to filter transcripts/genes out from the scaling procedure. The scaling inference is then applied back to all unfiltered data. |
minimum_proportion |
A real positive number between 0 and 1. It is the threshold of proportion of samples for each transcripts/genes that have to be characterised by a cmp bigger than the threshold to be included for scaling procedure. |
method |
A character string. The scaling method passed to the backend function (i.e., edgeR::calcNormFactors; "TMM","TMMwsp","RLE","upperquartile") |
reference_selection_function |
A fucntion that is used to selecting the reference sample for scaling. It could be max (default), which choose the sample with maximum library size; or median, which chooses the sample with median library size. |
action |
A character string between "add" (default) and "only". "add" joins the new information to the input tbl (default), "only" return a non-redundant tbl with the just new information. |
Scales transcript abundance compansating for sequencing depth (e.g., with TMM algorithm, Robinson and Oshlack doi.org/10.1186/gb-2010-11-3-r25). Lowly transcribed transcripts/genes (defined with minimum_counts and minimum_proportion parameters) are filtered out from the scaling procedure. The scaling inference is then applied back to all unfiltered data.
A tbl object with additional columns with scaled data as '<NAME OF COUNT COLUMN>_scaled'
A tbl object with additional columns with scaled data as '<NAME OF COUNT COLUMN>_scaled'
A tbl object with additional columns with scaled data as '<NAME OF COUNT COLUMN>_scaled'
A tbl object with additional columns with scaled data as '<NAME OF COUNT COLUMN>_scaled'
A 'SummarizedExperiment' object
A 'SummarizedExperiment' object
scale_abundance(tidybulk::counts_mini, sample, transcript, `count`)