Skip to content

Commit 3c6936e

Browse files
committed
Merge branch 'devel' of github.com:bcbio/bcbioR into dev_ruitong
2 parents 90dceb1 + 1e662ba commit 3c6936e

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

inst/templates/singlecell/pre-process-w-cellranger.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,8 @@ fastq_files
8080
│   ├── sample2_I1_001.fastq.gz
8181
```
8282

83-
## Run Cellranger
84-
85-
The easiest way to run cellranger is using the array feature on O2. [Here](https://github.com/hbc/knowledgebase/blob/master/rc/arrays_in_slurm.md) is a tutorial on arrays.
83+
If you do not have this structure here is a simple bash script to create it. Simply strip suffixes off all sample names and put them in a file called samples.txt
8684

87-
To run cellranger as an array you will need one extra file. This file called `samples.txt` will have the name of each sample on its own line.
8885

8986
```
9087
sample1
@@ -94,6 +91,26 @@ sample3
9491
sampleN
9592
```
9693

94+
Then modify the suffixes here to match yours and run this bash script on the command line:
95+
96+
```
97+
while read p; do
98+
mkdir ${p}
99+
mv ${p}_R1_001.fastq.gz ${p}
100+
mv ${p}_R2_001.fastq.gz ${p}
101+
mv ${p}_I1_001.fastq.gz ${p}
102+
mv ${p}_I2_001.fastq.gz ${p}
103+
done < samples.txt
104+
```
105+
106+
This will create the desired folder structure for cellranger.
107+
108+
## Run Cellranger
109+
110+
The easiest way to run cellranger is using the array feature on O2. [Here](https://github.com/hbc/knowledgebase/blob/master/rc/arrays_in_slurm.md) is a tutorial on arrays.
111+
112+
To run cellranger as an array you will need one extra file. This file called `samples.txt` will have the name of each sample on its own line. See above for format.
113+
97114
for ease `samples.txt` should be in the same directory as your sbatch script.
98115

99116
Here is an example sbatch script for running cellranger as an array

0 commit comments

Comments
 (0)