get_cells_index: Getting the column index of interesting cells

get_cells_indexR Documentation

Getting the column index of interesting cells

Description

get_cells_index finds which cells are called with the queried NGT for all given variants.

Usage

get_cells_index(h5f, variants, int_ngt, cell_index = NULL)

Arguments

h5f

h5f

variants

A named vector. You should get the value from the id column after calling get_variants. If you don't provide the names of the variants, R will do a bad job for you.

int_ngt

A numeric vector. Specifies genotypes of interest.

cell_index

A numeric vector. Use this if you want to restrict the search to a subset of cells.

Value

Either a numeric vector or a named list of numeric vectors.

Examples

#Retrieving the NGT matrix for IDH1_R132H and NPM1c
## Not run: 

#Want to find which cells are mutated for IDH1_R132H and NPM1c
interesting_variants <- c(IDH1_R132H = "chr2:209113112:C/T",
                          NPM1c = "chr5:170837543:C/CTCTG")
get_cells_index(h5f,
                variants = interesting_variants,
                int_ngt = c(1, 2))

#Want to find which cells are unknown for IDH1_R132H
get_cells_index(h5f,
                variants = c(IDH1_R132H = "chr2:209113112:C/T"),
                int_ngt = 3)


## End(Not run)

northNomad/tapestri.tools documentation built on May 31, 2024, 4:44 p.m.