You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: inst/templates/singlecell/pre-process-w-cellranger.md
+21-4Lines changed: 21 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,11 +80,8 @@ fastq_files
80
80
│ ├── sample2_I1_001.fastq.gz
81
81
```
82
82
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
86
84
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.
88
85
89
86
```
90
87
sample1
@@ -94,6 +91,26 @@ sample3
94
91
sampleN
95
92
```
96
93
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
+
97
114
for ease `samples.txt` should be in the same directory as your sbatch script.
98
115
99
116
Here is an example sbatch script for running cellranger as an array
0 commit comments