Mutational signatures attribution and decomposition tool
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for SigProfilerAssignment-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 566abc2759da994500316c98318750133d3df81713c58a633afd671437d928bf |
|
MD5 | b494c70a909865e1736c8e08cff06b58 |
|
BLAKE2b-256 | cd7fd5949b0e1a6099a309d6c3cf5e7da3eecc22fdab13d7fbccf91fc5455bbc |
Hashes for SigProfilerAssignment-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 141f2bfd742258df8931fa66a2886a7885c7ef75b7b40c556bc1e24f61c1711a |
|
MD5 | 8faee55389aa7a3bff1c0bf3b56691f1 |
|
BLAKE2b-256 | eb80f1205274c434ee073d26adb94743b425d82a6fbbb3d5445454139f8e095e |