Question: How to resolve
BUG: next index is smaller than previous, EXITING?
Answer: The error above is specific to the genome indexing step using STAR
It has been observed when using an input genome FASTA file with repeat-masked sequences and resolved when an unmasked version of the FASTA file is used instead.
For example, the error was observed when using the repeat-masked version of the pig genome assembly from Ensembl (Sus_scrofa.Sscrofa11.1.dna_rm.toplevel.fa) and resolved with the use of the unmasked version (Sus_scrofa.Sscrofa11.1.dna.toplevel.fa).