-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/populate criteria #42
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only some nits
src/catalogue.rs
Outdated
let group_key = if group_key == "patient" || group_key == "donor" { | ||
"patients" | ||
} else if group_key == "tumor_classification" { | ||
"diagnosis" | ||
} else if group_key == "biosamples" { | ||
} else if group_key == "biosamples" || group_key == "sample" { | ||
"specimen" | ||
} else { | ||
&group_key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would look much nicer with a match
counts | ||
.get(key1) | ||
.and_then(|group| group.get(key2)) | ||
counts.get(key1).and_then(|group| group.get(key2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like and_then
but when you return an Option
you can also use ?
and just chain the operations which is a bit nicer. If you decide to change it also do it for the get_element
function
No description provided.