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

Set a fixed seed for all steps #43

Closed
cflerin opened this issue Nov 14, 2019 · 12 comments
Closed

Set a fixed seed for all steps #43

cflerin opened this issue Nov 14, 2019 · 12 comments
Assignees

Comments

@cflerin
Copy link
Member

cflerin commented Nov 14, 2019

Especially important for dimensionality reduction, clustering, etc.

@dweemx
Copy link
Contributor

dweemx commented Nov 14, 2019

I think we should do the same for SCENIC.
We should save the seeds (or use the run ID as a seed) for each of the runs so that the results should be reproducible.

@cflerin
Copy link
Member Author

cflerin commented Nov 14, 2019

Good idea. But there are some things internal to pySCENIC that would need this addition as well. One thing in particular is the AUCell step, when calculating the cell rankings, ties are broken dependent on the random seed (aertslab/pySCENIC#99). This is a fix that would need to be implemented on the pySCENIC side. I believe the same applies to the ranking in the cisTarget step as well. For GRNBoost2/Genie3, there is already an option to set the seed in the pySCENIC CLI, but this needs to be implemented in the NF process here also.

@dweemx
Copy link
Contributor

dweemx commented Jan 6, 2020

The user should be able to use a custom seed => put the seed as a param part of the config.

@dweemx
Copy link
Contributor

dweemx commented Jan 8, 2020

@dweemx
Copy link
Contributor

dweemx commented Feb 14, 2020

Current stochastic processes:

  • SC__SCANPY__NEIGHBORHOOD_GRAPH (scanpy repo)
  • SC__SCANPY__DIM_REDUCTION (scanpy repo): concerns only UMAP
  • PCACV__FIND_OPTIMAL_NPCS (pcacv repo)
  • GRNBOOST2_WITHOUT_DASK (scenic repo)

dweemx added a commit to vib-singlecell-nf/scanpy that referenced this issue Feb 14, 2020
@dweemx dweemx self-assigned this Feb 14, 2020
dweemx added a commit to vib-singlecell-nf/scenic that referenced this issue Feb 14, 2020
dweemx added a commit to vib-singlecell-nf/pcacv that referenced this issue Feb 14, 2020
dweemx added a commit to vib-singlecell-nf/pcacv that referenced this issue Feb 14, 2020
dweemx added a commit that referenced this issue Feb 14, 2020
This was referenced Feb 17, 2020
@dweemx dweemx closed this as completed Feb 18, 2020
@cflerin
Copy link
Member Author

cflerin commented Feb 20, 2020

Nice work on this @dweemx ! But it's not quite finished for the pySCENIC steps. Maybe it would be better if we start another issue in that repo? It would need work on the pySCENIC codebase before we're able to implement anything here.

@dweemx
Copy link
Contributor

dweemx commented Feb 20, 2020

What did I miss ?
I think I set the seed for the GRN step ;
Is there also some randomness in the cistarget/AUCell steps ?
Yeah, good idea then to create another issue in the scenic repo 👍

@cflerin
Copy link
Member Author

cflerin commented Feb 20, 2020

No you didn't miss anything. But there some things internal to pySCENIC (ctx and aucell steps) that are still stochastic. I'll start an issue there.

@dweemx
Copy link
Contributor

dweemx commented Feb 21, 2020

This regards the following processes:

  • SC__SCANPY__DIM_REDUCTION

The seed is not passed to random_state parameters in:

  • sc.tl.tsne
  • sc.tl.umap
  • sc.tl.pca

@dweemx
Copy link
Contributor

dweemx commented Feb 25, 2020

Fully reproducible workflows from version v0.13.0

@dweemx dweemx closed this as completed Feb 25, 2020
KrisDavie pushed a commit that referenced this issue Dec 7, 2020
@erwinlagu
Copy link

Good Job

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants