aertslab / pySCENIC

pySCENIC is a lightning-fast python implementation of the SCENIC pipeline (Single-Cell rEgulatory Network Inference and Clustering) which enables biologists to infer transcription factors, gene regulatory networks and cell types from single-cell RNA-seq data.
http://scenic.aertslab.org
GNU General Public License v3.0
440 stars 182 forks source link

pyScenic result do not have the extended(XXg) compared with scenic(R) ?[results] #288

Closed gloriafight closed 3 years ago

gloriafight commented 3 years ago

When I run pyScenic, I get the loom_scenic file. And I import this file to R. regulons_incidMat <- get_regulons(loom,column.attr.name='Regulons') # as incid matrix regulons_motif <- regulonsToGeneLists(regulons_incidMat) # convert to list

But I find the result don't contain the TF_extended. As follows: regulons
3300002I08Rik(+)
5730507C01Rik(+)
6720489N17Rik(+)
AI987944(+)

However,the result in R : "Dlx1 (103g)", "Dlx1_extended (190g)"

cflerin commented 3 years ago

Hi @weipingz ,

The R regulons have the number of target genes (eg. 50g) in the name. You can just count with lengths(regulons_motif) (after loading in R). Is this is what you want?

gloriafight commented 3 years ago

Hi @weipingz ,

The R regulons have the number of target genes (eg. 50g) in the name. You can just count with lengths(regulons_motif) (after loading in R). Is this is what you want?

Thank you for your reply. I understand your words. But I want to know why pySCENIC's result do not contain some regulons with the suffix of extended, given that this phenomenon appears in R packages (scenic) ?

cflerin commented 3 years ago

Hi @weipingz ,

Sorry I misunderstood your original question then. I guess you mean the extended regulons (which are not directly annotated). In pySCENIC, these are not labeled the same way as they are in the R version, but you should be able to find this info in the regulons file. For example:

from pyscenic.utils import load_motifs
df_motifs = load_motifs('reg.csv')

The Annotation column will indicate whether it was direct or indirect annotation.

ybaeus commented 1 year ago

I also face different results between SCENICR and Pyscenic. Have you find out how to handle the situation?