pivot_sample() takes as input a `tbl` (with at least three columns for sample, feature and transcript abundance) or `SummarizedExperiment` (more convenient if abstracted to tibble with library(tidySummarizedExperiment)) and returns a `tbl` with only sample-related columns
pivot_sample(.data, .sample = NULL)
# S4 method for class 'spec_tbl_df'
pivot_sample(.data, .sample = NULL)
# S4 method for class 'tbl_df'
pivot_sample(.data, .sample = NULL)
# S4 method for class 'tidybulk'
pivot_sample(.data, .sample = NULL)
# S4 method for class 'SummarizedExperiment'
pivot_sample(.data, .sample = NULL)
# S4 method for class 'RangedSummarizedExperiment'
pivot_sample(.data, .sample = NULL)
A `tbl` with transcript-related information
A consistent object (to the input)
A consistent object (to the input)
`r lifecycle::badge("maturing")`
This functon extracts only sample-related information for downstream analysis (e.g., visualisation). It is disruptive in the sense that it cannot be passed anymore to tidybulk function.
pivot_sample(tidybulk::se_mini )
#> # A tibble: 5 × 6
#> .sample Cell.type time condition days dead
#> <chr> <chr> <chr> <lgl> <dbl> <dbl>
#> 1 SRR1740034 b_cell 0 d TRUE 1 1
#> 2 SRR1740035 b_cell 1 d TRUE 10 1
#> 3 SRR1740043 monocyte 1 d FALSE 500 1
#> 4 SRR1740058 t_cell 0 d TRUE 1000 0
#> 5 SRR1740067 dendritic_myeloid 1 d FALSE 2000 1