OmicsProfiles

Documentation for OmicsProfiles.

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.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
Base.filterMethod
filter(col => func, p)

Returns a copy of profile p containing data from p for which func returns true.

Arguments

  • col: Column name to filter.
  • func: A predicate function which returns true/false.
  • p::AbstractProfile: A profile to filter on.

Examples

julia> ngenes, ncells = (100, 500)
(100, 500)

julia> X = rand(0:10, ngenes, ncells);

julia> var = DataFrame(genesymbol=1:ngenes, A=rand(ngenes));

julia> prof = OmicsProfile(X, var, :genesymbol)
OmicsProfile (nvar = 100):
    var: genesymbol, A
    layers: count

julia> prof.varm[:a] = rand(ngenes, 50);

julia> prof2 = filter(:A => x -> x > 0.5, prof)
OmicsProfile (nvar = 46):
    var: genesymbol, A
    varm: a
    layers: count

julia> obs = DataFrame(barcode=1:ncells, B=rand(ncells));

julia> ap = AnnotatedProfile(prof, :RNA, obs, :barcode)
AnnotatedProfile (nobs = 500):
    obs: barcode, B
RNA => OmicsProfile (nvar = 100):
    var: genesymbol, A
    varm: a
    layers: count

julia> ap2 = filter(:B => x -> x > 0.5, ap)
AnnotatedProfile (nobs = 253):
    obs: barcode, B
RNA => OmicsProfile (nvar = 100):
    var: genesymbol, A
    varm: a
    layers: count
OmicsProfiles.ProfileMethod
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.
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.