Skip to content

Commit 00a2ad1

Browse files
committed
Adding updated notes on FFPEsig and how to setup and install tools better
1 parent b0d20d2 commit 00a2ad1

File tree

5 files changed

+465
-175
lines changed

5 files changed

+465
-175
lines changed

Dockerfile

Lines changed: 0 additions & 16 deletions
This file was deleted.

README.md

Lines changed: 50 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,55 @@ Following successful processing the wrapper script will have created a directory
8080
where the FFPE induced variants have been removed. These can be used for downstream variant and mutational signature
8181
identification.
8282

83+
## Confirmation of FFPE induced variant removal using FFPEsig
84+
85+
FFPEsig was developed to correct mutational signatures by adjusting for the expected signatures of FFPE induced
86+
variants. In this way we can use it as an orthogonal tool to Ideafix to confirm that FFPE induced variants were
87+
correctly identified and removed. Essentially if FFPEsig determines that little to no correction is needed in changing
88+
the mutational signature profile then it validates the removal process performed by Ideafix.
89+
90+
### Setup
91+
92+
First build the Anaconda3 environment for the tool
93+
94+
```
95+
conda env create -f env/ffpesig-env.yml
96+
```
97+
98+
or if you're using the Mamba wrapper/replacement for Conda
99+
100+
```
101+
mamba env create -f env/ffpesig-env.yml
102+
```
103+
104+
After the environment's been created activate it using
105+
106+
```
107+
conda activate ffpesig
108+
```
109+
110+
then download the FFPEsig Python script from the authors GitHub repo to run (this has already been done for this repo)
111+
112+
```
113+
curl -L https://raw.githubusercontent.com/QingliGuo/FFPEsig/main/FFPEsig.py -o etc/ffpesig/FFPEsig.py
114+
```
115+
116+
Now you're ready to run the tool!
117+
118+
### Running FFPEsig
119+
120+
With the FFPEsig script downloaded the tool has a CLI and can be run on the count matrix output by SigProfilerExtractor.
121+
122+
```
123+
cd etc/ffpesig
124+
python FFPEsig.py -i data/ffpesig_input/ffpefixed_tumor_normal_called_all_hiconf.SBS96.all.csv -s "CHORANGIOMA" -l Unrepaired -o ../../data/ffpesig_output
125+
python FFPEsig.py -i data/ffpesig_input/ffpefixed_tumor_normal_called_all_hiconf.SBS96.all.csv -s "NORM_VILLI" -l Unrepaired -o ../../data/ffpesig_output
126+
```
127+
128+
Results will appear in (data/ffpesig_output)[data/ffpesig_output] and comparing the `before_correction` to the
129+
`after_correction` results for each tissue will confirm that minimal correction was needed by FFPESig, confirming
130+
that Ideafix correctly removed spurious variants caused by the FFPE fixation process.
131+
83132
## Somatic mutation signal identification
84133

