RegNMF
- screg2.RegNMF(rna_data, atac_data, batch_type, Meta_data=None, K=100, feature_cutperc=0.01, key_added='scReg_reduction', maxiter=100, copy='rna', TFIDF=False, normalize=False)
Perform Coupled Non-negative Matrix Factorization (NMF) on RNA and ATAC data.
Parameters:
- rna_dataAnnData
Annotated data for RNA.
- atac_dataAnnData
Annotated data for ATAC.
- batch_typestr
Type of batch information in Meta_data.
- Meta_datapd.DataFrame, optional
Metadata containing batch information. Default is None.
- Kint, optional
Number of components for NMF. Default is 100.
- feature_cutpercfloat, optional
Feature cutoff precision. Default is 0.01.
- key_addedstr, optional
Key to store results in rna_data.obsm. Default is “scReg_reduction”.
- maxiterint, optional
Maximum number of iterations for NMF. Default is 40.
- copystr, optional
Specify ‘rna’ or ‘atac’ to choose which data to copy results into. Default is ‘rna’.
Returns:
- AnnData
Annotated data with NMF results added.
- screg2.RegNMF_Matrix(E, O, Meta_data, batch_type, K=100, feature_cutperc=0.01, maxiter=40, TFIDF=True, normalize=True)
Perform Coupled Non-negative Matrix Factorization (NMF) on input matrices.
Parameters:
- Ecsr_matrix
Sparse matrix for RNA data.
- Ocsr_matrix
Sparse matrix for ATAC data.
- Meta_datapd.DataFrame
Metadata containing batch information.
- batch_typestr
Type of batch information in Meta_data.
- Kint, optional
Number of components for NMF. Default is 100.
- feature_cutpercfloat, optional
Feature cutoff precision. Default is 0.01.
- maxiterint, optional
Maximum number of iterations for NMF. Default is 40.
Returns:
- dict
Dictionary containing NMF results.
- screg2.RegNMF_h5(h5_file, barcodes=None)
Perform Coupled Non-negative Matrix Factorization (NMF) on RNA and ATAC data from h5 file.
Parameters:
- h5_filestr
Single cell multiome h5 file
- barcodesstr
The barcodes of cells that you want use
Returns:
- AnnData
Annotated data with NMF results added and normalized layer.
- screg2.tfidf(X)
Compute tfidf for matrix X (cell X gene) https://github.com/stuart-lab/signac/blob/HEAD/R/preprocessing.R