OmicsProfiles

profile.png
AnnotatedProfile supports multi-omics data with respect to the same set of cells, while OmicsProfile holds single omic data with layers which contains data with the same set of features.
OmicsProfiles.ProfileFunction
Profile(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 given OmicsProfile.
  • 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 dataframe var.
  • obsindex::Symbol: The index of dataframe obs.
  • T: Element type of countmat.
OmicsProfiles.OmicsProfileType
OmicsProfile(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 dataframe var.
  • T: Element type of countmat.

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.AnnotatedProfileType
AnnotatedProfile(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 given OmicsProfile.
  • obs::DataFrame: The dataframe contains meta information for observations.
  • obsindex::Symbol: The index of dataframe obs.
OmicsProfiles.read_10xFunction
read_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 make varindex unique or not if given varindex 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 dataframe var.
  • obsindex::Symbol: The index of dataframe obs.

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