Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] BIDS : refactor function create_participants_df from bids_utils #1200

Closed

Conversation

AliceJoubert
Copy link
Contributor

@AliceJoubert AliceJoubert commented Jun 6, 2024

Small refactor of create_participants_df of bids_utils :

Previously :

  • Compared BIDS to clinical data
  • Adapted to OASIS and ADNI only
  • Using dataframes but not the corresponding existing methods

Planned :

  • If possible adapt it to all datasets, at least check on dataset if should not be used for it ; ex AIBL has redundant function
  • Simplify code loops
  • Tests if needed

Maybe in another function :

  • Compare BIDS result to initial raw dataset, available for all types of datasets (same as cleaning sessions/subjects)

@AliceJoubert AliceJoubert self-assigned this Jun 6, 2024
Copy link
Member

@NicolasGensollen NicolasGensollen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for starting working on this @AliceJoubert !

I think it might be better to pause this PR a bit while:

I know it's hard to start refactoring a piece of code by writing unit tests for the code to be changed, but it is a much safer approach than refactoring first and writing tests afterwards.
Let me know what you think !

from os import path

import numpy as np
import pandas as pd

from clinica.iotools.converters.adni_to_bids.adni_utils import load_clinical_csv
from clinica.utils.stream import cprint
# todo : diff between what is in ADNI raw and BIDS can do get subjects (? not same naming type)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what this means

clinica/iotools/bids_utils.py Show resolved Hide resolved
clinica/iotools/bids_utils.py Show resolved Hide resolved
@AliceJoubert AliceJoubert deleted the adni2bids_participants_tsv branch June 13, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants