Python arguments are equivalent to long-option arguments (--arg), unless otherwise specified. Flags are True/False arguments in Python. The manual for any gget tool can be called from the command-line using the -h --help flag.

gget cosmic 🪐

Search for genes, mutations, and other factors associated with cancer using the COSMIC (Catalogue Of Somatic Mutations In Cancer) database.
Return format: JSON (command-line) or data frame/CSV (Python).
This module was written by @AubakirovArman.

Positional argument
searchterm
Search term, which can be a mutation, gene name (or Ensembl ID), cancer type, tumor site, study ID, PubMed ID, or sample ID, as defined using the entity argument. Example: 'EGFR'

Optional arguments
-e --entity
'mutations' (default), 'genes', 'cancer', 'tumour site', 'studies', 'pubmed', or 'samples'.
Defines the type of the supplied search term.

-l --limit
Limits number of hits to return. Default: 100.

-o --out
Path to the file the results will be saved in, e.g. path/to/directory/results.csv (or .json). Default: Standard out.
Python: save=True will save the output in the current working directory.

Flags
-csv --csv
Command-line only. Returns results in CSV format.
Python: Use json=True to return output in JSON format.

-q --quiet
Command-line only. Prevents progress information from being displayed.
Python: Use verbose=False to prevent progress information from being displayed.

Example

gget cosmic -e genes EGFR
# Python
gget.cosmic("EGFR", entity="genes")

→ Returns the COSMIC hits for gene 'EGFR' in the format:

GeneAlternate IDsTested samplesSimple MutationsFusionsCoding Mutations...
EGFREGFR,ENST00000275493.6,...21028031900031900...
. . .. . .. . .. . .. . .. . .. . .