DrSAR / SARlabpy

git clone git@pfeifer.phas.ubc.ca:SARlabpy (do not push to github, please)
http://code.SARlab.ca
Other
1 stars 0 forks source link

Need a way to exclude patients from masterlist but not remove the entry #336

Closed firasm closed 9 years ago

firasm commented 9 years ago

So here's the problem:

If you know that a particular patient will not be useful for any analysis, you'd want to exclude the patient from the analysis but still keep the relevant notes in the masterlist for why the patient was excluded.

The problem is, that the parser is too smart for its own good. And even if you put some patients embedded as a subsection within the general section, it still gets read as a proper patient.

So for instance if I load the masterlist, pop the general section (my intention is to remove the general and all subsections) and then iterate over the keys, somehow the patients that appear as subsections still appear as regular patients.

How should we avoid or work around this issue?

Should we do it at the top level and in the configobj by ignoring the patients that are in the exclude section?

Should I take care of this on my end and in my functions exclude patients that appear in the general section?

I think an example would be good... Let me whip something up in a few

DrSAR commented 9 years ago

I think I'm starting to see the problem. How about a patient specific tag ignore=true or something?

firasm commented 9 years ago

So in my efforts to reproduce the issue I found, I seem to have find a solution.

This does not work:

screen shot 2015-06-13 at 12 17 11 am

But (contrary to what I have posted above in my initial issue submit) this scheme works:

screen shot 2015-06-13 at 12 17 32 am

firasm commented 9 years ago

I'll close this for now, and leave as-is.