scRNAseq Data
Types
SeqSpace.scRNA.Count — Typestruct Count{T <: Real} <: AbstractArray{T,2}
data :: Array{T,2}
gene :: Array{AbstractString,1}
cell :: Array{AbstractString,1}
endData structure used to represent count data obtained during a scRNAseq sequencing experiment. Individual cells are stored as column vectors while expression of singular genes are obtained as row vectors. data contains the raw/normalized count matrix. gene and cell contain the row/column labels respectively. Genes and cells can be indexed either by integers or names, i.e. strings.
Functions
Base.:∪ — Method∪(seq₁::Count{T}, seq₂::Count{S}) where {T <: Real, S <: Real}Collate count matrix seq₁ and seq₂ by taking the union across genes. Reorders rows of seq₂ to match gene names of seq₁. Additional genes in seq₂ not contained in seq₁ are added as augmented rows.
SeqSpace.scRNA.:∩ — Method∩(seq₁::Count{T}, seq₂::Count{S}) where {T <: Real, S <: Real}Collate count matrix seq₁ and seq₂ by taking the union across genes. Reorders rows of seq₂ to match gene names of seq₁. Only keeps genes present in both seq₁ and seq₂.
SeqSpace.scRNA.filtercell — Methodfiltercells(f, seq::Count)Filters cells of count matrix seq based upon column function f.
SeqSpace.scRNA.filtergene — Methodfiltergene(f, seq::Count)Filters genes of count matrix seq based upon row function f.
SeqSpace.scRNA.generate — Methodgenerate(ngene, ncell; ρ=(α=Gamma(0.25,2), β=Normal(1,.01), γ=Gamma(3,3)))Generate scRNAseq data assuming a monoclonal population of cells sampled against a heteroskedastic negative binomial model.
SeqSpace.scRNA.load — Methodload(dir::AbstractString; batch=missing)Read in scRNAseq experimental data from directory dir. The directory is expected to contain the following files:
- barcodes.tsv : one cell name per line
- features.tsv : one gene name per line
- matrix.mtx : count matrix in mtx format
If batch is not missing, then it will be appended to each cell label.