GithubHelp home page GithubHelp logo

Clean-up about porecov HOT 13 CLOSED

replikation avatar replikation commented on July 4, 2024 1
Clean-up

from porecov.

Comments (13)

replikation avatar replikation commented on July 4, 2024

sounds interesting, like the idea.

from porecov.

replikation avatar replikation commented on July 4, 2024

cleanup might be difficult due to the "root" files generated via docker. the easier solution would be for people to point via flag or "config file" to a designated trash area?

from porecov.

replikation avatar replikation commented on July 4, 2024

also nextflow has i believe a build-in "remove workdir" function

from porecov.

hoelzer avatar hoelzer commented on July 4, 2024

also nextflow has i believe a build-in "remove workdir" function

oh, this would be best then I think. An yes, of course, users can also point to -w /scratch/ or -w /tmp or some other place where the data is deleted automatically eventually

from porecov.

hoelzer avatar hoelzer commented on July 4, 2024

Actually there's a(n undocumented) feature to cleanup automatically the work dir adding cleanup = true in the config.

nextflow-io/nf-hack18#3

from porecov.

replikation avatar replikation commented on July 4, 2024

oh nice find :)

from porecov.

RaverJay avatar RaverJay commented on July 4, 2024

Cleaning up after complete finish might be too late:

Just ran into this problem when running a 'heavy' test case of 54 fastqs.
With local executor, every kraken2 process writes an unpacked version of the krakenDB into the work folder.
This just filled up the disk until a kraken2 process died due to lack of space.

As the DB is not part of the process output, but only the kraken result ist - it should be fine to delete the unpacked copy after kraken2 is done?

from porecov.

hoelzer avatar hoelzer commented on July 4, 2024

@RaverJay true, that unpacked krakenDB can be just directly deleted in the kraken process to free-up storage while execution

from porecov.

RaverJay avatar RaverJay commented on July 4, 2024

Just hacked that in on github
#67

from porecov.

replikation avatar replikation commented on July 4, 2024
  • i add scratch true to "heavy disk" workdirs
  • downside its not working properly on wildcards (eg. path("*.fasta")) but in case of kraken classification it works fine

from porecov.

hoelzer avatar hoelzer commented on July 4, 2024
* i add `scratch true` to "heavy disk" workdirs

* downside its not working properly on wildcards (eg. path("*.fasta")) but in case of kraken classification it works fine

What does scratch true actually do? Just asking bc/ on HPCs depending on their configuration issues can come up if stuff is written to e.g. /scratch or /tmp per default. Or dies this automatically clean up work dirs where it is set to true (this would be awesome)

from porecov.

replikation avatar replikation commented on July 4, 2024

it is something internal for the nextflow command.run :

on_exit() {
  exit_status=${ret:=$?}
  printf $exit_status > /home/pditommaso/projects/rnatoy/work/ff/836e306cde436de39a0e2e5e4c8afc/.exitcode
  set +u
  [[ "$COUT" ]] && rm -f "$COUT" || true
  [[ "$CERR" ]] && rm -f "$CERR" || true
  (sudo -n true && sudo rm -rf "$NXF_SCRATCH" || rm -rf "$NXF_SCRATCH")&>/dev/null || true
  exit $exit_status
}
  • however i think its only working correctly if the output is not using wild cards.
  • I tried that on WtP as a global flag and was not working for some process - so this needs to be individually tested ( I added it to the kraken process as it was working in this case)

from porecov.

replikation avatar replikation commented on July 4, 2024

nextflow writes its own "scratch dirs"

from porecov.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.