Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

race conditions #14

Open
kdm9 opened this issue Jul 9, 2024 · 3 comments
Open

race conditions #14

kdm9 opened this issue Jul 9, 2024 · 3 comments
Assignees
Labels
bug Something isn't working feature_request

Comments

@kdm9
Copy link
Contributor

kdm9 commented Jul 9, 2024

Hello all,

There seem to be quite a few race conditions if one runs lifton in parallel. A project I'm working on requires running lifton from several dozen source annotations to several hundred references, and so I use snakemake to parallelise runs across a cluster. However (at least) the following race conditions appear:

  • If the output files are something like output/$SOURCE/$TARGET_NAME.gff, there's a race condition as lifton writes to output/$SOURCE/lifton_output regardless of which genome is being annotated, which corrupts the intermediate files.
  • It seems like at certain stages the gffutils sqlite database is written to, even if it already exists before creating (e.g. with ANALYSE). This causes race conditions and crashes as only one process can write to a sqlite db at once (normally).

With liftoff, one could work around these same issues because liftoff accepted a temp/intermediate directory name (so you could use e.g. output/$SOURCE/$TARGET_NAME/ instead of output/$SOURCE/lifton_output, making each job's directory unique). Liftoff also did not modify the gff database if it already existed, so if you pre-computed all needed gff_dbs before running any liftoff, then you were guaranteed not to have race conditions on the sqlite db.

I'd encourage you to adopt these workarounds in lifton.

best,
Kevin

@Kuanhao-Chao Kuanhao-Chao self-assigned this Jul 9, 2024
@kdm9
Copy link
Contributor Author

kdm9 commented Jul 31, 2024

@Kuanhao-Chao any update on this issue?

@Kuanhao-Chao
Copy link
Owner

Kuanhao-Chao commented Aug 2, 2024 via email

@Kuanhao-Chao Kuanhao-Chao added bug Something isn't working feature_request labels Aug 2, 2024
@kdm9
Copy link
Contributor Author

kdm9 commented Aug 2, 2024

OK, great, thanks in advance and enjoy your internship!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature_request
Projects
None yet
Development

No branches or pull requests

2 participants