Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

updated so that it can handle non-Measure line in stats header #1

Merged
merged 1 commit into from May 6, 2020

Conversation

soichih
Copy link
Contributor

@soichih soichih commented May 5, 2020

This module was failing on my freesurfer output - as there is a non-Meausre line (# BrainVolStatsFixed-NotNeeded because voxelvolume=1mm3) mixed inside a list of Measures

# SUBJECTS_DIR /N/dc2/scratch/hayashis/bigred3-workflows/5eb0689676c10ead933d673c/5eb068b076c10e7b013d673f
# anatomy_type surface
# subjectname output
# hemi lh
# AnnotationFile ../label/lh.aparc.annot
# AnnotationFileTimeStamp 2020/05/04 21:58:14
# Measure Cortex, NumVert, Number of Vertices, 118968, unitless
# Measure Cortex, WhiteSurfArea, White Surface Total Area, 84858.5, mm^2
# Measure Cortex, MeanThickness, Mean Thickness, 2.39891, mm
# BrainVolStatsFixed-NotNeeded because voxelvolume=1mm3
# Measure BrainSeg, BrainSegVol, Brain Segmentation Volume, 1169408.000000, mm^3
# Measure BrainSegNotVent, BrainSegVolNotVent, Brain Segmentation Volume Without Ventricles, 1157593.000000, mm^3
# Measure BrainSegNotVentSurf, BrainSegVolNotVentSurf, Brain Segmentation Volume Without Ventricles from Surf, 1157593.000000, mm^3
# Measure Cortex, CortexVol, Total cortical gray matter volume, 454587.696158, mm^3
# Measure SupraTentorial, SupraTentorialVol, Supratentorial volume, 1023873.000000, mm^3
# Measure SupraTentorialNotVent, SupraTentorialVolNotVent, Supratentorial volume, 1012058.000000, mm^3
# Measure EstimatedTotalIntraCranialVol, eTIV, Estimated Total Intracranial Volume, 1420434.160521, mm^3
# NTableCols 10
# TableCol  1 ColHeader StructName
# TableCol  1 FieldName Structure Name

The patch simply check to see if there is valid regex match and if not skip the line.

@fphammerle
Copy link
Owner

Great, thanks @soichih !

Unfortunately, I forgot to make this library compatible with pandas v1, test against python 3.8 and add a license. Just added that today.

Could you rebase your branch?

@soichih
Copy link
Contributor Author

soichih commented May 6, 2020

Re-based

@fphammerle
Copy link
Owner

Thanks!

You additionally added a merge commit ( 7c54efe ) on top of the new commit 5b1985b

The diff of your PR now also shows my commits: https://github.com/fphammerle/freesurfer-stats/pull/1/files

Could you remove the merge commit?

git reset --hard 5b1985b2238120909801d19c16443557ab559948 && git push -f

@soichih
Copy link
Contributor Author

soichih commented May 6, 2020 via email

@fphammerle
Copy link
Owner

Yes, thanks!

@fphammerle
Copy link
Owner

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants