From 3ad5c3894dee30552b85222df0b2e795a83864bb Mon Sep 17 00:00:00 2001 From: Ceren Date: Mon, 16 Nov 2020 15:48:36 +0100 Subject: [PATCH 01/10] update on doc --- src/utils/removeAllDateSuffix.m | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/utils/removeAllDateSuffix.m b/src/utils/removeAllDateSuffix.m index 3abab5fd..29098f71 100644 --- a/src/utils/removeAllDateSuffix.m +++ b/src/utils/removeAllDateSuffix.m @@ -2,26 +2,25 @@ function removeAllDateSuffix(rawDir, subjName, sesName) % - % Short description of what the function does goes here. + % Function removes the date suffix in the _events and _stim (.tsv and .json) + % files in given raw, session and subject folder. And zips the _stim files. % % USAGE:: % - % [argout1, argout2] = templateFunction(argin1, [argin2 == default,] [argin3]) + % removeAllDateSuffix(rawDir, subjName, sesName) % - % :param argin1: (dimension) obligatory argument. Lorem ipsum dolor sit amet, - % consectetur adipiscing elit. Ut congue nec est ac lacinia. - % :type argin1: type - % :param argin2: optional argument and its default value. And some of the - % options can be shown in litteral like ``this`` or ``that``. - % :type argin2: string - % :param argin3: (dimension) optional argument - % :type argin3: integer - % - % :returns: - :argout1: (type) (dimension) - % - :argout2: (type) (dimension) - % - % removeAllDateSuffix(rawDir, subjName, sesName) + % :param rawDir: obligatory argument. + % :type rawDir: string + % + % :param subjName: Some of the options can be ``sub-001`` or ``sub-pilot001``. + % :type subjName: string % + % :param sesName: Some of the options can be ``ses-001`` or ``ses-003``. + % :type sesName: string + + % :output: - files are renamed by removing 'yyyymmddHHMM' date suffix + + labels = {'func', 'bold', 'eeg', 'ieeg', 'meg', 'beh'}; From 305a21c6aa3a13384478ef1a7d1b2b82cce82d00 Mon Sep 17 00:00:00 2001 From: Ceren Date: Mon, 16 Nov 2020 16:02:35 +0100 Subject: [PATCH 02/10] minor fix --- src/utils/removeAllDateSuffix.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/removeAllDateSuffix.m b/src/utils/removeAllDateSuffix.m index 29098f71..056a8022 100644 --- a/src/utils/removeAllDateSuffix.m +++ b/src/utils/removeAllDateSuffix.m @@ -9,7 +9,7 @@ function removeAllDateSuffix(rawDir, subjName, sesName) % % removeAllDateSuffix(rawDir, subjName, sesName) % - % :param rawDir: obligatory argument. + % :param rawDir: Raw folder directory. % :type rawDir: string % % :param subjName: Some of the options can be ``sub-001`` or ``sub-pilot001``. From 383efd672b7a931e9b74071fcc2764c8cad6339c Mon Sep 17 00:00:00 2001 From: Ceren Date: Mon, 16 Nov 2020 16:03:49 +0100 Subject: [PATCH 03/10] mh fix --- src/utils/removeAllDateSuffix.m | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/utils/removeAllDateSuffix.m b/src/utils/removeAllDateSuffix.m index 056a8022..d34a6db6 100644 --- a/src/utils/removeAllDateSuffix.m +++ b/src/utils/removeAllDateSuffix.m @@ -2,7 +2,7 @@ function removeAllDateSuffix(rawDir, subjName, sesName) % - % Function removes the date suffix in the _events and _stim (.tsv and .json) + % Function removes the date suffix in the _events and _stim (.tsv and .json) % files in given raw, session and subject folder. And zips the _stim files. % % USAGE:: @@ -11,16 +11,14 @@ function removeAllDateSuffix(rawDir, subjName, sesName) % % :param rawDir: Raw folder directory. % :type rawDir: string - % + % % :param subjName: Some of the options can be ``sub-001`` or ``sub-pilot001``. % :type subjName: string % % :param sesName: Some of the options can be ``ses-001`` or ``ses-003``. % :type sesName: string - - % :output: - files are renamed by removing 'yyyymmddHHMM' date suffix - + % :output: - files are renamed by removing 'yyyymmddHHMM' date suffix labels = {'func', 'bold', 'eeg', 'ieeg', 'meg', 'beh'}; From a0b9b6a1162ff5bb6ef929c84c83b43617ff7595 Mon Sep 17 00:00:00 2001 From: Ceren Date: Mon, 16 Nov 2020 16:07:01 +0100 Subject: [PATCH 04/10] wording update --- src/utils/removeAllDateSuffix.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/removeAllDateSuffix.m b/src/utils/removeAllDateSuffix.m index d34a6db6..965fd4f9 100644 --- a/src/utils/removeAllDateSuffix.m +++ b/src/utils/removeAllDateSuffix.m @@ -9,7 +9,7 @@ function removeAllDateSuffix(rawDir, subjName, sesName) % % removeAllDateSuffix(rawDir, subjName, sesName) % - % :param rawDir: Raw folder directory. + % :param rawDir: BIDS raw folder directory. % :type rawDir: string % % :param subjName: Some of the options can be ``sub-001`` or ``sub-pilot001``. From 240c83f78d3de320da09f8f95d8ff3a49348ae83 Mon Sep 17 00:00:00 2001 From: Ceren Date: Mon, 16 Nov 2020 16:10:12 +0100 Subject: [PATCH 05/10] added output --- src/utils/removeAllDateSuffix.m | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/removeAllDateSuffix.m b/src/utils/removeAllDateSuffix.m index 965fd4f9..0440094e 100644 --- a/src/utils/removeAllDateSuffix.m +++ b/src/utils/removeAllDateSuffix.m @@ -19,6 +19,7 @@ function removeAllDateSuffix(rawDir, subjName, sesName) % :type sesName: string % :output: - files are renamed by removing 'yyyymmddHHMM' date suffix + % and _stim files are zipped labels = {'func', 'bold', 'eeg', 'ieeg', 'meg', 'beh'}; From 42967aeaad3c9bbe8b572ddf5d2a8802cfdb9928 Mon Sep 17 00:00:00 2001 From: Ceren Date: Mon, 16 Nov 2020 16:13:14 +0100 Subject: [PATCH 06/10] suffix fix --- src/utils/removeAllDateSuffix.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/removeAllDateSuffix.m b/src/utils/removeAllDateSuffix.m index 0440094e..39e86bb1 100644 --- a/src/utils/removeAllDateSuffix.m +++ b/src/utils/removeAllDateSuffix.m @@ -4,6 +4,7 @@ function removeAllDateSuffix(rawDir, subjName, sesName) % % Function removes the date suffix in the _events and _stim (.tsv and .json) % files in given raw, session and subject folder. And zips the _stim files. + % Function will look for files with suffix of ``_date-yyyymmddHHMM`` % % USAGE:: % @@ -18,7 +19,7 @@ function removeAllDateSuffix(rawDir, subjName, sesName) % :param sesName: Some of the options can be ``ses-001`` or ``ses-003``. % :type sesName: string - % :output: - files are renamed by removing 'yyyymmddHHMM' date suffix + % :output: - files are renamed by removing '_date-yyyymmddHHMM' suffix % and _stim files are zipped labels = {'func', 'bold', 'eeg', 'ieeg', 'meg', 'beh'}; From 1436553f9f32f806e4faef4a81224983f0824c60 Mon Sep 17 00:00:00 2001 From: Ceren Date: Mon, 16 Nov 2020 16:16:25 +0100 Subject: [PATCH 07/10] removeDateSuffix.m doc added --- src/utils/removeDateSuffix.m | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/utils/removeDateSuffix.m b/src/utils/removeDateSuffix.m index ae5e8a80..33ac7470 100644 --- a/src/utils/removeDateSuffix.m +++ b/src/utils/removeDateSuffix.m @@ -2,27 +2,21 @@ function removeDateSuffix(filenames, subjectPath) % - % Short description of what the function does goes here. + % Function removes the date suffix in a given filename(s) + % Function will look for regular expression in filenames with ``_date-`` + % % USAGE:: % - % [argout1, argout2] = templateFunction(argin1, [argin2 == default,] [argin3]) - % - % :param argin1: (dimension) obligatory argument. Lorem ipsum dolor sit amet, - % consectetur adipiscing elit. Ut congue nec est ac lacinia. - % :type argin1: type - % :param argin2: optional argument and its default value. And some of the - % options can be shown in litteral like ``this`` or ``that``. - % :type argin2: string - % :param argin3: (dimension) optional argument - % :type argin3: integer - % - % :returns: - :argout1: (type) (dimension) - % - :argout2: (type) (dimension) + % removeDateSuffix(filenames, subjectPath) % - % removeDateSuffix(filenames, subjectPath) + % :param filenames: File names with _date- suffix + % :type filenames: string % + % :param subjectPath: Location/path of the files + % :type subjectPath: string % + % :output: - files are renamed by removing '_date-yyyymmddHHMM' suffix if isempty(filenames) filenames = {}; From d2220fca42d80e9b1574b93bd1ac068025be1472 Mon Sep 17 00:00:00 2001 From: CerenB Date: Mon, 16 Nov 2020 16:24:13 +0100 Subject: [PATCH 08/10] Update src/utils/removeDateSuffix.m Co-authored-by: Remi Gau --- src/utils/removeDateSuffix.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/removeDateSuffix.m b/src/utils/removeDateSuffix.m index 33ac7470..1ed96087 100644 --- a/src/utils/removeDateSuffix.m +++ b/src/utils/removeDateSuffix.m @@ -16,7 +16,7 @@ function removeDateSuffix(filenames, subjectPath) % :param subjectPath: Location/path of the files % :type subjectPath: string % - % :output: - files are renamed by removing '_date-yyyymmddHHMM' suffix + % :output: - files are renamed by removing '_date-*' suffix if isempty(filenames) filenames = {}; From 0f43fe65497a5189aa720710f57fb76c942bf045 Mon Sep 17 00:00:00 2001 From: CerenB Date: Mon, 16 Nov 2020 16:40:08 +0100 Subject: [PATCH 09/10] Update src/utils/removeAllDateSuffix.m --- src/utils/removeAllDateSuffix.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/removeAllDateSuffix.m b/src/utils/removeAllDateSuffix.m index 39e86bb1..7d96db8c 100644 --- a/src/utils/removeAllDateSuffix.m +++ b/src/utils/removeAllDateSuffix.m @@ -4,7 +4,7 @@ function removeAllDateSuffix(rawDir, subjName, sesName) % % Function removes the date suffix in the _events and _stim (.tsv and .json) % files in given raw, session and subject folder. And zips the _stim files. - % Function will look for files with suffix of ``_date-yyyymmddHHMM`` + % Function will look for files with suffix of ``_date-*`` % % USAGE:: % From 5e8a617260cddadd31978a46bbcd8f8ddacb34fc Mon Sep 17 00:00:00 2001 From: CerenB Date: Mon, 16 Nov 2020 16:40:18 +0100 Subject: [PATCH 10/10] Update src/utils/removeAllDateSuffix.m --- src/utils/removeAllDateSuffix.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/removeAllDateSuffix.m b/src/utils/removeAllDateSuffix.m index 7d96db8c..946cf4a6 100644 --- a/src/utils/removeAllDateSuffix.m +++ b/src/utils/removeAllDateSuffix.m @@ -19,7 +19,7 @@ function removeAllDateSuffix(rawDir, subjName, sesName) % :param sesName: Some of the options can be ``ses-001`` or ``ses-003``. % :type sesName: string - % :output: - files are renamed by removing '_date-yyyymmddHHMM' suffix + % :output: - files are renamed by removing '_date-*' suffix % and _stim files are zipped labels = {'func', 'bold', 'eeg', 'ieeg', 'meg', 'beh'};