[Loris-dev] Questions and errors uploading BIDS

Cecile Madjar cecile.madjar at mcin.ca
Thu Jul 15 17:23:31 EDT 2021


Hi Alfredo,

Sorry for the delay, I had to take a deeper look at the code to answer some
of your questions. See below.

> 1. I added the file sub-<label>[_ses-<label>]_scans.tsv as suggested in
> the BIDS standard (
> https://bids-specification.readthedocs.io/en/stable/03-modality-agnostic-files.html#scans-file)
> to add the acquisition dates, do you take it into account to set the dates
> in LORIS? If not, how can I set the acquisition dates for the images in the
> session/visit?
>

Indeed, if you enter a date under an 'acq_time' column in the scans.tsv
file, it will add an entry in parameter_file for the scan_acquisition_time
parameter.


> >
> > 2. I am doing the insertion visit by visit to be able to identify issues
> instead of running all the subjects at once. In this approach I get an
> error stating that the participants file
> (".../data/bids_imports/INFORMS_BIDSVersion_1.4.0/participants.tsv") is
> different from for every execution. Is there a way I can upload subject by
> subject without having this issue?
>

yeah, this is a current limitation that this file keeps changing each time
you upload a new candidate. The pipeline was initially developed for
retrospective BIDS datasets. We would need to modify this part
<https://github.com/aces/Loris-MRI/blob/b5a6fc8cc3cf1fad50df21d9d87a284981705e3c/python/bids_import.py#L299>
for
prospective datasets so that instead of just trying to copy the
participants.tsv file, if it already exists, it would append a row into the
already existing file. You can find a fix for that in the following PR
https://github.com/aces/Loris-MRI/pull/645.


> >
> > If l have to launch the whole dataset, is the bids script able to check
> what was already inserted in case there is an error and I have to it again?
>

Yes, the pipeline is supposed to be smart enough to not reinsert something
that was previously inserted.


> >
> > 3. After insertion of BIDS for a subject in a visit I cannot access the
> visit in the front end, I am getting a 500 error. Here is the error log in
> LORIS:
> >
> > ===
> > [Mon Jul 12 12:05:37.705967 2021] [php7:error] [pid 14497] [client
> 216.15.126.108:55424] PHP Fatal error:  Uncaught TypeError: Return value
> of Utility::getStageUsingCandID() must be of the type string, null returned
> in /var/www
> > /loris/php/libraries/Utility.class.inc:632\nStack trace:\n#0
> /var/www/loris/modules/instrument_list/php/instrument_list.class.inc(177):
> Utility::getStageUsingCandID('207019')\n#1
> /var/www/loris/php/libraries/NDB_Page.class.inc(
> > 707): LORIS\\instrument_list\\Instrument_List->setup()\n#2
> /var/www/loris/src/Middleware/UserPageDecorationMiddleware.php(234):
> NDB_Page->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#3
> /var/www/loris/src/Middleware/PageD
> > ecorationMiddleware.php(56):
> LORIS\\Middleware\\UserPageDecorationMiddleware->process(Object(Laminas\\Diactoros\\ServerRequest),
> Object(LORIS\\instrument_list\\Instrument_List))\n#4
> /var/www/loris/php/libraries/NDB_Page.class.i
> > nc(692):
> LORIS\\Middleware\\PageDecorationMiddleware->process(Object(Laminas\\Diactoros\\ServerRequest),
> Object(LORIS\\instrument_list\\Instrument_List))\n#5
> /var/www/loris/modules/instrument_list/php/instrument_list.class.inc(
> > 137): NDB_Page->pro in /var/www/loris/php/libraries/Utility.class.inc on
> line 632, referer:
> https://ipmsa-loris.bic.mni.mcgill.ca/candidate_profile/207019/
> > ===
>

This might be due to the Current_stage not being set when creating the
visit via the bids_import.py script. Here is a PR to fix that issue next
time you import a new visit via bids_import.py:
https://github.com/aces/Loris-MRI/pull/644

Hope this helps,

Cécile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20210715/cc37e88f/attachment.html>


More information about the Loris-dev mailing list