From f3189d1dd3c9f49f3a4f887d2357b3983cef709f Mon Sep 17 00:00:00 2001 From: Pierre-Louis Benveniste <67429280+plbenveniste@users.noreply.github.com> Date: Mon, 13 Nov 2023 16:38:28 -0500 Subject: [PATCH 1/5] change analyse lesion description Co-authored-by: Jan Valosek <39456460+valosekj@users.noreply.github.com> --- dataset_analysis/generate_dataframe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dataset_analysis/generate_dataframe.py b/dataset_analysis/generate_dataframe.py index 9407f36..1581f3a 100644 --- a/dataset_analysis/generate_dataframe.py +++ b/dataset_analysis/generate_dataframe.py @@ -97,7 +97,7 @@ def get_spinal_cord_info(patient_data, spinal_cord_path, timepoint): def analyse_lesion_per_levels(patient_data, discs_path, timepoint, output_folder): """ - This function focuses on lesions per spinal cord levels. + This function focuses on lesions per vertebral levels. It computes the number, volume and average length of lesions per spinal cord level. Input: From 964f10e75d9b535140cb1306a586e42e319e7c19 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Benveniste <67429280+plbenveniste@users.noreply.github.com> Date: Mon, 13 Nov 2023 16:39:27 -0500 Subject: [PATCH 2/5] change description of analyse lesion Co-authored-by: Jan Valosek <39456460+valosekj@users.noreply.github.com> --- dataset_analysis/generate_dataframe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dataset_analysis/generate_dataframe.py b/dataset_analysis/generate_dataframe.py index 1581f3a..fa4d35d 100644 --- a/dataset_analysis/generate_dataframe.py +++ b/dataset_analysis/generate_dataframe.py @@ -98,7 +98,7 @@ def get_spinal_cord_info(patient_data, spinal_cord_path, timepoint): def analyse_lesion_per_levels(patient_data, discs_path, timepoint, output_folder): """ This function focuses on lesions per vertebral levels. - It computes the number, volume and average length of lesions per spinal cord level. + It computes the number, volume and average length of lesions per vertebral levels. Input: lesion_seg_file : path to the lesion segmentation file From 5c79d5aa8ad81d3c57490083d0d231720e8fcc7d Mon Sep 17 00:00:00 2001 From: Pierre-Louis Benveniste <67429280+plbenveniste@users.noreply.github.com> Date: Mon, 13 Nov 2023 16:41:57 -0500 Subject: [PATCH 3/5] update analyse patient tsv description Co-authored-by: Jan Valosek <39456460+valosekj@users.noreply.github.com> --- dataset_analysis/generate_dataframe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dataset_analysis/generate_dataframe.py b/dataset_analysis/generate_dataframe.py index fa4d35d..c6d325c 100644 --- a/dataset_analysis/generate_dataframe.py +++ b/dataset_analysis/generate_dataframe.py @@ -342,7 +342,7 @@ def analyze_patient_lesion(patient_data, lesion_path, timepoint, output_folder): def analyze_patient_tsv(participant_id, participants_tsv, timepoint): """ This function gathers information from the participants.tsv file. - It gathers information on each participant, their pathology (and the material used for image acquisition). + It gathers information on each participant, their pathology (and the acquisition parameters used for image acquisition). Input: participant_id : id of the participant From d10610662eb2935160443ad33b8b31d4cc395da4 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Benveniste <67429280+plbenveniste@users.noreply.github.com> Date: Mon, 13 Nov 2023 16:45:50 -0500 Subject: [PATCH 4/5] changed iteration over disc not levels --- dataset_analysis/generate_dataframe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dataset_analysis/generate_dataframe.py b/dataset_analysis/generate_dataframe.py index c6d325c..6d66ad5 100644 --- a/dataset_analysis/generate_dataframe.py +++ b/dataset_analysis/generate_dataframe.py @@ -149,7 +149,7 @@ def analyse_lesion_per_levels(patient_data, discs_path, timepoint, output_folder levels = np.unique(disc_seg_data) levels = levels[levels != 0] - #we iterate over the levels + #we iterate over the intervetebral discs (aka levels here) for i in range(len(levels)-1): #get upper bound of level upper_bound = np.where(disc_seg_data == levels[i]) @@ -459,4 +459,4 @@ def main(): if __name__ == '__main__': - main() \ No newline at end of file + main() From 42b1e988d552fd669a14fe58f9aacb7720c293e2 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Benveniste <67429280+plbenveniste@users.noreply.github.com> Date: Mon, 13 Nov 2023 16:50:10 -0500 Subject: [PATCH 5/5] changed age description --- dataset_analysis/generate_dataframe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dataset_analysis/generate_dataframe.py b/dataset_analysis/generate_dataframe.py index 6d66ad5..e302fea 100644 --- a/dataset_analysis/generate_dataframe.py +++ b/dataset_analysis/generate_dataframe.py @@ -358,7 +358,7 @@ def analyze_patient_tsv(participant_id, participants_tsv, timepoint): patient_data["site"] = participant_id.split('-')[1][:3] #sex patient_data["sex"] = participants_tsv.loc[participants_tsv["participant_id"] == participant_id]["sex"].values[0] - #age at M0 + #age at scan patient_data["age"] = participants_tsv.loc[participants_tsv["participant_id"] == participant_id]["age_" + timepoint].values[0] #pathology patient_data["pathology"] = participants_tsv.loc[participants_tsv["participant_id"] == participant_id]["pathology_M0"].values[0]