Using Bowtie2 I am currently trying to align only short scaffolds (<1kb) of a draft genome (C. chinense) to a reference genome (C. annuum Zunla). At first, I tried to accomplish the job by piping the output of Bowtie2 directly to SAMtools like this:
$ bowtie2-build -f Capsicum.annuum.L_Zunla-1_Release_2.0.fasta Zunla_index
$ bowtie2 --local --time --threads 8 -D 15 -R 2 -N 0 -L 20 -i S,1,0.65 -I 0 -X 500 -f -x Zunla_index -U Capsicum.chinense_PI159236_Release_0.5.fasta | samtools view -bSu - | samtools sort -m 90000000000 - Chinense_Zunla.sorted
$ samtools index Chinense_Zunla.sorted.bam
After roughly one hour the job gets kicked out with the following error message:
Error: Out of memory allocating 17179877436 __m128i's for DP matrix: 'std::bad_alloc'
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
(ERR): bowtie2-align died with signal 6 (ABRT) (core dumped)
Alternatively I tried the same, but this time only the alignment step without piping:
$ bowtie2 --local --time --threads 8 -D 15 -R 2 -N 0 -L 20 -i S,1,0.65 -I 0 -X 500 -f -x Zunla_index -U Capsicum.chinense_PI159236_Release_0.5.fasta -S Chinense_Zunla.sam
This too resulted in the same error message as above. After this I tried running the job with less threads (4, 2 and even 1) and less memory allocation for SAMtools (as low as the default 500M). No matter what settings I use, the same error is being thrown. The resulting SAM output file contains 13 fully aligned scaffolds, but nothing appears to be wrong or weird about the scaffolds still to be aligned.
The cluster I use has over 140GB of RAM, so that should not be the problem, especially not when using 2 or even 1 thread. There is also plenty of disk space present for the resulting output and temporary files.
Some additional information:
- The reference input genome is 3.18GB (fasta format)
- The draft genome input file is 2.75GB and consists of scaffolds (fasta format)
- The cluster is shared, but almost full RAM capacity was present during the run
- Both fasta input files are validated not to be corrupted during downloading from the source, or to contain any characters/formatting not allowed
- The Bowtie2 settings used have been successful for creating exactly the same alignment, as reported in a publication on sequencing of the Capsicum annuum genome
Does anybody have any idea what might be causing this std::bad_alloc error?
$ bowtie2-build -f Capsicum.annuum.L_Zunla-1_Release_2.0.fasta Zunla_index
$ bowtie2 --local --time --threads 8 -D 15 -R 2 -N 0 -L 20 -i S,1,0.65 -I 0 -X 500 -f -x Zunla_index -U Capsicum.chinense_PI159236_Release_0.5.fasta | samtools view -bSu - | samtools sort -m 90000000000 - Chinense_Zunla.sorted
$ samtools index Chinense_Zunla.sorted.bam
After roughly one hour the job gets kicked out with the following error message:
Error: Out of memory allocating 17179877436 __m128i's for DP matrix: 'std::bad_alloc'
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
(ERR): bowtie2-align died with signal 6 (ABRT) (core dumped)
Alternatively I tried the same, but this time only the alignment step without piping:
$ bowtie2 --local --time --threads 8 -D 15 -R 2 -N 0 -L 20 -i S,1,0.65 -I 0 -X 500 -f -x Zunla_index -U Capsicum.chinense_PI159236_Release_0.5.fasta -S Chinense_Zunla.sam
This too resulted in the same error message as above. After this I tried running the job with less threads (4, 2 and even 1) and less memory allocation for SAMtools (as low as the default 500M). No matter what settings I use, the same error is being thrown. The resulting SAM output file contains 13 fully aligned scaffolds, but nothing appears to be wrong or weird about the scaffolds still to be aligned.
The cluster I use has over 140GB of RAM, so that should not be the problem, especially not when using 2 or even 1 thread. There is also plenty of disk space present for the resulting output and temporary files.
Some additional information:
- The reference input genome is 3.18GB (fasta format)
- The draft genome input file is 2.75GB and consists of scaffolds (fasta format)
- The cluster is shared, but almost full RAM capacity was present during the run
- Both fasta input files are validated not to be corrupted during downloading from the source, or to contain any characters/formatting not allowed
- The Bowtie2 settings used have been successful for creating exactly the same alignment, as reported in a publication on sequencing of the Capsicum annuum genome
Does anybody have any idea what might be causing this std::bad_alloc error?
Comment