OmicsProfiles
OmicsProfiles.Profile
— FunctionProfile(countmat, omicsname, var, obs; varindex=:genesymbol, obsindex::Symbol=:barcode,
T=float(eltype(countmat)))
Constructor for establishing AnnotatedProfile
with a OmicsProfile
inside.
Arguments
countmat
: The count matrix for given omics and it will be set to key:count
.omicsname::Symbol
: The name of givenOmicsProfile
.var::DataFrame
: The dataframe contains meta information for features or variables.obs::DataFrame
: The dataframe contains meta information for observations.varindex::Symbol
: The index of dataframevar
.obsindex::Symbol
: The index of dataframeobs
.T
: Element type ofcountmat
.
OmicsProfiles.OmicsProfile
— TypeOmicsProfile(countmat, var, varindex; T=float(eltype(countmat)))
Arguments
countmat
: The count matrix for given omics and it will be set to key:count
.var::DataFrame
: The dataframe contains meta information for features or variables.varindex::Symbol
: The index of dataframevar
.T
: Element type ofcountmat
.
Examples
julia> r, c = (100, 500)
(100, 500)
julia> data = rand(0:100, r, c);
julia> var = DataFrame(index=1:r, C=rand(r), D=rand(r));
julia> prof = OmicsProfile(data, var, :index)
OmicsProfile (nvar = 100):
var: index, C, D
layers: count
OmicsProfiles.AnnotatedProfile
— TypeAnnotatedProfile(omics, obs, obsindex)
AnnotatedProfile(op, omicsname, obs, obsindex)
Arguments
omics::Dict{Symbol,OmicsProfile}
: A collection of omics profile with their names in keys.op::OmicsProfile
: Single omics profile.omicsname::Symbol
: The name of givenOmicsProfile
.obs::DataFrame
: The dataframe contains meta information for observations.obsindex::Symbol
: The index of dataframeobs
.
OmicsProfiles.read_10x
— Functionread_10x(path; make_unique=true, omicsname=:RNA, varnames=[:ensembleid, :genesymbol],
obsnames=[:barcode], varindex=:genesymbol, obsindex=:barcode)
Reads 10x dataset from path
and returns an AnnotatedProfile
.
Arguments
path::AbstractString
: The path to 10x dataset folder.make_unique::Bool
: To makevarindex
unique or not if givenvarindex
is not unique.omicsname::Symbol
: The name of given sequencing data.varnames::AbstractVector
: The header or column names of feature file.obsnames::AbstractVector
: The header or column names of barcode file.varindex::Symbol
: The index of dataframevar
.obsindex::Symbol
: The index of dataframeobs
.
Examples
julia> using SnowyOwl
julia> prof = read_10x(SnowyOwl.Dataset.pbmc3k_folder(), varindex=:ensembleid)
AnnotatedProfile (nobs = 2700):
obs: barcode
RNA => OmicsProfile (nvar = 32738):
var: ensembleid, genesymbol
layers: count