Skip to main content

Tumor genomic subtyping using mutational signatures

Project description

GS-PRACTICE (Genomic Subtyping and Predictive Response Analysis for Cancer Tumor ICi Efficacy)

Tumor genomic subtyping tool based on mutational signatures for cancer samples.
See the corresponding paper for details.


Overview of the pipeline


Requirements

Python >= 3.7

  • numpy
  • numba
  • scikit_learn
  • joblib
  • umap_learn
  • pandas
  • matplotlib
  • rpy2

Please see requirements.txt for detailed versions.

R >= 3.6

  • MutationalPatterns
  • BSgenome.Hsapiens.UCSC.hg38
  • BSgenome.Hsapiens.UCSC.hg19

Please see r_requirements.txt for detailed versions.
These have been tested on mac OSX and Linux.


Installation

To avoid package dependency issues, I recommend installation in a virtual environment created with anaconda, miniconda, miniforge, pyenv etc.

cd GS-PRACTICE
python setup.py install

Or, from PyPI,

pip install GS-PRACTICE

Then,

pip install -r requirements.txt

After install R enviroments,

pip install rpy2

Preparations

Make classifiers in your environment

After installing the requirements, you should configure classifiers and umap projector in your environment and save them as joblib files.
By default, joblib files named KNN, SVC, RFC, LRC, and UMAP_projector are generated in gspractice/data directory.

gs-makeclfs

Check that R works

Before using rpy2, you should check the behavior of R in your environment.
For example,

cd tests/R_script_for_test
Rscript MutationalPatterns_from_single_vcf.R
Rscript MutationalPatterns_from_list.R
Rscript MutationalPatterns_from_maf.R

Usage

gs-practice -i {input_file} -o {output_prefix} 

Input files

VCF file(version >= 4.0) or MAF file after somatic mutation calling are accepted.
VCF file needs to contain a header starting with "##fileformat=VCFv**".
MAF file needs to contain columns named "Hugo_Symbol", "Chromosome", "Start_Position", "End_Position", "Variant_Type", "Reference_Allele", "Tumor_Seq_Allele1", "Tumor_Seq_Allele2" and "Tumor_Sample_Barcode".
The default genome version is GRCh38 (hg38), but GRCh37 (hg19) is also accepted if you specify the option -gv hg19.

  • single VCF file (end with ***.vcf)
  • list of paths to multiple VCF files (end with ***.list)
  • MAF file (end with ***.maf)

Example

gs-practice -i input.vcf -o output_prefix [-sn samplename ]
gs-practice -i vcffiles.list -o output_prefix [-snl samplenames.list]
gs-practice -i input.maf -o output_prefix

Output files

{output_prefix}_decomposed.tsv
{output_prefix}_prediction.txt
{output_prefix}_umap.png

Test

cd tests
bash test_run.sh

This will generates the following files in the "tests/output" directory


Getting Help

gs-practice -h

Notes

  • If you want, you can change hyper parameters of classifiers by directly editing the script "gspractice/makeclfs.py".
  • You may use the tool without installation if you satisfy the requirements.
python src/gspractice/makeclfs.py
python src/gspractice/run_gspractice.py -h
python src/gspractice/run_gspractice.py -i {input_file} -o {output_prefix}

Citation

Currently, the corresonding paper is published as a preprint in MedRxiv.
Mutation burden-orthogonal tumor genomic subtypes delineate responses to immune checkpoint therapy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

GS-PRACTICE-1.0.1.tar.gz (13.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

GS_PRACTICE-1.0.1-py3-none-any.whl (7.5 MB view details)

Uploaded Python 3

File details

Details for the file GS-PRACTICE-1.0.1.tar.gz.

File metadata

  • Download URL: GS-PRACTICE-1.0.1.tar.gz
  • Upload date:
  • Size: 13.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for GS-PRACTICE-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3b2c6b573c8df4f4bd5faea22f3a4cec8804e30763ff842e75765b20eee23f38
MD5 bd9a74ac89a7200073abe22ded418968
BLAKE2b-256 4877e859db615a6e243648e53e9c00a23bc2da31211fcfedfd5e0e01dd24075c

See more details on using hashes here.

File details

Details for the file GS_PRACTICE-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: GS_PRACTICE-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for GS_PRACTICE-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ea458ce80c489b632a632ba99bc88b273d60bafbe45b1d851935afaf861826c
MD5 90eace3c7fe487093c0a8162d2eb579d
BLAKE2b-256 80da6ccf08a74ea4fc85fbe76417235f5bdef5e04dbd8baa9ac2164e2f3e40b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page