From 7c4de2648bd41af9257f1b3869c64d8182394f61 Mon Sep 17 00:00:00 2001 From: delavega4 Date: Tue, 12 Nov 2019 15:45:49 -0500 Subject: [PATCH 1/6] Change AutoContrasts to DummyContrasts --- docs/examples/models.rst | 2 +- docs/model.rst | 2 +- examples/models/ds000003/models/model-001_smdl.json | 4 ++-- examples/models/ds000030/models/model-001_smdl.json | 2 +- examples/models/ds000114/models/model-001_smdl.json | 2 +- examples/models/ds000117/models/model-001_smdl.json | 4 ++-- examples/notebooks/ds003_sample_analysis.ipynb | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/examples/models.rst b/docs/examples/models.rst index f5c8207e..9fa382c0 100644 --- a/docs/examples/models.rst +++ b/docs/examples/models.rst @@ -20,7 +20,7 @@ The ``Model.X`` section demonstrates selection of regressors for the design matrix, and ``Contrasts`` shows how to perform a simple contrast between two conditions. -At the ``dataset`` level, the ``AutoContrasts`` option demonstrates taking +At the ``dataset`` level, the ``DummyContrasts`` option demonstrates taking a simple mean at the group level. .. raw:: html diff --git a/docs/model.rst b/docs/model.rst index 5ef60058..36ad4110 100644 --- a/docs/model.rst +++ b/docs/model.rst @@ -123,7 +123,7 @@ In this case, we can use an ``AutoContrast`` to make a very simple final step: { "Level": "Dataset", - "AutoContrasts": ["a_vs_b"] + "DummyContrasts": ["a_vs_b"] } This is equivalent to the more verbose: diff --git a/examples/models/ds000003/models/model-001_smdl.json b/examples/models/ds000003/models/model-001_smdl.json index 0311a699..ef67c030 100644 --- a/examples/models/ds000003/models/model-001_smdl.json +++ b/examples/models/ds000003/models/model-001_smdl.json @@ -30,7 +30,7 @@ "a_comp_cor_03", "a_comp_cor_04", "a_comp_cor_05" ] }, - "AutoContrasts": ["trial_type.word", "trial_type.pseudoword"], + "DummyContrasts": ["trial_type.word", "trial_type.pseudoword"], "Contrasts": [ { "Name": "word_gt_pseudo", @@ -54,7 +54,7 @@ }, { "Level": "dataset", - "AutoContrasts": ["word_gt_pseudo", "task_vs_baseline"], + "DummyContrasts": ["word_gt_pseudo", "task_vs_baseline"], "Contrasts":[ { "Name": "any_words", diff --git a/examples/models/ds000030/models/model-001_smdl.json b/examples/models/ds000030/models/model-001_smdl.json index 3ac4166d..7bb2810a 100644 --- a/examples/models/ds000030/models/model-001_smdl.json +++ b/examples/models/ds000030/models/model-001_smdl.json @@ -62,7 +62,7 @@ }, { "Level": "dataset", - "AutoContrasts": ["accept_vs_explode"] + "DummyContrasts": ["accept_vs_explode"] } ] } diff --git a/examples/models/ds000114/models/model-001_smdl.json b/examples/models/ds000114/models/model-001_smdl.json index 08f5b2b3..ae54e87a 100644 --- a/examples/models/ds000114/models/model-001_smdl.json +++ b/examples/models/ds000114/models/model-001_smdl.json @@ -81,7 +81,7 @@ }, { "Level": "dataset", - "AutoContrasts": ["session_diff"] + "DummyContrasts": ["session_diff"] } ] } diff --git a/examples/models/ds000117/models/model-001_smdl.json b/examples/models/ds000117/models/model-001_smdl.json index 23a41e83..6a17135f 100644 --- a/examples/models/ds000117/models/model-001_smdl.json +++ b/examples/models/ds000117/models/model-001_smdl.json @@ -51,11 +51,11 @@ }, { "Level": "subject", - "AutoContrasts": ["face_vs_scram"] + "DummyContrasts": ["face_vs_scram"] }, { "Level": "dataset", - "AutoContrasts": ["face_vs_scram"] + "DummyContrasts": ["face_vs_scram"] } ] } diff --git a/examples/notebooks/ds003_sample_analysis.ipynb b/examples/notebooks/ds003_sample_analysis.ipynb index 6818c327..5e81f22d 100644 --- a/examples/notebooks/ds003_sample_analysis.ipynb +++ b/examples/notebooks/ds003_sample_analysis.ipynb @@ -374,7 +374,7 @@ " },\n", " {\n", " \"Level\": \"dataset\",\n", - " \"AutoContrasts\": [\"word_gt_pseudo\", \"task_vs_baseline\"]\n", + " \"DummyContrasts\": [\"word_gt_pseudo\", \"task_vs_baseline\"]\n", " }\n", " ]\n", "}\n" From 176b17506d523447d0c0626ecb2710f23ebd04d3 Mon Sep 17 00:00:00 2001 From: delavega4 Date: Thu, 14 Nov 2019 14:41:17 -0500 Subject: [PATCH 2/6] PIN: Pybids --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index d4e0dfc2..c0122e4c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,7 @@ install_requires = pandas>=0.19 tables>=3.2.1 nistats>=0.0.1b0 - pybids>=0.9.4 + pybids @ git+https://github.com/bids-standard/pybids.git@476cd2c jinja2 [options.extras_require] From 446d58142ffefc88503bc0bd826eb372423655d5 Mon Sep 17 00:00:00 2001 From: delavega4 Date: Thu, 14 Nov 2019 16:31:52 -0500 Subject: [PATCH 3/6] Pin to fixed version --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index c0122e4c..c2193262 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,7 @@ install_requires = pandas>=0.19 tables>=3.2.1 nistats>=0.0.1b0 - pybids @ git+https://github.com/bids-standard/pybids.git@476cd2c + pybids @ git+https://github.com/bids-standard/pybids.git@fix/dummy jinja2 [options.extras_require] From 7da47d33de03c98fa73090fe1455f09c48ec40f7 Mon Sep 17 00:00:00 2001 From: delavega4 Date: Thu, 14 Nov 2019 16:41:54 -0500 Subject: [PATCH 4/6] Fix example models --- examples/models/ds000003/models/model-001_smdl.json | 10 ++++++++-- examples/models/ds000030/models/model-001_smdl.json | 5 ++++- examples/models/ds000114/models/model-001_smdl.json | 5 ++++- examples/models/ds000117/models/model-001_smdl.json | 10 ++++++++-- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/examples/models/ds000003/models/model-001_smdl.json b/examples/models/ds000003/models/model-001_smdl.json index ef67c030..c09e6c26 100644 --- a/examples/models/ds000003/models/model-001_smdl.json +++ b/examples/models/ds000003/models/model-001_smdl.json @@ -30,7 +30,10 @@ "a_comp_cor_03", "a_comp_cor_04", "a_comp_cor_05" ] }, - "DummyContrasts": ["trial_type.word", "trial_type.pseudoword"], + "DummyContrasts": { + "Conditions": ["trial_type.word", "trial_type.pseudoword"], + "Type": "t" + }, "Contrasts": [ { "Name": "word_gt_pseudo", @@ -54,7 +57,10 @@ }, { "Level": "dataset", - "DummyContrasts": ["word_gt_pseudo", "task_vs_baseline"], + "DummyContrasts": { + "Conditions": ["word_gt_pseudo", "task_vs_baseline"], + "Type": "t" + }, "Contrasts":[ { "Name": "any_words", diff --git a/examples/models/ds000030/models/model-001_smdl.json b/examples/models/ds000030/models/model-001_smdl.json index 7bb2810a..70e470af 100644 --- a/examples/models/ds000030/models/model-001_smdl.json +++ b/examples/models/ds000030/models/model-001_smdl.json @@ -62,7 +62,10 @@ }, { "Level": "dataset", - "DummyContrasts": ["accept_vs_explode"] + "DummyContrasts": { + "Conditions": ["accept_vs_explode"], + "Type": "t" + } } ] } diff --git a/examples/models/ds000114/models/model-001_smdl.json b/examples/models/ds000114/models/model-001_smdl.json index ae54e87a..89fa870b 100644 --- a/examples/models/ds000114/models/model-001_smdl.json +++ b/examples/models/ds000114/models/model-001_smdl.json @@ -81,7 +81,10 @@ }, { "Level": "dataset", - "DummyContrasts": ["session_diff"] + "DummyContrasts": { + "Conditions": ["session_diff"], + "Type": "t" + } } ] } diff --git a/examples/models/ds000117/models/model-001_smdl.json b/examples/models/ds000117/models/model-001_smdl.json index 6a17135f..36c116d9 100644 --- a/examples/models/ds000117/models/model-001_smdl.json +++ b/examples/models/ds000117/models/model-001_smdl.json @@ -51,11 +51,17 @@ }, { "Level": "subject", - "DummyContrasts": ["face_vs_scram"] + "DummyContrasts": { + "Conditions": ["face_vs_scram"], + "Type": "FEMA" + } }, { "Level": "dataset", - "DummyContrasts": ["face_vs_scram"] + "DummyContrasts": { + "Conditions": ["face_vs_scram"], + "Type": "t" + } } ] } From 736d2b0610bfc6dff8f7bead038c03361ee66e4e Mon Sep 17 00:00:00 2001 From: delavega4 Date: Thu, 14 Nov 2019 16:43:32 -0500 Subject: [PATCH 5/6] Update notebook --- .../notebooks/ds003_sample_analysis.ipynb | 161 ++++++++++-------- 1 file changed, 94 insertions(+), 67 deletions(-) diff --git a/examples/notebooks/ds003_sample_analysis.ipynb b/examples/notebooks/ds003_sample_analysis.ipynb index 5e81f22d..c4d039fd 100644 --- a/examples/notebooks/ds003_sample_analysis.ipynb +++ b/examples/notebooks/ds003_sample_analysis.ipynb @@ -312,72 +312,93 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{\n", - " \"Name\": \"ds003_model001\",\n", - " \"Description\": \"\",\n", - " \"Input\": {\n", - " \"task\": \"rhymejudgment\"\n", - " },\n", - " \"Steps\": [\n", - " {\n", - " \"Level\": \"run\",\n", - " \"Transformations\": [\n", - " {\n", - " \"Name\": \"Factor\",\n", - " \"Input\": [\n", - " \"trial_type\"\n", - " ]\n", - " },\n", - " {\n", - " \"Name\": \"Convolve\",\n", - " \"Input\": [\"trial_type.word\", \"trial_type.pseudoword\"],\n", - " \"Model\": \"spm\"\n", - " }\n", - " ],\n", - " \"Model\": {\n", - " \"X\": [\n", - " \"trial_type.word\",\n", - " \"trial_type.pseudoword\",\n", - " \"framewise_displacement\",\n", - " \"trans_x\", \"trans_y\", \"trans_z\", \"rot_x\", \"rot_y\", \"rot_z\",\n", - " \"a_comp_cor_00\", \"a_comp_cor_01\", \"a_comp_cor_02\",\n", - " \"a_comp_cor_03\", \"a_comp_cor_04\", \"a_comp_cor_05\"\n", - " ]\n", - " },\n", - " \"Contrasts\": [\n", - " {\n", - " \"Name\": \"word_gt_pseudo\",\n", - " \"ConditionList\": [\n", - " \"trial_type.word\",\n", - " \"trial_type.pseudoword\"\n", - " ],\n", - " \"Weights\": [1, -1],\n", - " \"Type\": \"t\"\n", - " },\n", - " {\n", - " \"Name\": \"task_vs_baseline\",\n", - " \"ConditionList\": [\n", - " \"trial_type.word\",\n", - " \"trial_type.pseudoword\"\n", - " ],\n", - " \"Weights\": [0.5, 0.5],\n", - " \"Type\": \"t\"\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"Level\": \"dataset\",\n", - " \"DummyContrasts\": [\"word_gt_pseudo\", \"task_vs_baseline\"]\n", - " }\n", - " ]\n", - "}\n" + "{\r\n", + " \"Name\": \"ds003_model001\",\r\n", + " \"Description\": \"\",\r\n", + " \"Input\": {\r\n", + " \"task\": \"rhymejudgment\"\r\n", + " },\r\n", + " \"Steps\": [\r\n", + " {\r\n", + " \"Level\": \"run\",\r\n", + " \"Transformations\": [\r\n", + " {\r\n", + " \"Name\": \"Factor\",\r\n", + " \"Input\": [\r\n", + " \"trial_type\"\r\n", + " ]\r\n", + " },\r\n", + " {\r\n", + " \"Name\": \"Convolve\",\r\n", + " \"Input\": [\"trial_type.word\", \"trial_type.pseudoword\"],\r\n", + " \"Model\": \"spm\"\r\n", + " }\r\n", + " ],\r\n", + " \"Model\": {\r\n", + " \"X\": [\r\n", + " \"trial_type.word\",\r\n", + " \"trial_type.pseudoword\",\r\n", + " \"framewise_displacement\",\r\n", + " \"trans_x\", \"trans_y\", \"trans_z\", \"rot_x\", \"rot_y\", \"rot_z\",\r\n", + " \"a_comp_cor_00\", \"a_comp_cor_01\", \"a_comp_cor_02\",\r\n", + " \"a_comp_cor_03\", \"a_comp_cor_04\", \"a_comp_cor_05\"\r\n", + " ]\r\n", + " },\r\n", + " \"DummyContrasts\": {\r\n", + " \"Conditions\": [\"trial_type.word\", \"trial_type.pseudoword\"],\r\n", + " \"Type\": \"t\"\r\n", + " },\r\n", + " \"Contrasts\": [\r\n", + " {\r\n", + " \"Name\": \"word_gt_pseudo\",\r\n", + " \"ConditionList\": [\r\n", + " \"trial_type.word\",\r\n", + " \"trial_type.pseudoword\"\r\n", + " ],\r\n", + " \"Weights\": [1, -1],\r\n", + " \"Type\": \"t\"\r\n", + " },\r\n", + " {\r\n", + " \"Name\": \"task_vs_baseline\",\r\n", + " \"ConditionList\": [\r\n", + " \"trial_type.word\",\r\n", + " \"trial_type.pseudoword\"\r\n", + " ],\r\n", + " \"Weights\": [0.5, 0.5],\r\n", + " \"Type\": \"t\"\r\n", + " }\r\n", + " ]\r\n", + " },\r\n", + " {\r\n", + " \"Level\": \"dataset\",\r\n", + " \"DummyContrasts\": {\r\n", + " \"Conditions\": [\"word_gt_pseudo\", \"task_vs_baseline\"],\r\n", + " \"Type\": \"t\"\r\n", + " },\r\n", + " \"Contrasts\":[\r\n", + " {\r\n", + " \"Name\": \"any_words\",\r\n", + " \"ConditionList\": [\r\n", + " \"trial_type.word\",\r\n", + " \"trial_type.pseudoword\"\r\n", + " ],\r\n", + " \"Weights\": [\r\n", + " [1, 0],\r\n", + " [0, 1]\r\n", + " ],\r\n", + " \"Type\": \"F\"\r\n", + " }\r\n", + " ]\r\n", + " }\r\n", + " ]\r\n", + "}\r\n" ] } ], @@ -2999,15 +3020,21 @@ ], "metadata": { "kernelspec": { - "display_name": "Bash", - "language": "bash", - "name": "bash" + "display_name": "Python 3", + "language": "python", + "name": "python3" }, "language_info": { - "codemirror_mode": "shell", - "file_extension": ".sh", - "mimetype": "text/x-sh", - "name": "bash" + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.8" }, "sos": { "kernels": [ From f0ede0c30dd55f385d0f0fd62ec2782ceff818c9 Mon Sep 17 00:00:00 2001 From: delavega4 Date: Fri, 15 Nov 2019 09:18:57 -0500 Subject: [PATCH 6/6] Bump pybids PIN --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index c2193262..a2dd8be7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,7 @@ install_requires = pandas>=0.19 tables>=3.2.1 nistats>=0.0.1b0 - pybids @ git+https://github.com/bids-standard/pybids.git@fix/dummy + pybids @ git+https://github.com/bids-standard/pybids.git@4cdcb0d jinja2 [options.extras_require]