create_attribute: create_attribute

Description Usage Arguments Value Examples

View source: R/CoreMethods.R

Description

make attribute object for ZSL (trained data)

Usage

1
2
3
4
5
create_attribute(Name, Tissue, w2v, Expr, Rowname, Cellname, cell_ontology,
  Sdatatype, w2v_index = FALSE, Xdatatype = "scRNA-seq", Ngene = 64,
  Stopwords = stopwords, Fdrthr = 0.1, Gamma = 1, Lambda = 1,
  Xpeaks = FALSE, Sep = "_", Mincellcount = 10, Mincellfrac = 0.05,
  Simthres = -Inf, R_output = FALSE)

Arguments

Name

user-defined name for the output

Tissue

tissue of the sample (please make sure the word of tissue must be same as pre-existing tissue list. If it is new tissue type, it doesn't matter)

  • Mouse: Aorta, Brain, Diaphragm, Fat, Heart, Kidney, LargeIntestine, LimbMuscle, Liver, Lung, MammaryGland, Marrow, Pancreas, Skin, Spleen, Thymus, Tongue, Trachea

w2v

word2vector object

  • output of make_w2v

  • pre-existing side-information object (julia object) (ex: julia_obj$side_information)

  • output of generate_sideinformation

Expr

expression/peak matrix (d <- make_input(input_var), d$norm_matrix)

Rowname

gene/peak_location of Expr (d<- make_input(input_var), d$rowname)

Cellname

cellname of Expr (d<- make_input(input_var), d$cellname)

cell_ontology

julia object of cell ontology (the result of make_cellontology)

Sdatatype

type of side-information (cell_ontology, ATAC-seq, or user-defined term)

w2v_index

TRUE if user needs to make side-information from cell ontology. FALSE if julia object of side-information exists

Xdatatype

type of Expr (scRNA-seq or scATAC-seq)

Ngene

a number of vector size after JL transformation

Stopwords

julia object of stopwords (the result of make_stopwords)

Fdrthr

fdr threshold for calculating similarity score during training

Gamma

paramter for ZSL

Lambda

parameter for ZSL

Xpeaks

TRUE if data type of x (and Expr) is ATAC-seq

Sep

delimiter for peak_location
ex: chr1_3084739_3085712 (make sure delimiter for peak_location of data must be "_")

Mincellcount

minimum cell count for a given cell type for training

Mincellfrac

minimum fraction of cell type for training

Simthres

initial similarity threshold

R_output

TRUE if the result of the function should be R object. FALSE if the result of the function should be julia object

Value

an attribute for ZSL (trained data) (julia object)

Examples

1
2
3
4
5
d <- make_input(matrix, train = TRUE)
w2v <- make_w2v("Pubmed_index")
annot <- make_cellontology("cell ontology file")
stopwords <- make_stopwords(stopwords)
att <- create_attribute("user", "Heart", d$norm_matirx, d$rowname, d$cellname, annot, "cell_ontology", w2v_index = TRUE)

hemberg-lab/sctransfermap documentation built on Nov. 11, 2019, 6:23 a.m.