Skip to content
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

use cancer type in CIViC results #28

Merged
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/usage.rst
HomoPolyethylen marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ A typical command to query the `Clinical Interpretations of Variants in Cancer -
-v input_file.vcf \
-o outdir \
-g ref_genome [GRCh37, GRCh38, NCBI36]
-d 'breast adenocarcinoma'

The command above generates the following result files using `CIViCpy <https://docs.civicpy.org/>`_.

Expand All @@ -193,6 +194,8 @@ The querynator performs an ``exact`` search, meaning that variants in the KB mus

Using the ``filter_vep`` `flag <https://querynator.readthedocs.io/en/latest/usage.html#filtering-benign-variants>`_, the querynator can filter out benign variants in ``vcf`` files before querying the KB.

The cancer type must be a valid `Disease Ontology <https://disease-ontology.org/>`_ ID (DOID) or name.

Input file format
==================

Expand Down
11 changes: 9 additions & 2 deletions querynator/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,14 @@ def query_api_cgi(mutations, cnas, translocations, cancer, genome, token, email,
show_default=True,
default=False,
)
def query_api_civic(vcf, outdir, genome, filter_vep):
@click.option(
"-c",
"--cancer",
help="the cancer DOID (id or name) to be searched.",
default=None,
type=click.STRING,
)
def query_api_civic(vcf, outdir, genome, cancer_doid, filter_vep):
try:
result_dir = get_unique_querynator_dir(f"{outdir}")
dirname, basename = os.path.split(result_dir)
Expand All @@ -440,7 +447,7 @@ def query_api_civic(vcf, outdir, genome, filter_vep):

logger.info("Query the Clinical Interpretations of Variants In Cancer (CIViC)")
# run analysis
query_civic(candidate_variants, result_dir, logger, vcf, genome, filter_vep)
query_civic(candidate_variants, result_dir, logger, vcf, genome, cancer_doid, filter_vep)

else:
logger.info("Query the Clinical Interpretations of Variants In Cancer (CIViC)")
Expand Down
Loading
Loading