pycallingcards.preprocessing.adata_insertions#

pycallingcards.preprocessing.adata_insertions(adata_cc, adata, name, groupby='cluster', method='logAvginsertions', peak='all')[source]#

Calculate sum of peaks per cluster or average peaks per cell in different cluster and give it to anndata object.

Parameters:
  • adata_cc (AnnData) – Anndata for callingcards

  • adata (AnnData) – Anndata for RNA.

  • name (str) – The name to add to adata.obs.

  • groupby (str (default: 'cluster')) – The name all the cells are grouped by.

  • method (Optional[Literal['avginsertions', 'logAvginsertions', 'suminsertions', 'logSuminsertions']] (default: 'logAvginsertions')) – [“avginsertions”,”logAvginsertions”,”suminsertions”,”logSuminsertions”]. The method to calculate the insertions.

  • peak (str (default: 'all')) – The name of the peak we are looking into. If it is ‘all’, all the peaks would be counted.

Returns:

pd.DataFrame with paired genes and peaks for different groups.

Example:

Please check here.