I executed the same command, except using an Ubuntu virtual machine and it seems like the error is due memory availability.
The virtual machine with a base memory of 512 MB returned the same std::bad_alloc error message.
Once I increased the base memory to 1024 MB the command executed as expected. Although my virtual machine seemed to crash after running the command.
Luckily I have access to a server which can execute genomeCoverageBed (most likely due to more memory available).
Seems like the solution is to have more memory to execute the command.
On Tuesday, January 22, 2013 3:04:42 PM UTC-5, Andy Rampersaud wrote:I recently updated to the new bedtools-2.17.0 and noticed the following error:
$ genomeCoverageBed -bg -i sample_2.bed -g ../genomeIndex/mm9.chrom.sizes > test1.bed
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
/cygdrive/c/bedtools-2.17.0/bin/genomeCoverageBed: line 2: 1932 Aborted
(core dumped) ${0%/*}/bedtools genomecov "$@"
The previous post with the same error message fixed the problem by making sure the chromosome labels were the same between the input BED and the genomeSize file. In my case they are the same.
Thanks,
Andy