Use when aligning RNA-seq reads to a reference genome or generating genome indices for spliced transcript alignment
STAR-avx2/home/vimalinx/miniforge3/envs/bio/bin/STAR-avx2# 1) Build a STAR genome index
STAR-avx2 \
--runMode genomeGenerate \
--genomeDir star_index \
--genomeFastaFiles genome.fa \
--sjdbGTFfile genes.gtf \
--runThreadN 16
# 2) Align paired-end gzipped RNA-seq reads
STAR-avx2 \
--genomeDir star_index \
--readFilesIn sample_R1.fastq.gz sample_R2.fastq.gz \
--readFilesCommand zcat \
--runThreadN 16
# 3) Align and emit coordinate-sorted BAM
STAR-avx2 \
--genomeDir star_index \
--readFilesIn sample_R1.fastq.gz sample_R2.fastq.gz \
--readFilesCommand zcat \
--outSAMtype BAM SortedByCoordinate \
--runThreadN 16
STAR-avx2 --runMode genomeGenerate --genomeDir /path/to/index --genomeFastaFiles genome.fa --sjdbGTFfile annotations.gtfSTAR-avx2 --genomeDir /path/to/index --readFilesIn R1.fq R2.fq --runThreadN N--readFilesCommand zcat for .gz files or bzcat for .bz2 filesAligned.out.sam for alignments and SJ.out.tab for splice junctions--runThreadN to match available CPU cores; default is 1 thread--sjdbOverhang equals read length minus 1 for optimal junction detection--genomeLoad NoSharedMemory on shared systems to avoid memory conflicts