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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 239afb0e763394c34e96cb7126e82704e2cde831992e641b3188bec341cd6cef |
|
MD5 | 659407dc145544a573f17a204f62dcdb |
|
BLAKE2b-256 | 79c4ed14da5d80f43e136c7638db1341dda950f510b9e283f3233a8aa7aabf32 |
Hashes for SigProfilerAssignment-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f561bd7629702da4ac8646e561886ca546389296fbc37e78fc88285be7aec767 |
|
MD5 | a73d25ac2b33a01e3eb650993fee7da7 |
|
BLAKE2b-256 | 9d561968aaf35ec8597df716ebb6c5cbca6a61892f8a293150f312985a500231 |