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
Expand CLI #208
Expand CLI #208
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.
Nice job @adrosenbaum . Could you add some tests for the new mixin classes? Also there is a dependency problem on travis, maybe you saw it?
chanjo/calculate.py
Outdated
TranscriptStat.transcript, | ||
).filter( | ||
TranscriptStat.sample_id.in_(sample_ids), | ||
Transcript.gene_id.in_(OMIM_GENE_IDS), |
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.
Have you checked the performance for this query? Feels like it can take some time to calculate?
chanjo/cli/db.py
Outdated
|
||
|
||
@db_cmd.command() | ||
@click.option('--group-id', '-g') |
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.
Could you add a help what this option means?
@click.option('--sample-id', '-s') | ||
@click.option('--pretty', '-p', is_flag=True) | ||
@click.pass_context | ||
def samples(context, group_id, sample_id, pretty): |
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.
What happens if samples=None or of the sample does not exists? Could you add a test or two?
You feel ready with this @adrosenbaum ? |
Yes, I'm only working on some listing issues I missed. However I'm thinking of testing this before by installing chanjo on its own condo environment on hasta. I'll let you know when this is done. |
@moonso this is ready to be deployed I think. |
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.
Looks good!
We need to decouple chanjo from cg. This requires that all operations that cg does through the chanjo API can be made from the CLI.
** How to test **
chanjo db samples -g <case_id> --pretty
chanjo db samples -s <sample_id> --pretty
chanjo calculate coverage -s <sample_id_1> -s <sample_id_2> --omim --pretty
Expected results
chanjo db samples -g <case_id> --pretty
should return all samples in the casechanjo db samples -s <sample_id> --pretty
should return the samplechanjo calculate coverage -s <sample_id_1> -s <sample_id_2> --omim --pretty
Should return the mean coverage, and completeness for the samplesReview:
This is a minor version change because new functionality is added in a backward compatible manner