impute_missing_abundance-methods: impute transcript abundance if missing from sample-transcript...

Description Usage Arguments Details Value Examples

Description

impute_missing_abundance() takes as input a 'tbl' formatted as | <SAMPLE> | <TRANSCRIPT> | <COUNT> | <...> | and returns a 'tbl' with an edditional adjusted abundance column. This method uses scaled counts if present.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
impute_missing_abundance(
  .data,
  .formula,
  .sample = NULL,
  .transcript = NULL,
  .abundance = NULL
)

## S4 method for signature 'spec_tbl_df'
impute_missing_abundance(
  .data,
  .formula,
  .sample = NULL,
  .transcript = NULL,
  .abundance = NULL
)

## S4 method for signature 'tbl_df'
impute_missing_abundance(
  .data,
  .formula,
  .sample = NULL,
  .transcript = NULL,
  .abundance = NULL
)

## S4 method for signature 'tidybulk'
impute_missing_abundance(
  .data,
  .formula,
  .sample = NULL,
  .transcript = NULL,
  .abundance = NULL
)

## S4 method for signature 'SummarizedExperiment'
impute_missing_abundance(
  .data,
  .formula,
  .sample = NULL,
  .transcript = NULL,
  .abundance = NULL
)

## S4 method for signature 'RangedSummarizedExperiment'
impute_missing_abundance(
  .data,
  .formula,
  .sample = NULL,
  .transcript = NULL,
  .abundance = NULL
)

Arguments

.data

A 'tbl' formatted as | <SAMPLE> | <TRANSCRIPT> | <COUNT> | <...> |

.formula

A formula with no response variable, representing the desired linear model where the first covariate is the factor of interest and the second covariate is the unwanted variation (of the kind ~ factor_of_intrest + batch)

.sample

The name of the sample column

.transcript

The name of the transcript/gene column

.abundance

The name of the transcript/gene abundance column

Details

\lifecycle

maturing

This function imputes the abundance of missing sample-transcript pair using the median of the sample group defined by the formula

Value

A 'tbl' non-sparse abundance

A 'tbl' with imputed abundance

A 'tbl' with imputed abundance

A 'tbl' with imputed abundance

A 'SummarizedExperiment' object

A 'SummarizedExperiment' object

Examples

1
2
3
4
5
6
7
8
res =
	impute_missing_abundance(
		tidybulk::counts_mini,
	~ condition,
	.sample = sample,
	.transcript = transcript,
	.abundance = count
)

tidybulk documentation built on April 7, 2021, 6 p.m.