R/preprocessing_filtering_reduction.R
create_scExp.RdCreate the single cell experiment from (sparse) datamatrix and feature dataframe containing feature names and location. Also optionally removes zero count Features, zero count Cells, non canconical chromosomes, and chromosome M. Calculates QC Metrics (scran).
create_scExp( datamatrix, annot, remove_zero_cells = TRUE, remove_zero_features = TRUE, remove_non_canonical = TRUE, remove_chr_M = TRUE, mainExpName = "main", verbose = TRUE )
| datamatrix | A matrix or sparseMatrix of raw counts. Features x Cells (rows x columns). |
|---|---|
| annot | A data.frame containing informations on cells. Should have the same number of rows as the number of columns in datamatrix. |
| remove_zero_cells | remove cells with zero counts ? (TRUE) |
| remove_zero_features | remove cells with zero counts ? (TRUE) |
| remove_non_canonical | remove non canonical chromosomes ?(TRUE) |
| remove_chr_M | remove chromosomes M ? (TRUE) |
| mainExpName | Name of the mainExpName e.g. 'bins', 'peaks'... ("default") |
| verbose | (TRUE) |
Returns a SingleCellExperiment object.
#>scExp#> class: SingleCellExperiment #> dim: 600 300 #> metadata(0): #> assays(1): counts #> rownames(600): chr1_1_5147117 chr1_5147118_10294233 ... #> chrX_89737519_94884635 chrX_94884636_100031751 #> rowData names(1): ID #> colnames(300): sample_1_c1 sample_1_c2 ... sample_4_c69 sample_4_c70 #> colData names(5): barcode cell_id sample_id batch_id total_counts #> reducedDimNames(0): #> mainExpName: main #> altExpNames(0):