[Loris-dev] Questions and errors uploading BIDS

Morales Pinzon, Alfredo AMORALESPINZON at BWH.HARVARD.EDU
Thu Jul 15 17:33:31 EDT 2021


Hi Cécile,

Thank you for the answers. I will apply the patches and test.

Best,
Alfredo.

On Jul 15, 2021, at 5:23 PM, Cecile Madjar <cecile.madjar at mcin.ca<mailto:cecile.madjar at mcin.ca>> wrote:


        External Email - Use Caution

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<https://secure-web.cisco.com/1RT0b_pDRzGh5oEnKt7wHclfIWMewUlzzoH-FStRocNdjI2mrpqsgr33eVaIS22zsvLSZ7Z8ugyaoZ07SHA_O7tObAB409DokII49oyHlFVQnGqaaxEoC_87rcI6ivzH41s36uv9R13FRzaiRJPDhbqmj3kt67BF36UEJp4e5xglyAHPcxx1DV8sf3sJ2TRBCKhNhHUWeRbPM9DdNrFxpoZzYHnN4xy-VMBRK5T9SF4afE6jv3tqdaKdfSYG2wDh-CWrIBbzyeSECIRnMYikelA/https%3A%2F%2Fbids-specification.readthedocs.io%2Fen%2Fstable%2F03-modality-agnostic-files.html%23scans-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://secure-web.cisco.com/1FA74HdTiHzhrcJezSt2K6DKMGwP_wqxcdk1oXclu1U6jCz4rd2fSi-NwskWq_Qfb0p4MTUX6_XEbTFvgo_VxzSI4YiWtniz3W9Yi_Y_Yhd3GKBQD7kKnXK8l0jqEWj-6sZ77YTpIg9X5O235SfFeZ3JW3V5MFXQOH7vMnzgPDBS-6dsjvmCAtnAjP4DJoXkGwQ6VJLV21yWj9np6NfjWvjphVgXfpYnIoS4jb57yVl8xBW0ttGeejb-HEHsaZ-bNfre-16KCLmR-IJO3pZbnwg/https%3A%2F%2Fgithub.com%2Faces%2FLoris-MRI%2Fblob%2Fb5a6fc8cc3cf1fad50df21d9d87a284981705e3c%2Fpython%2Fbids_import.py%23L299> 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<https://secure-web.cisco.com/1Tpg7v8DtF0HJJEnPZUNGN7gwCdF7vLrM19WZmYU8p4-riYcbJ1FVNYH0FGEvIBT0KwSYUMgtVeulxeEaGSohphmm0NQn8wIbxh5cSX4VwbKcKLhvQY1RtnS2SxEKUi4Pln5KHxRYDcVhz9sWnZ6EIhfZEDECvkuT2-zTt24B5MMeBduiQG8W3Pqa7Qr2oEjJW_m84bq0EVtbGQmu5ZVKytj8tPkwWAUE8gTEtLOb1DjwDX5O8y8EHAN_8lf2ZqJ9eojMRDufJj2QObf0g02n3Q/https%3A%2F%2Fgithub.com%2Faces%2FLoris-MRI%2Fpull%2F645>.

>
> 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<http://secure-web.cisco.com/1WYhYdfRTqaTteJ_4rndbHmww7uTfLympsocUwkjHV2oHQVOQ_ddIjv7AcfCoiP5cJIbw5iksCEFI9RVOxA3_lM6etO-PCaDz89PgNjaEjQPMC5dEfLOft3B7YhP7TCF4ISn-hvCOCFnhQqmRbs9zS1PRbVr6qe_Fra0AR2dZzskzHnYp2A_u29fTzE5u8vYJLMpl4t10wah4Bga-hhoD3gkgnRHVU5KAWy4uwX30Ma4tng8DnVlqBopiM9DpYE6ZEviZpdmHvWqJZxPHxbnHOw/http%3A%2F%2F216.15.126.108%3A55424>] 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/<https://secure-web.cisco.com/1XkKe3e3JkFCEbEAQx3rrZ25ZCaDXFH7ViiHfRCVtt0ZTI9ckG_4i5CYOnY_Wv0SYfmdvUUZ0jQkdjvUgzKY9qJfqnqcVF_7n2nRaR-c1a4U_Y95LN-Dv96I8j-OBHltZ52DoTaYZ9RvB7YL9vP82yG9pUb2XlYJwK6xA6b2gGwhHhyqpdrPfRW0HZFx4__6pDI4CU5CQWx9_dteaDW3_xjntBo3296km9H-nJNiywrGrKtv_1pO6wCU5ygXs2bqXwZ9j7X4eILwCv0N7S7PlKA/https%3A%2F%2Fipmsa-loris.bic.mni.mcgill.ca%2Fcandidate_profile%2F207019%2F>
> ===

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<https://secure-web.cisco.com/1RuRCEtVgtWrK7Pm95g10P8zRltmw5fqwt4wM4vzTM2N7zp7p8HXJKNSQo5QSAfOa23ID04z8m13DojdlnneipDRp6yoYNUJIoorexU5ixp49Alwi5aaHokrOmz-gRnpRkrUxMNI04i2tsCDBAsyiwIBoMwgWyCGHg8asEvLiHrEcYtWAdRycS4UQ7Udt6hrVhp6DqF6kpBH3s4oWPPlFvnJ9CHywNOno0NqHI0zXVnlWI2BuIW0heLJeaDSyrvK-5FcYxqhfnBEJTq1hkNB-Jg/https%3A%2F%2Fgithub.com%2Faces%2FLoris-MRI%2Fpull%2F644>

Hope this helps,

Cécile

The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at http://www.massgeneralbrigham.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20210715/59b1fec3/attachment-0001.html>


More information about the Loris-dev mailing list