OmicsProfiles
Documentation for OmicsProfiles.
OmicsProfiles.AnnotatedProfile
OmicsProfiles.OmicsProfile
OmicsProfiles.Profile
OmicsProfiles.mmread
OmicsProfiles.mmwrite
OmicsProfiles.readinfo
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.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> using OmicsProfiles, DataFrames
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.Profile
— MethodProfile(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.mmread
— Functionmmread(filename, retcoord=false)
Read the contents of the Matrix Market file filename
into a matrix, which will be either sparse or dense, depending on the Matrix Market format indicated by coordinate
(coordinate sparse storage), or array
(dense array storage).
Arguments
filename::String
: The file to read.retcoord::Bool
: If it istrue
, the rows, column and value vectors are returned along with the header information.
OmicsProfiles.mmwrite
— Methodmmwrite(filename, matrix)
Write a sparse matrix to .mtx file format.
Arguments
filename::String
: The file to write.matrix::SparseMatrixCSC
: The sparse matrix to write.
OmicsProfiles.readinfo
— Methodreadinfo(file)
Read header information on the size and structure from file. The actual data matrix is not parsed.
Arguments
file
: The filename or io stream.