Skip to content

Commit 20e0c82

Browse files
author
Kai Hu
committedJun 18, 2022
minor
1 parent d5d247b commit 20e0c82

8 files changed

+41
-18
lines changed
 

‎README.md

+39-16
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
## Table of Contents
44
[Introduction](#introduction)
55
[Pipeline summary](#pipeline-summary)
6-
- [PREPROCESS_DEFAULT](#preprocess_default)
7-
- [PREPROCESS_10XGENOMICS](#preprocess_10xgenomics)
8-
- [PREPROCESS_CHROMAP](#preprocess_chromap)
9-
- [DOWNSTREAM_ARCHR](#downstream_archr)
6+
- [PREPROCESS_DEFAULT](#preprocess_default)
7+
- [PREPROCESS_10XGENOMICS](#preprocess_10xgenomics)
8+
- [PREPROCESS_CHROMAP](#preprocess_chromap)
9+
- [DOWNSTREAM_ARCHR](#downstream_archr)
1010

1111
[Quick Start](#quick-start)
12-
[Example: plots in paper](#example-plots-in-paper)
12+
[Example used in paper](#example)
13+
- [Commands and config](#commands_and_config)
14+
- [Pipeline info: time and resource usage](#pipeline_info)
15+
1316
[Documentation](#documentation)
1417
[Credits](#credits)
1518
[Bug report/Support](#bug-reportsupport)
@@ -144,13 +147,15 @@ nextflow run main.nf --help
144147

145148
See documentation [usage](https://github.com/hukai916/scATACpipe/blob/main/docs/usage.md) for all of the available options.
146149

147-
## Example: plots in paper
150+
## Example
151+
152+
### Commands and config
148153

149154
This section describes how the plots in the manuscript (to be added) were generated using scATACpipe. For comparison, the manuscript conducted 3 separate analyses, each using a different preprocessing strategy (`default`, `10xgenomics`, `chromap`). Since the commands and preprocessed results are quite similar across the three methods, only the `chromap` option will be demonstrated here.
150155

151156
1. The initial execution:
152157
```
153-
nextflow run main.nf -profile singularity,lsf --preprocess chromap --outdir ./results_chromap --input_fastq ./assets/10X_human_scatac_fastq.csv --ref_fasta_ensembl homo_sapiens --species_latin_name 'homo sapiens' --archr_scrnaseq '/path/scRNA-Hematopoiesis-Granja-2019.rds' --archr_blacklist /home/hl84w/lucio_castilla/scATAC-seq/docs/hg38-blacklist.v2.bed.gz
158+
nextflow run main.nf -profile singularity,lsf --preprocess chromap --outdir ./results_chromap_initial --input_fastq ./assets/10X_human_scatac_fastq.csv --ref_fasta_ensembl homo_sapiens --species_latin_name 'homo sapiens' --archr_scrnaseq '/path/scRNA-Hematopoiesis-Granja-2019.rds' --archr_blacklist /home/hl84w/lucio_castilla/scATAC-seq/docs/hg38-blacklist.v2.bed.gz
154159
```
155160

156161
Break down:
@@ -163,9 +168,9 @@ Break down:
163168

164169
This instructs scATACpipe to use Chromap preprocessing strategy.
165170

166-
* `--outdir ./results_chromap`:
171+
* `--outdir ./results_chromap_initial`:
167172

168-
Output will be saved into `./results_chromap` folder.
173+
Output will be saved into `./results_chromap_initial` folder.
169174

170175
* `--input_fastq ./assets/10X_human_scatac_fastq.csv`:
171176

@@ -200,18 +205,18 @@ Again, you have to replace `/path/` with full absolute paths.
200205
2. The final execution:
201206

202207
After examining the results from the initial execution, we decided to remove the
203-
outlier clusters (C2, C10) from downstream analyses. These two clusters are considered problematic according to the following two plots:
204-
* The clustering heatmap plot from **./results_chromap/archr_clustering/** folder: the cell proportions from `PBMC_5K_N` and `PBMC_5K_V` samples are unbalanced for C2, C10.
208+
outlier clusters (C1, C6) from downstream analyses. These two clusters are considered problematic according to the following two plots:
209+
* The clustering heatmap plot from **./results_chromap_initial/archr_clustering/** folder: the cell proportions from `PBMC_5K_N` and `PBMC_5K_V` samples are unbalanced for C1, C6.
205210
<p align="center">
206-
<img src="docs/images/demo/test_chromap_initial/Clusters_heatmap.jpg" width="500" style="display: block; margin: auto">
211+
<img src="docs/images/demo/test_chromap_initial/Clusters_heatmap.png" width="500" style="display: block; margin: auto">
207212
</p>
208213

209-
* The marker gene heatmap plot from **./results_chromap/archr_marker_gene_clusters/** folder: no distinct marker gene pattern detected in cluster C2, C10.
214+
* The marker gene heatmap plot from **./results_chromap_initial/archr_marker_gene_clusters/** folder: no distinct marker gene pattern detected in cluster C1, C6.
210215
<p align="center">
211-
<img src="docs/images/demo/test_chromap_initial/GeneScores-Marker-Heatmap.jpg" width="500" style="display: block; margin: auto">
216+
<img src="docs/images/demo/test_chromap_initial/GeneScores-Marker-Heatmap.png" width="500" style="display: block; margin: auto">
212217
</p>
213218

214-
We used the following line to remove C2 and C10:
219+
We used the following line to remove C1 and C6:
215220
https://github.com/hukai916/scATACpipe/blob/b0bed3f63c7044fd6ab98c39c9d81166fe476edc/conf/test_chromap_final.config#L18
216221

217222
Also, we would like to perform constrained integration of scRNA-seq data in addition to the unconstrained integration. The following line was used to supply the grouping information:
@@ -238,7 +243,25 @@ The final execution command looks like below:
238243
```
239244
nextflow run main.nf -profile singularity,lsf -c ./conf/test_chromap_final.config -resume session_id
240245
```
241-
Note that, the `-resume session_id` must be supplied in order to skip already-performed analyses and the corresponding session id can be found by `nextflow log` command.
246+
In order to skip already-performed analyses, you must provide the `-resume session_id` option. The corresponding session ID can be found using the `nextflow log` command. Please note that the `--outdir` directory is set to `results_chromap_final`.
247+
248+
When the final execution is complete, we can look at clustering heatmaps and marker gene heatmaps, and they both look good now:
249+
* The marker gene heatmap plot from **./results_chromap_final/archr_marker_gene_clusters/** folder:
250+
<p align="center">
251+
<img src="docs/images/demo/test_chromap_final/Clusters_heatmap.png" width="500" style="display: block; margin: auto">
252+
</p>
253+
254+
* The marker gene heatmap plot from **./results_chromap_final/archr_marker_gene_clusters/** folder:
255+
<p align="center">
256+
<img src="docs/images/demo/test_chromap_final/GeneScores-Marker-Heatmap.png" width="500" style="display: block; margin: auto">
257+
</p>
258+
259+
### Pipeline info
260+
261+
Upon pipeline execution completion, Nextflow will produce time and resource usage reports that are stored under `pipeline_info`:
262+
- Using `chromap` option: [results_chromap_final/pipeline_info](https://github.com/hukai916/scATACpipe_example/tree/main/results_chromap_final/pipeline_info)
263+
- Using `default` option: [results_default_final/pipeline_info](https://github.com/hukai916/scATACpipe_example/tree/main/results_default_final/pipeline_info)
264+
- Using `10xgenomics` option: [results_10xgenomics_final/pipeline_info](https://github.com/hukai916/scATACpipe_example/tree/main/results_10xgenomics_final/pipeline_info)
242265

243266
## Documentation
244267

‎conf/test_chromap_final.config

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
params {
22
preprocess = 'chromap'
3-
outdir = './results_chromap'
3+
outdir = './results_chromap_final'
44
input_fastq = './assets/10X_human_scatac_fastq.csv'
55
ref_fasta_ensembl = 'homo_sapiens'
66
species_latin_name = 'homo sapiens'
@@ -15,7 +15,7 @@ params {
1515
// filter_sample = 'PBMC_10K_C, PBMC_10K_X'
1616

1717
// filter out undesired clusters:
18-
filter_seurat_harmony = 'C2, C10'
18+
filter_seurat_harmony = 'C1, C6'
1919

2020
modules {
2121
// specify a list of marker genes:
Loading
Loading
Binary file not shown.
Loading
Binary file not shown.
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.