From Genome Analysis Wiki
- 1 Compile Problems
- 2 BamUtil: stats
For problems with libStatGen, see LibStatGen Troubleshooting
HashErrorModel.cpp:96: error: ‘class std::unordered_map, std::equal_to, std::allocator > >’ has no member named ‘at’
HashErrorModel.cpp: In member function ‘uint8_t HashErrorModel::getQemp(BaseData&)’: HashErrorModel.cpp:96: error: ‘class std::unordered_map, std::equal_to, std::allocator > >’ has no member named ‘at’ make: *** [../obj/HashErrorModel.o] Error 1
- HashErrorModel by default uses an unordered_map which is only found in C++11/C++0x.
- The code attempts to automatically detect whether or not you have C++11/C++0x by checking if the gcc version > X4.3.0.
- If you see this failure, that means this check did not properly work and you will need to manually disable the C++11/C++0x code. There are a couple of ways to do this:
- Update bamUtil/Makefile.inc, line 7, change
CXX11_AVAIL ?= 1to
CXX11_AVAIL = 0
- Set CXX11_AVAIL to 0 on the command line:
- Set CXX11_AVAIL = 0 in your environment
By making one of these changes, the code should compile and use map instead of unordered_map.
ld: lto: could not merge in ../obj/BamExecutable.o because Unknown instruction for architecture x86_64
ld: lto: could not merge in ../obj/BamExecutable.o because Unknown instruction for architecture x86_64 collect2: ld returned 1 exit status make: *** [../bin/bam] Error 1 make: *** [src] Error 2 make: *** [bamUtil/] Error 2
- This error was seen when running on Mac OS X 10.7.5 on a 64-bit kernel with gcc/g++: i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
- The error appears to be due to the default build optimization: -O4
- If you see this error, try compiling for debug (optimization -O0):
- The debug executable is:
- If the debug compile worked and you would prefer an optimized executable (runs a little faster), then update the optimization flag to -O3:
- Open libStatGen/Makefiles/Makefile.include
make clean; makein both libStatGen and bamUtil
- The optimized executable is
Overflow on the pileup buffer: specifiedPosition = ####, pileup buffer start position: ####, pileup buffer end position: ####
Exiting due to ERROR: Overflow on the pileup buffer: specifiedPosition = 93252, pileup buffer start position: 92227, pileup buffer end position: 93251
- By default, bam stats assumes that a single read covers less than 1024 reference bases.
- This type of error appears if a read is longer than that. This is most likely to happen if you have large skipped regions in your CIGARs ('N's).
- You need to increase the size of the pileup buffer to cover the largest number of reference bases a single read covers.
- To fix this problem, use the
--bufferSize 3000parameter, replacing 3000 by the appropriate number to handle the largest size of the reference covered by a read. You can increase this to a large number - it will just take up more memory.
- Future versions of bamUtil will print an additional error message including the recordName and CIGAR of the record that failed. You can use the CIGAR to come up with a better setting for
--bufferSize, although keep in mind that future records could cover even a larger number of bases than that failing record.
- To print all of the Cigars in the file that contain an 'N' (skip), you can use (replace test.bam with your bam file):
../bin/bam findCigars --noph --cskip --in test.bam --out - |grep -v "^@" |cut -f 6
- This may help to determine a setting for