Closed cbravo93 closed 3 years ago
Hi @cbravo93,
I think this would probably best (and make more sense) to have this as an optional argument in pySCENIC. @cflerin what do you think ?
Hi @cbravo93 ,
Yes, I think this is best done through pySCENIC first, then we can change the VSN code to publish the adjacency table along with the rest of the pySCENIC outputs.
I think the original reason the correlations were not included is that we just took the GRNBoost2 function directly from Arboreto, and the correlations aren't calculated until the next step (module assembly).
By the way, with the current pySCENIC output, you can tell if a regulon is activating or repressing by the (+)
or (-)
that is appended to the regulon name in the AUCell matrix and the SCope regulon names from the loom.
Hi,
Oki, great! We are actually trying to avoid the regulons, the idea is to use the modules (to combine with scATAC-seq data). Indeed the regulons indicate the sign of the correlation, but they are already pruned based on the motif enrichment around the TSS, we need to know the sign of the interactions before any prunning (some will be lost from the initial module).
Cheers!
Carmen
@cbravo93, Ok so we could export the adjacency table with correlations during the cisTarget step, would that work for you? Or do you specifically need this table before running cisTarget? I assume that if you're running through VSN, you always run the full pySCENIC pipeline anyway right, so exporting during the cisTarget step should be ok?
@cflerin For the moment that would work (I am running full SCENIC anyways, as comparison). For the future, if we adopt this approach then we would run the GRNBoost part but not cisTarget (so it would have to be included either on GRNBoost or as an additional in the new approach instead of cisTarget).
So yeah, it can be added on cisTarget for now and we can come back to this later on if needed :). But it would be important to include the correlations for all TF-target relationships as in the modules (before any prunning).
Thanks!
Hey @cbravo93 ,
pySCENIC 0.10.4 now has a add_cor
command on the CLI that will take the GRN output and add the correlations to it, and write to a new file. You can use it directly like:
pyscenic add_cor \
adj.tsv.gz \
expr_mat.loom \
--output adj_wCor.tsv.gz
That file can then go into the pyscenic ctx
command, and those correlations will be used in that step instead of recalculating them. You get:
TF target importance regulation rho
RPS4X RPL30 57.53771884505939 1 0.8034271077707851
SPI1 CSTA 55.52160342475096 1 0.6658552410782873
RPS4X EEF1A1 54.9316859642678 1 0.8896019553625047
RPS4X RPS14 53.64686681505877 1 0.8430613367467624
RPL35 RPL3 52.93219107270529 1 0.8275481052873752
This is all implemented in VSN as well, with this table replacing the old adjacency table.
Hi @cflerin !
Thanks a ton, this is it :)! I will close the issue
C
Hi VSN team :)!
I have noticed that when running SCENIC in the pipeline, the GRNBoost modules adjency table only contains the columns TF-target-importance. For some analyses afterwards, it is interesting to also have the correlations TF-gene to classify the interactions as positive or negative (because the RF importance does not reflect this). This should be already calculated in the pySCENIC workflow too.
My feature request is: can these values be added to the adjency table, to have TF-target-importance-correlation?
Of course the correlation can always be added afterwards, but it can take quite some time when you have big data sets, and since it is in principle already calculated when running VSN there is no need to repeat the calculation if it can be saved.
PD: Let me know if this issue fits better in the pySCENIC repository.
Thanks!
C