Skip to content

Commit 98ee6ad

Browse files
committed
Documentation has been updated
1 parent 41ba91e commit 98ee6ad

5 files changed

Lines changed: 130 additions & 109 deletions

File tree

docs/1_installation.md

Lines changed: 30 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,29 @@
66

77
This section will help you set up the necessary software and packages required to run SigProfilerAssignment.
88

9-
@[toc](Sections)
10-
119
----------
1210

1311

1412
## Prerequisites ##
15-
- [Python][1] version >= 3.4.0
13+
14+
- [Python][1] version >= 3.9
1615
- Downloaded reference genomes using [SigProfilerMatrixGenerator][2] (only if mutation calling files are used as input)
1716
- Other dependencies and necessary packages are downloaded during the installation
1817

19-
## Download Reference Genome ##
20-
In case you want to use SigProfilerAssignment with mutation calling files as input, you first need to download the appropriate reference genome. Current reference genomes supported include GRCh37, GRCh38, mm9, mm10, and rn6. To install the reference genome/s, you need to use [SigProfilerMatrixGenerator][2].
18+
## Installation ##
2119

22-
First, install the python package using pip:
23-
```
24-
$ pip install SigProfilerMatrixGenerator
25-
```
26-
Install your desired reference genome from the command line/terminal as follows:
27-
```
28-
$ python
29-
>> from SigProfilerMatrixGenerator import install as genInstall
30-
>> genInstall.install('GRCh37', rsync=False, bash=True)
31-
```
32-
In case you prefer to install a reference genome that you have saved locally, you can do the following:
33-
```
34-
$ python
35-
>> from SigProfilerMatrixGenerator import install as genInstall
36-
>> genInstall.install('GRCh37', offline_files_path='path/to/directory/containing/GRCh37.tar.gz')
37-
```
20+
SigProfilerAssignment can be executed on any Windows/MacOS/Unix system. First follow the [SigProfilerMatrixGenerator][2] guide for installing `Python` and `pip`. Next, follow the download instructions for the latest stable release or the current GitHub version.
3821

39-
## Mac/Unix ##
40-
First, follow the [SigProfilerMatrixGenerator][3] Mac/Unix guide for installing `Python` and `pip`. Next, follow the download instructions for the latest stable release or the current GitHub version.
22+
### Installation with `pip` ###
4123

42-
### Mac/Unix Stable Release ###
43-
Install `SigProfilerAssignment` using `pip`:
24+
Install last `SigProfilerAssignment` PyPI version using `pip`:
4425
```
4526
$ pip install SigProfilerAssignment
4627
```
4728

48-
### Mac/Unix GitHub Release ###
49-
First, download the [zip file][4] or clone the GitHub repository by:
29+
### Install specific GitHub Release ###
30+
31+
First, download the [zip file][3] or clone the GitHub repository by:
5032
```
5133
$ git clone https://github.com/SigProfilerSuite/SigProfilerAssignment.git
5234
```
@@ -56,34 +38,36 @@ Next, enter the downloaded directory and install the package by unzipping the co
5638
$ cd SigProfilerAssignment
5739
$ pip install .
5840
```
59-
After SigProfilerAssignment successfully installs, the environment is set up and ready to use.
6041

61-
## Windows ##
62-
First, follow the [SigProfilerMatrixGenerator][3] Windows guide for installing `Python` and `pip`. Next, follow the download instructions for the latest stable release or the current GitHub version.
42+
## Download Reference Genome ##
43+
44+
In case you want to use SigProfilerAssignment with mutation calling files as input, you first need to download the appropriate reference genome. Current reference genomes supported include GRCh37, GRCh38, mm9, mm10, rn6 and rn7. To install the reference genome/s, you need to use [SigProfilerMatrixGenerator][2].
6345

46+
The last PyPI [SigProfilerMatrixGenerator][2] version is installed with SigProfilerAssignment by default. You can also install a specific version following the instructions in [SigProfilerMatrixGenerator Wiki][2].
6447

65-
### Windows Stable Release ###
66-
Install `SigProfilerAssignment` using `pip`:
67-
```
68-
$ pip install SigProfilerAssignment
69-
```
48+
Once [SigProfilerMatrixGenerator][2], install your desired reference genome from the command line/terminal as follows.
49+
50+
### Installation from command line ###
7051

71-
### Windows GitHub Release ###
72-
First, download the [zip file][4] or clone the GitHub repository by:
7352
```
74-
$ git clone https://github.com/SigProfilerSuite/SigProfilerAssignment.git
53+
$ SigProfilerMatrixGenerator install GRCh37
7554
```
55+
### Installation from Python terminal ###
7656

77-
Next, enter the downloaded directory and install the package by unzipping the contents of SigProfilerAssignment-master or the zip file of a corresponding branch:
78-
```
79-
$ cd SigProfilerAssignment
80-
$ pip install .
57+
``` python
58+
$ python
59+
>> from SigProfilerMatrixGenerator import install as genInstall
60+
>> genInstall.install('GRCh37', rsync=False, bash=True)
8161
```
82-
After SigProfilerAssignment successfully installs, the environment is set up and ready to use.
8362

