Building genome index references are not correct
gringer opened this issue · comments
The genome index run script doesn't work as written for two reasons:
- The base directory doesn't include the
$refName
directory created in the previous step (which hasgenes
andgenome
as subdirectories) - STAR v2.7.2b (and whatever has been created from it here) won't automatically create the target directory. This has been fixed in later versions of STAR.
Here is what I ran to get the genome index building working for me:
referenceDir=/mnt/md0/deccles/STAR/gencode_M34_SJ100
mkdir -p ${referenceDir}
export SINGULARITY_BIND=${referenceDir}
# download reference annotation ("This is the main annotation file for most users")
cd ${referenceDir}; mkdir genes; cd genes
wget 'https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_mouse/release_M34/gencode.vM34.basic.annotation.gtf.gz'
gunzip gencode.vM34.basic.annotation.gtf.gz
# download genome
cd ${referenceDir}; mkdir genome; cd genome
wget 'https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_mouse/release_M34/GRCm39.genome.fa.gz'
gunzip GRCm39.genome.fa.gz
# Generate index
mkdir STAR_SJ100
singularity exec /mnt/md0/deccles/singularityImages/SAW_7.0.sif mapping --runMode genomeGenerate \
--genomeDir ${referenceDir}/STAR_SJ100 \
--genomeFastaFiles ${referenceDir}/genome/GRCm39.genome.fa \
--sjdbGTFfile ${referenceDir}/genes/gencode.vM34.basic.annotation.gtf
--sjdbOverhang 99 --runThreadN 12
Thank you for your suggestion. We will update it in the future.