This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Problem in running STAR

I am using STAR 2.5.3a on my system for aligning my Fasta sequences. THe command I used is

aasim@aasim-ProLiant-ML150-Gen9:~/Aasim/bin/STAR-2.5.3a/star_index$ STAR --runMode genomeGenerate --runThreadN 24 --genomeDir index --genomeFastaFiles Concatenate_master_assembly.fasta  --limitGenomeGenerateRAM=31000000000

IT gives me following error

terminate called after throwing an instance of 'std::bad_alloc'
what():  std::bad_alloc  
Aborted (core dumped)

I tried to increase the values but throws tha same error.

My system info is

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                32
On-line CPU(s) list:   0-31
Thread(s) per core:    2
Core(s) per socket:    8
Socket(s):             2
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 79
Model name:            Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
Stepping:              1
CPU MHz:               2301.668
CPU max MHz:           2100.0000
CPU min MHz:           1200.0000
BogoMIPS:              4197.22
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              20480K
NUMA node0 CPU(s):     0-7,16-23
NUMA node1 CPU(s):     8-15,24-31
star rnaseq

There is a similar error on STAR's github. Do you have enough memory available?

cat /proc/meminfo

It gives following information

> aasim@aasim-ProLiant-ML150-Gen9:~$ cat /proc/meminfo
MemTotal:       65702032 kB
MemFree:        30549880 kB
MemAvailable:   62552108 kB
Buffers:          571404 kB
Cached:         31485836 kB
SwapCached:            0 kB
Active:         30890012 kB
Inactive:        3090328 kB
Active(anon):    1176296 kB
Inactive(anon):   903228 kB
Active(file):   29713716 kB
Inactive(file):  2187100 kB
Unevictable:          48 kB
Mlocked:              48 kB
SwapTotal:      66844668 kB
SwapFree:       66844668 kB
Dirty:            133012 kB
Writeback:             0 kB
AnonPages:       1924028 kB
Mapped:           455680 kB
Shmem:            155720 kB
Slab:             880684 kB
SReclaimable:     770816 kB
SUnreclaim:       109868 kB
KernelStack:       20720 kB
PageTables:        41372 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    99695684 kB
Committed_AS:    8516232 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      203260 kB
DirectMap2M:    12115968 kB
DirectMap1G:    56623104 kB

You allocate 31GB memory, but have only 30.5GB free.

You should stop other processes occupying Memory.

I cleared the cache, after that the memory status is

MemTotal:       65702032 kB
MemFree:        61628952 kB
MemAvailable:   62446420 kB
Buffers:          106076 kB
Cached:          1312752 kB
SwapCached:            0 kB
Active:          2998420 kB
Inactive:         655212 kB
Active(anon):    2235256 kB
Inactive(anon):   118972 kB
Active(file):     763164 kB
Inactive(file):   536240 kB
Unevictable:          48 kB
Mlocked:              48 kB
SwapTotal:      66844668 kB
SwapFree:       66844668 kB
Dirty:               128 kB
Writeback:             0 kB
AnonPages:       2235352 kB
Mapped:           471168 kB
Shmem:            119388 kB
Slab:             152748 kB
SReclaimable:      63664 kB
SUnreclaim:        89084 kB
KernelStack:       18768 kB
PageTables:        37300 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    99695684 kB
Committed_AS:    8176416 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      203260 kB
DirectMap2M:     5824512 kB
DirectMap1G:    62914560 kB

But it again throws the same error

majeedaasim : Is this copy of STAR known to work on this server? Did you compile it or download a pre-compiled binary?

 'std::bad_alloc'
what():  std::bad_alloc  
Aborted (core dumped)

These are mostly memory error. You should increase available memory for STAR.

1 answer

I solved it by using the parameter

--genomeChrBinNbits = 11

The number here depends on the number of sacffolds/sequences and assembly size and is calculated by using the formula given in the manual as

min(18,log2[max(GenomeLength/NumberOfReferences,ReadLength)])

Log in to answer this question.