85134
Mutational signal profiling from somatic variation to detect disrupted mechanisms in somatic cells (typically cancers)
@@ -174,92 +223,4 @@ Double, and indel signatures identified (both De Novo and Composite from the
174223
[COSMIC database of reference signatures](https://cancer.sanger.ac.uk/signatures/)). The outputs are in labeled
175224
subdirectories per signature type (SBS, DBS, IDS) and contains PDFs of signatures as well as signature stats and other
176225
accompanying information used in signature identification. More information can be found on the SigProfiler Wiki and
177-
Youtube videos.
178-
179-
### Failed setup and use of SigProfiler
180-
181-
This are simple notes marking past attempts for using SigProfiler which didn't work correctly. This is kept purely for
182-
reminder notes on what was done in the development of the wrapper for SigProfiler.
183-
184-
#### Docker on MacOS
185-
186-
This did not end well... It ran with max resources on all CPUs and did not complete. It seemingly stopped working after
187-
about 24 hours and could have been due to a number of factors...
188-
189-
1. build the docker image for build 38 and the simple CLI tool for using it
190-
```
191-
docker build -t sigprof-testing:v0.0.1 .
192-
```
193-
2. run the container specifying inner path to vcf file(s) directory that was mounted
194-
```
195-
docker run --rm -v "$(pwd)"/data:/usr/sigprof/vcfs -v "$(pwd)"/output:/usr/sigprof/results -it --entrypoint bash sigprof-testing:v0.0.1
196-
```
197-
198-
#### Conda environment on MacOS
199-
200-
This setup ran but was hard coded to certain paths and very specific to a single machine setup. Ultimately the more this
201-
tool was needing to be run the more difficult it was to use this.
202-
203-
1. build the conda env
204-
1. `conda env create -f env/sigprofiler-env.yml`
205-
2. activate the env
206-
1. `conda activate sigprofiler`
207-
3. install the reference genome materials needed to run the sigprofiler
208-
1. `cd data`
209-
2. `python -c "from SigProfilerMatrixGenerator import install as genInstall; genInstall.install('GRCh38')"`
210-
3. _NOTE_: the profiler, or the script it's run from, must run from this directory as well due to it expecting a
211-
certain path for this information being installed
212-
4. _WARNING_: This can be a long running process so don't run in a setting where the task could be accidentally
213-
terminated
214-
4. start an interactive python session
215-
1. `python`
216-
5. Import SigProfileExtractor and run the application
217-
1. ```
218-
from SigProfilerExtractor import sigpro as sig
219-
sig.sigProfilerExtractor(
220-
input_type="vcf",
221-
output="results",
222-
input_data="pvp_input",
223-
reference_genome="GRCh38",
224-
opportunity_genome="GRCh38",
225-
minimum_signatures=1,
226-
maximum_signatures=10,
227-
cosmic_version=3.3,
228-
collapse_to_SBS96=False,
229-
get_all_signature_matrices=False)
230-
```
231-
6. the profiler should complete relatively quickly with a single sample. Results will appear in `data/results/`
232-
233-
## Somatic Driver variant identification
234-
235-
Testing new tool reported in
236-
["Genome-wide mapping of somatic mutation rates uncovers drivers of cancer"](https://www.nature.com/articles/s41587-022-01353-8)
237-
that should aid in driver variant (previously identified and novel) identification including those in non-coding and
238-
regulatory regions that could be confirmed with RNASeq.
239-
240-
**WARNING**: The authors of this tool note that use of the tool could be "spurious" when analyzing a type of cancer
241-
against a pretrained model that doesn't match the mechanisms/signatures of cancers provided in the pretrained models.
242-
see this [GitHub Issue](https://github.com/maxwellsh/DIGDriver/issues/2#issuecomment-1168689782) explaining more from
243-
the authors of the tool.
244-
245-
**Annoyance**: The authors recommend using liftover to `hg19` perform analysis of datasets aligned to `GRCh38/hg38`. See
246-
their [recommendation](https://github.com/maxwellsh/DIGDriver/issues/2#issuecomment-1168689782) notes on this process.
247-
This isn't the greatest but if it's what it take to use the tool it may be an acceptable limitation.
248-
249-
### Conda environment
250-
251-
- [Conda environment info](https://anaconda.org/mutation_density/digdriver)
252-
- [Install and setup wiki](https://github.com/maxwellsh/DIGDriver/wiki)
253-
254-
1. Build the conda environment as defined in the [yaml file](./env/digdriver-env.yml) for DigDriver
255-
1. ```sh
256-
conda env create -f env/digdriver-env.yml
257-
```
258-
2. Download the required [supporting data files](https://github.com/maxwellsh/DIGDriver/wiki/02:-Data-files) for running
259-
DigDiver
260-
1. Download the pretrained models that might work out of the box ( Brandon's best guess ¯\_(ツ)\_/¯ ) using the
261-
[download script](./setup/downloadDigModels.sh)
262-
2. ```sh
263-
./setup/downloadDigModels.sh
264-
```
265-
3. All supporting data will be downloaded under `data/dig_driver/` for use with DigDriver
226+
Youtube videos.

env/ffpesig-env.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: ffpesig
2+
3+
channels:
4+
- conda-forge
5+
6+
dependencies:
7+
- python==3.7.6
8+
- pandas==1.0.1
9+
- numpy==1.18.1
10+
- matplotlib==3.1.3
11+
- seaborn==0.10.1

0 commit comments

Comments
 (0)