Skip to content

Commit 8a3c9b5

Browse files
authored
Merge pull request #32 from OpenOmics/documentation
Updating documentation along with a few other minor updates * Increasing resources for Seurat integration * Editing generateSummaryScript for multi pipeline to remove the assumption that GEX would always be present * Improve formatting for multi Seurat QC Summary Report
2 parents 181a888 + 416a91b commit 8a3c9b5

10 files changed

Lines changed: 1613 additions & 54 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.0
1+
3.4.1

config/cluster.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
},
2929
"seuratIntegrate": {
3030
"threads": "8",
31-
"mem": "350g",
31+
"mem": "1000g",
3232
"partition": "largemem",
33-
"time": "1-00:00:00"
33+
"time": "3-00:00:00"
3434
},
3535
"shinycodes": {
3636
"threads": "16",

docs/usage/atac.md

Lines changed: 179 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Each of the following arguments are required. Failure to provide a required argu
4646
>
4747
> FastQ Input: One or more FastQ files can be provided. The pipeline does NOT support single-end data. From the command-line, each input file should separated by a space. Multiple input FastQ files per sample can be provided. Globbing is supported! This makes selecting FastQ files easy. Input FastQ files should always be gzipp-ed.
4848
>
49-
> ***Example:*** `--input .tests/*.R?.fastq.gz`
49+
> ***Example:*** `--input .tests/*_R?_fastq.gz`
5050
>
5151
>
5252
> Cell Ranger Input: Cell Ranger output folders can be provided. It is expected that the outs folder is contained within the Cell Ranger output folders, and keep the normal output folder structure. Globbing is supported!
@@ -244,6 +244,76 @@ Each of the following arguments are optional, and do not need to be provided.
244244
245245
## 3. Example
246246
247+
### 3.1 Basic Pipeline Usage
248+
249+
#### 3.1.1 Single Input Folder
250+
251+
```bash
252+
# Step 1.) Grab an interactive node,
253+
# do not run on head node!
254+
srun -N 1 -n 1 --time=1:00:00 --mem=8gb --cpus-per-task=2 --pty bash
255+
module purge
256+
module load singularity snakemake
257+
258+
# Step 2A.) Dry-run the pipeline
259+
./cell-seek run --input .tests/*_R?_fastq.gz \
260+
--output /data/$USER/output \
261+
--pipeline atac \
262+
--genome hg38 \
263+
--cellranger 2.2.0 \
264+
--mode slurm \
265+
--dry-run
266+
267+
# Step 2B.) Run the cell-seek pipeline
268+
# The slurm mode will submit jobs to
269+
# the cluster. It is recommended running
270+
# the pipeline in this mode.
271+
./cell-seek run --input .tests/*_R?_fastq.gz \
272+
--output /data/$USER/output \
273+
--pipeline atac \
274+
--genome hg38 \
275+
--cellranger 2.2.0 \
276+
--mode slurm
277+
```
278+
279+
#### 3.1.2 Multiple Input Folders
280+
281+
FASTQ files from multiple folders can be provided as input. The paths to different FASTQ files can be provided in a space separated format.
282+
283+
```bash
284+
# Step 1.) Grab an interactive node,
285+
# do not run on head node!
286+
srun -N 1 -n 1 --time=1:00:00 --mem=8gb --cpus-per-task=2 --pty bash
287+
module purge
288+
module load singularity snakemake
289+
290+
# Step 2A.) Dry-run the pipeline
291+
./cell-seek run --input .tests/*_R?_fastq.gz .tests2/*_R?_fastq.gz \
292+
--output /data/$USER/output \
293+
--pipeline atac \
294+
--genome hg38 \
295+
--cellranger 2.2.0 \
296+
--mode slurm \
297+
--dry-run
298+
299+
# Step 2B.) Run the cell-seek pipeline
300+
# The slurm mode will submit jobs to
301+
# the cluster. It is recommended running
302+
# the pipeline in this mode.
303+
./cell-seek run --input .tests/*_R?_fastq.gz .tests2/*_R?_fastq.gz \
304+
--output /data/$USER/output \
305+
--pipeline gex \
306+
--genome hg38 \
307+
--cellranger 2.2.0 \
308+
--mode slurm
309+
```
310+
311+
### 3.2 Run Downstream on Existing Cell Ranger Output
312+
313+
It is possible to use cell-seek to perform the initial downstream analysis on existing Cell Ranger ATAC output. The files are expected to be in the Cell Ranger ATAC outputted format with the outs folder present. The sample level folders should be provided as the input for cell-seek.
314+
315+
For example, if sample1 was run in Cell Ranger ATAC then sample1/outs/ contains the final pipeline output files, and sample1 should be provided as input to cell-seek.
316+
247317
```bash
248318
# Step 1.) Grab an interactive node,
249319
# do not run on head node!
@@ -252,7 +322,7 @@ module purge
252322
module load singularity snakemake
253323

254324
# Step 2A.) Dry-run the pipeline
255-
./cell-seek run --input .tests/*.R?.fastq.gz \
325+
./cell-seek run --input .tests/*/ \
256326
--output /data/$USER/output \
257327
--pipeline atac \
258328
--genome hg38 \
@@ -264,11 +334,117 @@ module load singularity snakemake
264334
# The slurm mode will submit jobs to
265335
# the cluster. It is recommended running
266336
# the pipeline in this mode.
267-
./cell-seek run --input .tests/*.R?.fastq.gz \
337+
./cell-seek run --input .tests/*/ \
268338
--output /data/$USER/output \
269339
--pipeline atac \
270340
--genome hg38 \
271341
--cellranger 2.2.0 \
272342
--mode slurm
273343
```
274344

345+
346+
### 3.3 Renaming Samples
347+
348+
It is possible to rename samples to different names from the ones that are used in the FASTQ files. This function can be used to change the sample names to something more informative, or it could be used if FASTQ files names changed for a specific sample.
349+
350+
In order to use this option, a CSV file should be created. In the CSV there should be a row for each FASTQ file that will be processed. The first column contains the name of the FASTQ file while the second column contains the output sample name. Only the FASTQ files and samples that are listed within the CSV file will be processed.
351+
352+
Cell Ranger expects the FASTQ file to have a format of
353+
354+
`[Sample Name]_S[Sample Number]_L00[Lane Number]_[Read Type]_001.fastq.gz`
355+
356+
or
357+
358+
`[Sample Name]_S[Sample Number]_[Read Type]_001.fastq.gz`
359+
360+
The FASTQ name that is used in the rename CSV file should match the section in the `[Sample Name]` listed above. An example file could be `Sample_ATAC_S1_L001_R1_001.fastq.gz`. In this file, the sample name would be Sample_ATAC. More information about the FASTQ naming format that Cell Ranger expects can be found at the [10x Genomics website](https://www.10xgenomics.com/support/software/cell-ranger-atac/latest/analysis/inputs/specifying-input-fastq-files).
361+
362+
The following is a potential example of a rename CSV file.
363+
364+
```
365+
FASTQ,Name
366+
sample1_run1,sample1
367+
sample2_run1,sample2
368+
sample3_run1,sample3
369+
sample3_run2,sample3
370+
sample4,sample4
371+
```
372+
373+
Based on this file, the FASTQ files with the name sample1_run1, sample2_run1, sample3_run1, sample3_run2, and sample4 will be processed, and any FASTQ file that does not match these names will not be run. The outputted sample names would be sample1, sample2, sample3, and sample4. The FASTQ files with the name sample3_run1 and sample3_run2 will be processed as sample3.
374+
375+
376+
```bash
377+
# Step 1.) Grab an interactive node,
378+
# do not run on head node!
379+
srun -N 1 -n 1 --time=1:00:00 --mem=8gb --cpus-per-task=2 --pty bash
380+
module purge
381+
module load singularity snakemake
382+
383+
# Step 2A.) Dry-run the pipeline
384+
./cell-seek run --input .tests/*_R?_fastq.gz \
385+
--output /data/$USER/output \
386+
--pipeline atac \
387+
--genome hg38 \
388+
--cellranger 2.2.0 \
389+
--rename rename.csv \
390+
--mode slurm \
391+
--dry-run
392+
393+
# Step 2B.) Run the cell-seek pipeline
394+
# The slurm mode will submit jobs to
395+
# the cluster. It is recommended running
396+
# the pipeline in this mode.
397+
./cell-seek run --input .tests/*_R?_fastq.gz \
398+
--output /data/$USER/output \
399+
--pipeline atac \
400+
--genome hg38 \
401+
--cellranger 2.2.0 \
402+
--rename rename.csv \
403+
--mode slurm
404+
```
405+
406+
### 3.4 Running while Forcing Cell Call
407+
408+
It is possible to force the number of cells that are called by Cell Ranger ATAC. In this situation, Cell Ranger ATAC will call the top X cell barcodes with the highest number of fragments overlapping peaks as cells, where X the number cells that the sample is forced to. This is generally used if the first analysis run appears to do a poor job at estimating the number of cells, and a re-run while adjusting the number of cells in the sample is helpful.
409+
410+
A CSV file needs to be created with the first column containing the name of the sample (the Cell Ranger outputted name) and the second column containing the number of cells to force the sample to. Only the samples included in the CSV file will be run while forcing the cell call. Any other samples that are processed will use the default cell calling algorithm.
411+
412+
The following is an example of a force cells CSV file.
413+
414+
```
415+
Sample,Cells
416+
Sample1,3000
417+
Sample2,5000
418+
```
419+
420+
Based on this file, Sample1 and Sample 2 will be run while being forced to have 3000 and 5000 cells respectively.
421+
422+
```bash
423+
# Step 1.) Grab an interactive node,
424+
# do not run on head node!
425+
srun -N 1 -n 1 --time=1:00:00 --mem=8gb --cpus-per-task=2 --pty bash
426+
module purge
427+
module load singularity snakemake
428+
429+
# Step 2A.) Dry-run the pipeline
430+
./cell-seek run --input .tests/*_R?_fastq.gz \
431+
--output /data/$USER/output \
432+
--pipeline atac \
433+
--genome hg38 \
434+
--cellranger 2.2.0 \
435+
--forcecells forcecells.csv \
436+
--mode slurm \
437+
--dry-run
438+
439+
# Step 2B.) Run the cell-seek pipeline
440+
# The slurm mode will submit jobs to
441+
# the cluster. It is recommended running
442+
# the pipeline in this mode.
443+
./cell-seek run --input .tests/*_R?_fastq.gz \
444+
--output /data/$USER/output \
445+
--pipeline atac \
446+
--genome hg38 \
447+
--cellranger 2.2.0 \
448+
--forcecells forcecells.csv \
449+
--mode slurm
450+
```

0 commit comments

Comments
 (0)