When STAR builds the index of the norway spruce, because the Genome is too big, there is always an error such as terminate called after throwing an instance of 'std::bad_alloc'. After Google, I changed the command to
STAR --runMode genomeGenerate --runThreadN 20 --genomeFastaFiles Pabies.fa --genomeDir STAR_index --limitGenomeGenerateRAM 80000000000(运行内存加到80G) --genomeChrBinNbits 11(If you are using a genome with a large > 5,000 number of references (chrosomes/scaffolds), you may need to reduce the --{genomeChrBinNbits to reduce RAM consumption. The following scaling is recommended: --genomeChrBinNbits} = min(18, log2(GenomeLength/NumberOfReferences)). For example, for 3~gigaBase genome with 100,000 chromosomes/scaffolds, this is equal to 15),所以挪威云杉12G的基因组需要log2(120,000,000,000/10,253,694)=11