check_donor: Find donor clusters

View source: R/human_functions.R

check_donorR Documentation

Find donor clusters

Description

This function identifies clusters that are nearly exclusively expressed in one donor. Currently it is hard-coded to define clusters with >90 or >50 function iterations will include these options as parameters.

Usage

check_donor(
  anno,
  cluster,
  norm.dat,
  select.cells = names(cluster),
  keep.cl = NULL,
  meta1_area = "roi",
  meta2_donor = "external_donor_name",
  plot = TRUE,
  plot.path = "output/"
)

Arguments

anno

anno dataframe which must include column names listed in 'neun.colname' 'meta1_area' and 'meta2_donor' below. "cluster" is added from 'cluster' parameter below.

cluster

clusters labels for all cells along with sample_id as their names

norm.dat

expression dataframe with columns as cells and rows as gene names and cpm normalized

select.cells

column nmaes of norm.dat

keep.cl

clusters to definitely keep in analysis (e.g., to exclude from consideration as a donor cluster) default is NULL

meta1_area

The metadata column that contains information about the area (e.g. cortical region and layer). default is "roi"

meta2_donor

The metadata column that contains information about the donor. default is "external_donor_name"

plot

default is TRUE

plot.path

path of plot, default is "./output/"

Value

Gives cluster ids vs donor expression/region heatmap


AllenInstitute/scrattch.hicat documentation built on Oct. 20, 2023, 6:55 a.m.