63+
In case you prefer to install a reference genome that you have saved locally, you can do the following:
64+
``` python
65+
$ python
66+
>> from SigProfilerMatrixGenerator import install as genInstall
67+
>> genInstall.install('GRCh37', offline_files_path='path/to/directory/containing/GRCh37.tar.gz')
68+
```
8469

8570
[1]: https://www.python.org/downloads
86-
[2]: https://osf.io/s93d5/wiki/1.%20Installation%20-%20Python/
87-
[3]: https://osf.io/s93d5/wiki/1.%20Installation%20-%20Python/
88-
[4]: https://github.com/SigProfilerSuite/SigProfilerAssignment/releases
71+
[2]: https://sigprofilersuite.github.io/SigProfilerMatrixGenerator/Installation-Python.html
72+
[3]: https://github.com/SigProfilerSuite/SigProfilerAssignment/releases
8973

docs/2_quick_start_example.md

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
This section provides an example for users to quickly get started with using the SigProfilerAssignment tool. The following example will use somatic mutational data from breast cancer samples from [Nik-Zainal et al. 2012 Cell][1], and will showcase how to use SigProfilerAssignment with different types of files containing the input somatic mutations, including variant calling files (VCFs) and mutational matrices.
66

77

8-
@[toc](Sections)
9-
108
----------
119

