@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:
Submit cis-processing job.
Load config file.
Make temporary directories in /scratch.
Check that heuristic, bidsifier, datalad, and MRIQC files exist.
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.
Copy raw data tarfile to /scratch. --> cis-bidsify (as long as tarfile is in project directory)
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.
Check if BIDSifier's BIDS-Validator output says the conversion was successful. --> cis-bidsify
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.
Copy CIS templateflow to /scratch.
Run MRIQC Singularity image on new mini-BIDS dataset.
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.
@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 fromcis-processing
tocis-bidsify
.Here is a first draft of an outline of the current steps of
cis-processing
:/scratch
./scratch
./scratch
might speed things up./scratch
. -->cis-bidsify
(as long as tarfile is in project directory)/data
, we can use datalad option in heudiconv./scratch
we can call datalad within BIDSifier image, after dataset merge.cis-bidsify
/scratch
into main BIDS dataset in/data
. -->cis-bidsify
/data
, we can drop this./scratch
, we can move dataset merging code tocis-bidsutils
./scratch
./scratch
into main derivatives folder in/data
. -->cis-bidsify
?cis-bidsify
, we can move merging function tocis-bidsutils
./scratch
.