Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Adding correlation to GRNBoost adjency table #254

Closed
cbravo93 opened this issue Nov 19, 2020 · 7 comments · Fixed by #262
Closed

Adding correlation to GRNBoost adjency table #254

cbravo93 opened this issue Nov 19, 2020 · 7 comments · Fixed by #262
Labels
enhancement New feature or request

Comments

@cbravo93
Copy link

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

@cbravo93 cbravo93 added the enhancement New feature or request label Nov 19, 2020
@dweemx
Copy link
Contributor

dweemx commented Nov 19, 2020

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 ?

@cflerin
Copy link
Member

cflerin commented Nov 19, 2020

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.

@cbravo93
Copy link
Author

cbravo93 commented Nov 19, 2020

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

@cflerin
Copy link
Member

cflerin commented Nov 20, 2020

@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?

@cbravo93
Copy link
Author

cbravo93 commented Nov 20, 2020

@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!

cflerin added a commit to vib-singlecell-nf/scenic that referenced this issue Nov 24, 2020
- Update to pySCENIC 0.10.4 to use add_cor cli command
- Rename arboreto output, publish adj file with correlations instead
- Update steps in main.nf to use adj with correlations
- vib-singlecell-nf/vsn-pipelines/issues/254
cflerin added a commit that referenced this issue Nov 24, 2020
- Update to pySCENIC 0.10.4
- GRN output with correlations is now published to the scenic output
location
- Fixes #254
@cflerin
Copy link
Member

cflerin commented Nov 24, 2020

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.

@cbravo93
Copy link
Author

Hi @cflerin !

Thanks a ton, this is it :)! I will close the issue

C

KrisDavie pushed a commit that referenced this issue Dec 8, 2020
- Update to pySCENIC 0.10.4
- GRN output with correlations is now published to the scenic output
location
- Fixes #254


Former-commit-id: 621aad9
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants