broadinstitute / gdctools

Python and UNIX CLI utilities to simplify interaction with the NIH/NCI Genomics Data Commons
Other
31 stars 4 forks source link

Move and update counting #28

Closed dheiman closed 7 years ago

dheiman commented 7 years ago

Pull Request Template

Squashing what is hopefully the last counting bug. This should fully resolve #21.

Style Checklist

Please ensure that your pull request meets the following standards for quality. Code should not be merged into the master branch until all of these criteria have been satisfied.

Comments

Style/Execution

dheiman commented 7 years ago

The final TODO for this branch is moving combined counting upstream from gdc_report.

noblem commented 7 years ago

Looks pretty nice! One question about approach: in lib/meta.py I liked the introduction of the named tuple, but in the tumor_code() method, why keep the code "as is" b/c it defines the data structure every time it's called? Why not define the structure once, outside the method, since it's invariant across the life of a tool's execution (and actually changes very little over time, in general)?

dheiman commented 7 years ago

I absolutely agree that the data structures should be defined outside of the function definitions - it's just something I planned to do en masse as a later code cleanup, as it occurs throughout the codebase.

On Fri, Mar 24, 2017 at 1:22 PM, noblem notifications@github.com wrote:

Looks pretty nice! One question about approach: in lib/meta.py I liked the introduction of the named tuple, but in the tumor_code() method, why keep the code "as is" b/c it defines the data structure every time it's called? Why not define the structure once, outside the method, since it's invariant across the life of a tool's execution (and actually changes very little over time, in general)?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/broadinstitute/gdctools/pull/28#issuecomment-289087378, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLBxWk_p6NAh6qEmOuD7YvmemuTmEIUks5ro_vNgaJpZM4MoSS_ .

noblem commented 7 years ago

ok, make sense