R/methods.R
, R/methods_SE.R
tidybulk-methods.Rd
tidybulk() creates an annotated `tidybulk` tibble from a `tbl` (with at least three columns for sample, feature and transcript abundance) or `SummarizedExperiment` (more convenient if abstracted to tibble with library(tidySummarizedExperiment))
tidybulk(.data, .sample, .transcript, .abundance, .abundance_scaled = NULL)
# S4 method for class 'spec_tbl_df'
tidybulk(.data, .sample, .transcript, .abundance, .abundance_scaled = NULL)
# S4 method for class 'tbl_df'
tidybulk(.data, .sample, .transcript, .abundance, .abundance_scaled = NULL)
# S4 method for class 'SummarizedExperiment'
tidybulk(.data, .sample, .transcript, .abundance, .abundance_scaled = NULL)
# S4 method for class 'RangedSummarizedExperiment'
tidybulk(.data, .sample, .transcript, .abundance, .abundance_scaled = NULL)
A `tbl` (with at least three columns for sample, feature and transcript abundance) or `SummarizedExperiment` (more convenient if abstracted to tibble with library(tidySummarizedExperiment))
The name of the sample column
The name of the transcript/gene column
The name of the transcript/gene abundance column
The name of the transcript/gene scaled abundance column
A `tidybulk` object
A `tidybulk` object
A `tidybulk` object
A `tidybulk` object
A `tidybulk` object
`r lifecycle::badge("maturing")`
This function creates a tidybulk object and is useful if you want to avoid to specify .sample, .transcript and .abundance arguments all the times. The tidybulk object have an attribute called internals where these three arguments are stored as metadata. They can be extracted as attr(<object>, "internals").
tidybulk(tidybulk::se_mini)
#> # A tibble: 2,635 × 9
#> .feature .sample count Cell.type time condition days dead entrez
#> <chr> <chr> <dbl> <chr> <chr> <lgl> <dbl> <dbl> <chr>
#> 1 ABCB4 SRR1740034 1035 b_cell 0 d TRUE 1 1 5244
#> 2 ABCB9 SRR1740034 45 b_cell 0 d TRUE 1 1 23457
#> 3 ACAP1 SRR1740034 7151 b_cell 0 d TRUE 1 1 9744
#> 4 ACHE SRR1740034 2 b_cell 0 d TRUE 1 1 43
#> 5 ACP5 SRR1740034 2278 b_cell 0 d TRUE 1 1 54
#> 6 ADAM28 SRR1740034 11156 b_cell 0 d TRUE 1 1 10863
#> 7 ADAMDEC1 SRR1740034 72 b_cell 0 d TRUE 1 1 27299
#> 8 ADAMTS3 SRR1740034 0 b_cell 0 d TRUE 1 1 9508
#> 9 ADRB2 SRR1740034 298 b_cell 0 d TRUE 1 1 154
#> 10 AIF1 SRR1740034 8 b_cell 0 d TRUE 1 1 199
#> # ℹ 2,625 more rows