fiuneuro / cis-processing

Automated transfer, conversion, and processing of data acquired at the FIU Center for Imaging Science.
Apache License 2.0
4 stars 4 forks source link

Simplification proposal #64

Closed tsalo closed 4 years ago

tsalo commented 4 years ago

@akimbler and I noticed something about Singularity images. They seem to automatically mount whatever the current working directory is when they're called, even if that directory isn't in /scratch or /home/[username]. This means that, even if we're in /data, we can call an image from there and interact with the files that are present. If this isn't some kind of loophole, and is an expected behavior, then we can move most of the copying/merging code from cis-processing to cis-bidsify.

Here is a first draft of an outline of the current steps of cis-processing:

  1. Submit cis-processing job.
  2. Load config file.
  3. Make temporary directories in /scratch.
  4. Check that heuristic, bidsifier, datalad, and MRIQC files exist.
  5. Copy necessary bidsifier, datalad, and MRIQC Singularity images to /scratch.
    • Technically, this step isn't really necessary, as images can be stored wherever. However, using images in /scratch might speed things up.
    • New intermediate step: CD into project directory.
  6. Copy raw data tarfile to /scratch. --> cis-bidsify (as long as tarfile is in project directory)
  7. Run BIDSifier Singularity image on tarfile.
    • If we output to /data, we can use datalad option in heudiconv.
    • If we output to /scratch we can call datalad within BIDSifier image, after dataset merge.
  8. Check if BIDSifier's BIDS-Validator output says the conversion was successful. --> cis-bidsify
  9. Merge mini BIDS dataset in /scratch into main BIDS dataset in /data. --> cis-bidsify
    • If we output to /data, we can drop this.
    • If we output to /scratch, we can move dataset merging code to cis-bidsutils.
  10. Copy CIS templateflow to /scratch.
  11. Run MRIQC Singularity image on new mini-BIDS dataset.
  12. Merge MRIQC derivatives in /scratch into main derivatives folder in /data. --> cis-bidsify?
    • If we use cis-bidsify, we can move merging function to cis-bidsutils.
  13. Clean up working directory in /scratch.
tsalo commented 4 years ago

This leads to the following changes: