### Download Example Data Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/docs/2. Quick Start Example.md Command to download the example dataset '21BRCA.zip' using wget. ```bash $ wget ftp://alexandrovlab-ftp.ucsd.edu/pub/tools/SigProfilerExtractor/Example_data/21BRCA.zip ``` -------------------------------- ### Running SigProfilerExtractor (Matrix) Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/docs/2. Quick Start Example.md Python commands to import SigProfilerExtractor and run the extraction with matrix input. ```python >>> from SigProfilerExtractor import sigpro as sig >>> sig.sigProfilerExtractor("matrix", "results", "path/to/21BRCA.txt", reference_genome="GRCh37", minimum_signatures=1, maximum_signatures=10, nmf_replicates=100, cpu=-1) ``` -------------------------------- ### Running SigProfilerExtractor (VCF) Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/docs/2. Quick Start Example.md Python commands to import SigProfilerExtractor and run the extraction with VCF input. ```python >>> from SigProfilerExtractor import sigpro as sig >>> sig.sigProfilerExtractor("vcf", "results", "path/to/21BRCA_vcf", genome_build="GRCh37", minimum_signatures=1, maximum_signatures=10, nmf_replicates=100) ``` -------------------------------- ### Install from PyPI Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/wikies/Installation.md Install SigProfilerExtractor using pip. ```bash pip install SigProfilerExtractor ``` -------------------------------- ### Install from source Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/wikies/Installation.md Clone the repository and install SigProfilerExtractor from source. ```bash git clone https://github.com/SigProfilerSuite/SigProfilerExtractor.git cd SigProfilerExtractor pip install . ``` -------------------------------- ### Install reference genomes Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/wikies/Installation.md Install at least one reference genome using SigProfilerMatrixGenerator. ```python from SigProfilerMatrixGenerator import install as genInstall genInstall.install("GRCh37") ``` -------------------------------- ### Example: Matrix Input Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/wikies/CLI-Usage.md An example of using SigProfilerExtractor with matrix input data. ```bash SigProfilerExtractor sigprofilerextractor matrix example_output /path/to/Samples_SBS.txt --minimum_signatures 1 --maximum_signatures 3 ``` -------------------------------- ### Mac/Unix Github Release Installation - Install Package Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/docs/1. Installation.md Installs SigProfilerExtractor from the cloned Github repository on Mac/Unix systems. ```bash cd SigProfilerExtractor pip install . ``` -------------------------------- ### Import Example Data Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/README.md Imports the path of example data. ```python importdata(datatype="matrix") ``` -------------------------------- ### Mac/Unix Github Release Installation - Clone Repository Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/docs/1. Installation.md Clones the SigProfilerExtractor Github repository for installation from source on Mac/Unix systems. ```bash git clone git@github.com:AlexandrovLab/SigProfilerExtractor.git ``` -------------------------------- ### Install SigProfilerExtractor from GitHub Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/README.md To install the current version of this Github repo, git clone this repo or download the zip file. Unzip the contents of SigProfilerExtractor-master.zip or the zip file of a corresponding branch. In the command line, please run the following: ```bash cd SigProfilerExtractor-master pip install . ``` -------------------------------- ### Estimation of the Optimum Solution Example Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/README.md An example demonstrating how to call the estimate_solution function to find the optimal number of signatures. ```python from SigProfilerExtractor import estimate_best_solution as ebs ebs.estimate_solution(base_csvfile="All_solutions_stat.csv", All_solution="All_Solutions", genomes="Samples.txt", output="results", title="Selection_Plot", stability=0.8, min_stability=0.2, combined_stability=1.0, allow_stability_drop=False, exome=False) ``` -------------------------------- ### Import Example Data Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/docs/3. Using the Tool - Input.md Import example data using the importdata function, specifying the desired data type. ```python data = sig.importdata(datatype) ``` -------------------------------- ### Activity Stacked Bar Plot Example Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/README.md Command-line example for generating an activity stacked bar plot. ```bash $ python plotActivity.py 50 sig_attribution_sample.txt test_out.pdf ``` -------------------------------- ### Example: VCF Input Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/wikies/CLI-Usage.md An example of using SigProfilerExtractor with VCF input data, specifying a reference genome. ```bash SigProfilerExtractor sigprofilerextractor vcf example_output /path/to/vcf_folder --reference_genome GRCh37 --minimum_signatures 1 --maximum_signatures 3 ``` -------------------------------- ### Install Reference Genome Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/README.md Install your desired reference genome from the command line/terminal as follows (available reference genomes are: GRCh37, GRCh38, mm9, and mm10): ```python python from SigProfilerMatrixGenerator import install as genInstall genInstall.install('GRCh37') ``` -------------------------------- ### Get help on sigProfilerExtractor parameters Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/docs/3. Using the Tool - Input.md This command displays detailed help information for the sigProfilerExtractor function, including its parameters and outputs. ```python help(sig.sigProfilerExtractor) ``` -------------------------------- ### importdata Example Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/README.md This "data" variable can be used as a parameter of the "project" argument of the sigProfilerExtractor function. To get help on the parameters and outputs of the "importdata" function, please use the following: ```python from SigProfilerExtractor import sigpro as sig path_to_example_table = sig.importdata("matrix") data = path_to_example_table # This "data" variable can be used as a parameter of the "project" argument of the sigProfilerExtractor function. # To get help on the parameters and outputs of the "importdata" function, please use the following: help(sig.importdata) ``` -------------------------------- ### Help Command Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/wikies/CLI-Usage.md Command to display all available flags and options for SigProfilerExtractor. ```bash SigProfilerExtractor sigprofilerextractor --help ``` -------------------------------- ### Running estimate_best_solution Source: https://github.com/sigprofilersuite/sigprofilerextractor/blob/master/docs/3. Using the Tool - Input.md Shows how to call the estimate_solution function to estimate the optimum solution. ```python ebs.estimate_solution() ```