Skip to main content

Mutational signatures attribution and decomposition tool

Project description

License Build Status

SigProfilerAssignment

SigProfilerAssignment is a new mutational attribution and decomposition tool that performs the following functions:

  • Attributing a known set of mutational signatures to an individual sample or multiple samples.
  • Decomposing de novo signatures to COSMIC signature database.
  • Attributing COSMIC database or a custom signature database to given samples.

The tool identifies the activity of each signature in the sample and assigns the probability for each signature to cause a specific mutation type in the sample. The tool makes use of SigProfilerMatrixGenerator, SigProfilerExtractor and SigProfilerPlotting.

Installs

for installing from PyPi in new conda environment

$ pip install SigProfilerAssignment

Installing this package : git clone this repo or download the zip file. Unzip the contents of SigProfilerExtractor-master.zip or the zip file of a corresponding branch.

$ cd SigProfilerAssignment-master
$ pip install .

Decomposes the De Novo Signatures into COSMIC Signatures and assigns COSMIC signatures into samples

Decompose Fit

from SigProfilerAssignment import Analyzer as Analyze
Analyze.decompose_fit(samples,  output, signatures=None, signature_database=None,genome_build="GRCh37",  make_decomposition_plots=True, collapse_to_SBS96=True,connected_sigs=True, verbose=False)

De Novo Fit

from SigProfilerAssignment import Analyzer as Analyze
Analyze.denovo_fit(samples,  output, signatures=None, signature_database=None,genome_build="GRCh37",  make_decomposition_plots=True, collapse_to_SBS96=True,connected_sigs=True, verbose=False)

Cosmic Fit

from SigProfilerAssignment import Analyzer as Analyze
Analyze.cosmic_fit(samples,  output, signatures=None, signature_database=None,genome_build="GRCh37",  make_decomposition_plots=True, collapse_to_SBS96=True,connected_sigs=True, verbose=False)

Parameters

Parameter Variable Type Parameter Description
signatures String Path to a tab delimited file that contains the signaure table where the rows are mutation types and colunms are signature IDs.
activities String Path to a tab delimilted file that contains the activity table where the rows are sample IDs and colunms are signature IDs.
samples String Path to a tab delimilted file that contains the activity table where the rows are mutation types and colunms are sample IDs.
output String Path to the output folder.
genome_build String The genome type. Example: "GRCh37", "GRCh38", "mm9", "mm10". The default value is "GRCh37"
verbose Boolean Prints statements. Default value is False.

SPA analysis Example

#import modules
import SigProfilerAssignment as spa
from SigProfilerAssignment import Analyzer as Analyze

#set directories and paths to signatures and samples
dir_inp = spa.__path__[0]+'/data/Examples/'
signatures = dir_inp+"Results_scenario_8/SBS96/All_Solutions/SBS96_3_Signatures/Signatures/SBS96_S3_Signatures.txt"
activities=dir_inp+"Results_scenario_8/SBS96/All_Solutions/SBS96_3_Signatures/Activities/SBS96_S3_NMF_Activities.txt"
samples=dir_inp+"Input_scenario_8/Samples.txt"
output="output_example/"
sigs= "COSMIC_v3_SBS_GRCh37_noSBS84-85.txt" #Custom Signature Database

#Analysis of SP Assignment 
Analyze.cosmic_fit( samples, output, signatures=None,signature_database=sigs,genome_build="GRCh37", verbose=False)

Copyright

This software and its documentation are copyright 2022 as a part of the SigProfiler project. The SigProfilerAssignment framework is free software and is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Contact Information

Please address any queries or bug reports to Raviteja Vangara at rvangara@health.ucsd.edu

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

SigProfilerAssignment-0.0.3.tar.gz (3.4 MB view details)

Uploaded Source

Built Distribution

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

SigProfilerAssignment-0.0.3-py3-none-any.whl (3.4 MB view details)

Uploaded Python 3

File details

Details for the file SigProfilerAssignment-0.0.3.tar.gz.

File metadata

  • Download URL: SigProfilerAssignment-0.0.3.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.1

File hashes

Hashes for SigProfilerAssignment-0.0.3.tar.gz
Algorithm Hash digest
SHA256 41c13bc373dab367c25f7915aba42e6ea02389062e676fcf3ea9f8854044b396
MD5 de5f2b642b87d6c0ec16589f6c18b093
BLAKE2b-256 bc57ce6cc7421edcd9dbc25fd065ada3876b40244852290c9cf852e6dd3e2180

See more details on using hashes here.

File details

Details for the file SigProfilerAssignment-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: SigProfilerAssignment-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.1

File hashes

Hashes for SigProfilerAssignment-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 176c153def37486569be43f8461f340983636d2fcdd72a13675b5b57b38d0e48
MD5 f370da16536f3d730211c46e6803a137
BLAKE2b-256 d40a3ec44d6d52bb12aeed9b8190f3c556bf85bacdf54f26d8458eb80b184219

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