nledru / RENIN

Regulatory Network Inference with single cell multiomic data
MIT License
5 stars 2 forks source link

Apply RENIN to separate snRNA-seq and snATAC-seq datasets but from the same biological samples #6

Open Sebdumas opened 8 months ago

Sebdumas commented 8 months ago

Hello,

Thanks for the great package. The tutorial shows RENIN applied to a single nucleus multiome dataset. Can we also apply the pipeline to separate snRNA-seq and snATAC-seq data (not from the same cells) but from the same biological samples ?

If yes, it would be very helpful if you could provide an example code for that case.

As a side note, have you compared the performance of your package with the SCENIC+ pipeline from the Aerts lab ?

Thank you,

Kind regards Sébastien

nledru commented 7 months ago

Hello,

Sorry for the slow response. I have pushed some updates that should enable this. You could try the below code to use Cicero-generated connections from your snATAC-seq dataset to link TFs to genes through motifs, then run the TF-gene modeling step. Let me know if you run into any trouble with this and I will be happy to help troubleshoot. Regarding SCENIC+, this approach was favorable in the tests we used in the manuscript. However I am sure that SCENIC+ will also outperform RENIN in certain use cases, although it is hard to predict where and I'm very excited to see it applied to multiome datasets.

library("chromVARmotifs") library("BSgenome.Hsapiens.UCSC.hg38") data("human_pwms_v2") # filtered motifs from cisBP

peak_gene_key <- conns_to_peak_gene_key(cicero_conns, seurat_atac) # from cicero, generate peak-gene annotation motif_matrix_df <- make_motif_matrix(atac, human_pwms_v2) pseudocell_mat <- prepare_pseudocell_matrix(seurat_rna, "SCT", reduction1 = "harmony", reduction2 = NULL, non_multiome = TRUE, cells_per_partition = 10) tf_results_ccan <- run_tf_aen_ccan(seurat_rna, pseudocell_mat, motif_matrix_df, peak_gene_key, gene_list = rownames(de.genes), num_bootstraps = 50, num_threads = 12) tf_ranks <- rank_tfs(tf_results_ccan, seurat_rna, negative_genes = rownames(de.genes)[which(de.genes$avg_log2FC < 0)])