1210
## Prerequisites ##
@@ -16,20 +14,21 @@ This tutorial requires that you have completed all steps in the [installation gu
1614
- Downloaded **GRCh37** reference genome using SigProfilerMatrixGenerator
1715

1816

19-
## Downloading Input Example Data ##
17+
## Downloading input example data ##
2018
This example uses somatic mutational data from a breast cancer genome. Download the example dataset `BRCA.zip` at the following location or use the command line:
2119

2220
ftp://alexandrovlab-ftp.ucsd.edu/pub/tools/SigProfilerAssignment/Example_data/
2321

24-
If using the command line, then enter the following command in bash on OS X or Unix systems:
22+
If using the command line, then enter the following command in bash on MacOS X or Unix systems:
2523

2624
$ wget ftp://alexandrovlab-ftp.ucsd.edu/pub/tools/SigProfilerAssignment/Example_data/BRCA.zip
2725

2826
Once `BRCA.zip` has been downloaded, unzip the file. The unzipped `BRCA` folder contains `BRCA.txt` and another folder `BRCA_vcf`. The file `BRCA.txt` is a mutational matrix defined using SBS-96 classification (created by [SigProfilerMatrixGenerator][3]) and `BRCA_vcf` contains the corresponding VCF file associated to the sample.
2927

3028

31-
## Running SigProfilerAssignment (VCF) ##
32-
You will be assigning reference mutational signatures from [COSMIC][4] v3.3 to the breast cancer sample in the subfolder `BRCA_vcf` used as input for this example.
29+
## Running SigProfilerAssignment from VCF ##
30+
You will be assigning reference mutational signatures from [COSMIC][4] v3.5 to the breast cancer sample in the subfolder `BRCA_vcf` used as input for this example.
31+
3332

3433
First, start a Python interactive shell and import the SigProfilerAssignment library.
3534

@@ -48,10 +47,17 @@ Analyze.cosmic_fit(samples="path/to/BRCA_vcf",
4847
genome_build="GRCh37")
4948
```
5049

50+
You can also run SigProfilerAssignment `cosmic_fit` function from command line:
51+
52+
``` bash
53+
$ SigProfilerAssignment cosmic_fit "path/to/BRCA_vcf" "output_vcf" --input_type "vcf" --context_type "96" --genome_build "GRCh37"
54+
55+
```
56+
5157
After SigProfilerAssignment has finished running, an output directory name `output_vcf` will be created. This directory will contain the output files and is located in the directory where the Python instance was started. To learn more about the output produced by SigProfilerAssignment, please refer to the [Using the Tool - Output][5] section.
5258

5359
## Running SigProfilerAssignment (Mutational matrix) ##
54-
You will be assigning reference mutational signatures from [COSMIC][6] v3.3 to the mutational matrix defined using the SBS-96 classification named `BRCA.txt` input for this example.
60+
You will be assigning reference mutational signatures from [COSMIC][4] v3.5 to the mutational matrix defined using the SBS-96 classification named `BRCA.txt` input for this example.
5561

5662
First, start a Python interactive shell and import the SigProfilerAssignment library.
5763

@@ -68,10 +74,17 @@ Analyze.cosmic_fit(samples="path/to/BRCA.txt",
6874
input_type="matrix")
6975
```
7076

71-
After SigProfilerAssignment has finished running, an output directory name `output_mm` will be created. This directory will contain the output files and is located in the directory where the Python instance was started. To lear more about the output produced by SigProfilerAssignment, please refer to the [Using the Tool - Output][5] section.
77+
You can also run SigProfilerAssignment `cosmic_fit` function from command line:
78+
79+
``` bash
80+
$ SigProfilerAssignment cosmic_fit "path/to/BRCA.txt" "output_mm" --input_type "matrix"
81+
82+
```
83+
After SigProfilerAssignment has finished running, an output directory name `output_mm` will be created. This directory will contain the output files and is located in the directory where the Python instance was started. To learn more about the output produced by SigProfilerAssignment, please refer to the [Using the Tool - Output][5] section.
7284

7385
## Running SigProfilerAssignment (Multi-sample segmentation) ##
74-
You will be assigning reference mutational signatures from [COSMIC][8] v3.3 to the multi-sample segmentation file obtained from one of the copy number calling tools named `all.breast.ascat.summary.sample.tsv` input for this example.
86+
87+
You will be assigning reference mutational signatures from [COSMIC][4] v3.5 to the multi-sample segmentation file obtained from one of the copy number calling tools named `all.breast.ascat.summary.sample.tsv` input for this example.
7588

7689
First, start a Python interactive shell and import the SigProfilerAssignment library.
7790

@@ -86,22 +99,27 @@ Next, assign reference COSMIC signatures by running the following command. **Not
8699
Analyze.cosmic_fit(samples="path/to/all.breast.ascat.summary.sample.tsv",
87100
output="example_sf",
88101
input_type="seg:ASCAT_NGS",
89-
cosmic_version=3.3,
102+
cosmic_version=3.5,
90103
collapse_to_SBS96=False)
91104
```
92105

93-
After SigProfilerAssignment has finished running, an output directory name `example_sf` will be created. This directory will contain the output files and is located in the directory where the Python instance was started. To lear more about the output produced by SigProfilerAssignment, please refer to the [Using the Tool - Output][5] section.
106+
You can also run SigProfilerAssignment `cosmic_fit` function from command line:
107+
108+
``` bash
109+
$ SigProfilerAssignment cosmic_fit "path/to/all.breast.ascat.summary.sample.tsv" "example_sf" --input_type "seg:ASCAT_NGS" --cosmic_version "3.5" --collapse_to_SBS96 False
110+
111+
```
112+
113+
After SigProfilerAssignment has finished running, an output directory name `example_sf` will be created. This directory will contain the output files and is located in the directory where the Python instance was started. To learn more about the output produced by SigProfilerAssignment, please refer to the [Using the Tool - Output][5] section.
94114

95115
## Additional Information ##
96-
In the above examples, the other non specified parameters are passed in with their default values. All of the function arguments and their types are explained in detail in the [Using the Tool - Input section][7]. To learn more about the files that were produced, you can refer to [Using the Tool - Output][5].
116+
In the above examples, the other non specified parameters are passed in with their default values. All of the function arguments and their types are explained in detail in the [Using the Tool - Input section][6]. To learn more about the files that were produced, you can refer to [Using the Tool - Output][5].
97117

98118

99119

100120
[1]: https://doi.org/10.1016/j.cell.2012.04.024
101-
[2]: https://osf.io/mz79v/wiki/1.Installation/
102-
[3]: https://osf.io/s93d5/wiki/home
121+
[2]: https://sigprofilersuite.github.io/SigProfilerAssignment/1_installation.html
122+
[3]: https://sigprofilersuite.github.io/SigProfilerMatrixGenerator/
103123
[4]: https://cancer.sanger.ac.uk/signatures/
104-
[5]: https://osf.io/mz79v/wiki/4.%20Using%20the%20Tool%20-%20Output/
105-
[6]: https://cancer.sanger.ac.uk/signatures/
106-
[7]: https://osf.io/mz79v/wiki/3.Using%20the%20Tool%20-%20Input/
107-
[8]: https://cancer.sanger.ac.uk/signatures/
124+
[5]: https://sigprofilersuite.github.io/SigProfilerAssignment/4_using_the_tool_output.html
125+
[6]: https://sigprofilersuite.github.io/SigProfilerAssignment/3_using_the_tool_input.html

0 commit comments

Comments
 (0)