232 | | To improve identification of novel splice junctions, run STAR for a second pass, using junctions found from all samples during the first-pass mapping. This is especially useful if no GTF file (with annotated junctions) was available for the first-pass mapping. |
233 | | |
234 | | Sample multiple-sample second-pass command (to run after typical mapping [1st pass]): |
235 | | {{{ |
236 | | bsub STAR --genomeDir /path/to/GenomeDir --readFilesIn /path/to/read1.fq.gz /path/to/read2.fq.gz --sjdbScore 2 --outFileNamePrefix whateverPrefix --runThreadN 8 --readFilesCommand gunzip -c --outSAMtype BAM SortedByCoordinate --sjdbFileChrStartEnd sample1_junctions.tab [sample2_junctions.tab ...] |
237 | | }}} |
238 | | |
239 | | Sample single-sample 2-pass command (includes 1st and 2nd passes): |
240 | | {{{ |
241 | | bsub STAR --genomeDir /path/to/GenomeDir --readFilesIn /path/to/read1.fq.gz /path/to/read2.fq.gz --sjdbScore 2 --outFileNamePrefix whateverPrefix --runThreadN 8 --readFilesCommand gunzip -c --outSAMtype BAM SortedByCoordinate --twopassMode Basic |
242 | | }}} |
| 232 | To improve identification of novel splice junctions, run STAR for a second pass, using junctions found from all samples during the first-pass mapping. This is especially useful if no GTF file (with annotated junctions) was available for the first-pass mapping. Furthermore, this procedure is recommended for improving sensitivity of variant calling with RNA-seq data. |
| 233 | |
| 234 | '''Index the reference genome for First Pass.''' |
| 235 | Create folder, "FirstPass" before running these commands. |
| 236 | |
| 237 | To generate FirstPass genome index files for STAR: |
| 238 | {{{ |
| 239 | bsub STAR --runMode genomeGenerate --genomeDir /path/to/GenomeDirFirstPass --genomeFastaFiles /path/to/genome/fasta --sjdbGTFfile /path/to/GTF/FileName.gtf --sjdbOverhang 100 --runThreadN 8 |
| 240 | }}} |
| 241 | |
| 242 | To map your reads: |
| 243 | '''Run this command within the FirstPass directory''' |
| 244 | {{{ |
| 245 | bsub STAR --genomeDir /path/to/GenomeDirFirstPass --readFilesIn /path/to/Reads_1.fastq --outFileNamePrefix whateverPrefix --runThreadN 8 |
| 246 | }}} |
| 247 | |
| 248 | '''re-index the reference genome for Second Pass.''' |
| 249 | Create folder, "SecondPass" before running these commands. |
| 250 | |
| 251 | To improve sensitivity for variant detection it is recommended to run STAR for a second pass, using junctions found from the first-pass mapping. |
| 252 | To generate theSecondPass genome index files for STAR: |
| 253 | {{{ |
| 254 | |
| 255 | bsub STAR --runMode genomeGenerate --genomeDir /path/to/GenomeDirSecondPass --genomeFastaFiles /path/to/genome/fasta --sjdbFileChrStartEnd /path/to/first/pass/directory/SJ.out.tab --sjdbGTFfile /path/to/GTF/FileName.gtf --sjdbOverhang 100 --runThreadN 8 |
| 256 | }}} |
| 257 | |
| 258 | To map your reads: |
| 259 | '''Run this command within the SecondPass directory''' |
| 260 | {{{ |
| 261 | Input format: fastq ; output format: SAM |
| 262 | bsub STAR --genomeDir /path/to/GenomeDirSecondPass --readFilesIn /path/to/Reads_1.fastq --outFileNamePrefix whateverPrefix --runThreadN 8 |
| 263 | }}} |
| 264 | |