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

Profile format changed to be less tall and more wide, like mAFQ #279

Merged
merged 1 commit into from
Jun 29, 2020

Conversation

36000
Copy link
Collaborator

@36000 36000 commented Jun 26, 2020

Instead of a scalar column with the names "dti_fa", "dti_md" and a profiles column with their corresponding values, each scalar gets its own column. closes #277

@@ -192,7 +192,7 @@ def test_AFQ_data_waypoint():
'sub-01_sess-01_dwi_space-RASMM_model-DTI_desc-det-AFQ-clean_tractography_idx.json')) # noqa

tract_profiles = pd.read_csv(myafq.tract_profiles[0])
assert tract_profiles.shape == (800, 5)
assert tract_profiles.shape == (400, 5)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm. Why are there only half the numbers here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Two columns were removed: scalar and profile. scalar was the label (ie "dti_fa") and profile was the number. Now, instead, there are two columns of numbers: "dti_md", "dti_fa". This means it is only half the length. For each node, there is only one row instead of one for each scalar.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Gotcha! That makes sense.

Copy link
Collaborator

@arokem arokem left a comment

Choose a reason for hiding this comment

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

In general, I am not sure that I like this change. Maybe we should change the way things get converted from mAFQ into AFQ-Insight instead? WDYT @richford? Is there any particular reason to prefer long over wide or vice versa?

@richford
Copy link
Collaborator

No reason other than the appeal to tidy data. That's just the format that we used for AFQ-Browser and AFQ-Insight. Inside of AFQ-insight, we want the feature matrix to be wide (n x p, where n in the number of subjects and p is the number of features), but I can definitely do that conversion inside of AFQ-Insight. I don't remember if we had good reasons to prefer the wide format inside of AFQ-Browser other than the appeal to tidy data.

@richford
Copy link
Collaborator

Sorry for the lingo. I'm referring to this definition of tidy. Hadley gets extra points for the Tolstoy quote.

@arokem
Copy link
Collaborator

arokem commented Jun 27, 2020

OK - sounds good. Let's go with the wide format proposed here (and already implemented in AFQ-Browser and AFQ-Insight).

Only still need to understand the changes introduced in the tests, but otherwise, LGTM.

@arokem
Copy link
Collaborator

arokem commented Jun 29, 2020

With that question, I believe this is ready to merge? Is it rebased on master?

@36000
Copy link
Collaborator Author

36000 commented Jun 29, 2020

I just rebased it. I believe it can merge when these checks complete.

@arokem arokem merged commit 94bae29 into yeatmanlab:master Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Profile output format in CSV should match mAFQ (more wide)
3 participants