Closed rojinsafavi closed 3 years ago
The particular table from the screenshot you attached was generated by:
from pyscenic.utils import load_motifs
df_motifs = load_motifs('reg.csv')
The regulons dictionary from your code snippet is indeed in the format of TF: [target gene 1, target gene 2, ...]
creating a dictionary of regulons:
regulons = {} for i,r in pd.DataFrame(lf.ra.Regulons,index=lf.ra.Gene).iteritems(): regulons[i] = list(r[r==1].index.values)
Could you please specify how this regulons dict should look like? I am trying to build it from the regulon file produced by pyscenic.
I assume that it's a dict with TFs as keys, and targets as a list, but wanted to make sure :-)