filterBam compiling error

Discussions about compiler errors and installation problems

Moderator: bioinf

Post Reply
User avatar
katharina
Site Admin
Posts: 530
Joined: Wed Nov 18, 2015 6:14 pm
Location: Greifswald
Contact:

filterBam compiling error

Post by katharina »

Originally posted by Willow in the old forum on 01.07.2015 - 11:04

After install bamtools successfully,I change directory to filterBam, and type make,but it returns:
(cd src;make)
make[1]: Entering directory `/home/jjian/augustus-3.1/auxprogs/filterBam/src'
g++ -I/home/jjian/bamtools-master/include -Iheaders -I/home/jjian/bamtools-master/src/toolkit -std=c++0x filterBam.o MatePairs.o getReferenceName.o initOptions.o SingleAlignment.o printElapsedTime.o sumMandIOperations.o sumDandIOperations.o PairednessCoverage.o -o filterBam /home/jjian/bamtools-master/lib/libbamtools.a -lz
filterBam.o: In function `std::vector<std::string, std::allocator<std::string> >::_M_range_check(unsigned long) const':
filterBam.cc:(.text._ZNKSt6vectorISsSaISsEE14_M_range_checkEm[_ZNKSt6vectorISsSaISsEE14_M_range_checkEm]+0x48): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
filterBam.o: In function `std::vector<PairednessCoverage, std::allocator<PairednessCoverage> >::_M_range_check(unsigned long) const':
filterBam.cc:(.text._ZNKSt6vectorI18PairednessCoverageSaIS0_EE14_M_range_checkEm[_ZNKSt6vectorI18PairednessCoverageSaIS0_EE14_M_range_checkEm]+0x48): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
filterBam.o: In function `std::vector<int, std::allocator<int> >::_M_range_check(unsigned long) const':
filterBam.cc:(.text._ZNKSt6vectorIiSaIiEE14_M_range_checkEm[_ZNKSt6vectorIiSaIiEE14_M_range_checkEm]+0x48): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
filterBam.o: In function `std::vector<BamTools::BamAlignment, std::allocator<BamTools::BamAlignment> >::_M_range_check(unsigned long) const':
filterBam.cc:(.text._ZNKSt6vectorIN8BamTools12BamAlignmentESaIS1_EE14_M_range_checkEm[_ZNKSt6vectorIN8BamTools12BamAlignmentESaIS1_EE14_M_range_checkEm]+0x48): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
filterBam.o: In function `std::vector<MatePairs, std::allocator<MatePairs> >::_M_range_check(unsigned long) const':
filterBam.cc:(.text._ZNKSt6vectorI9MatePairsSaIS0_EE14_M_range_checkEm[_ZNKSt6vectorI9MatePairsSaIS0_EE14_M_range_checkEm]+0x48): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
getReferenceName.o:getReferenceName.cc:(.text._ZNKSt6vectorIN8BamTools7RefDataESaIS1_EE14_M_range_checkEm[_ZNKSt6vectorIN8BamTools7RefDataESaIS1_EE14_M_range_checkEm]+0x48): more undefined references to `std::__throw_out_of_range_fmt(char const*, ...)' follow
collect2: error: ld returned 1 exit status
make[1]: *** [filterBam] Error 1
make[1]: Leaving directory `/home/jjian/augustus-3.1/auxprogs/filterBam/src'
make: *** [all] Error 2
what is the solution?
User avatar
katharina
Site Admin
Posts: 530
Joined: Wed Nov 18, 2015 6:14 pm
Location: Greifswald
Contact:

Re: filterBam compiling error

Post by katharina »

Originally posted by Katharina in the old forum on 01.07.2015 - 11:56

Which version of bamtools did you use?
User avatar
katharina
Site Admin
Posts: 530
Joined: Wed Nov 18, 2015 6:14 pm
Location: Greifswald
Contact:

Re: filterBam compiling error

Post by katharina »

Originally posted by Willow in the old forum on 01.07.2015 - 15:42

bamtools-2.4.0
User avatar
katharina
Site Admin
Posts: 530
Joined: Wed Nov 18, 2015 6:14 pm
Location: Greifswald
Contact:

Re: filterBam compiling error

Post by katharina »

by Katharina on 02.07.2015 - 08:50
Please try bamtools 2.3.0. That's the last bamtools version that I verified fitlerBam to run with. (We will look into why it's not working with 2.4.0, but that might take a while since the developer of filterBam is not longer working in our group.)
Best,
Katharina
User avatar
katharina
Site Admin
Posts: 530
Joined: Wed Nov 18, 2015 6:14 pm
Location: Greifswald
Contact:

Re: filterBam compiling error

Post by katharina »

by Willow on 03.07.2015 - 13:33
I download bamtools-2.3.0,and try to compile filterBam, but it still returns:
make[1]: Entering directory `/home/jjian/augustus-3.1/auxprogs/filterBam/src'
g++ -I/home/jjian/bamtools-2.3.0/include -Iheaders -I/home/jjian/bamtools-2.3.0/src/toolkit -std=c++0x filterBam.o MatePairs.o getReferenceName.o initOptions.o SingleAlignment.o printElapsedTime.o sumMandIOperations.o sumDandIOperations.o PairednessCoverage.o -o filterBam /home/jjian/bamtools-2.3.0/lib/libbamtools.a -lz
filterBam.o: In function `std::vector<std::string, std::allocator<std::string> >::_M_range_check(unsigned long) const':
filterBam.cc:(.text._ZNKSt6vectorISsSaISsEE14_M_range_checkEm[_ZNKSt6vectorISsSaISsEE14_M_range_checkEm]+0x48): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
filterBam.o: In function `std::vector<PairednessCoverage, std::allocator<PairednessCoverage> >::_M_range_check(unsigned long) const':
filterBam.cc:(.text._ZNKSt6vectorI18PairednessCoverageSaIS0_EE14_M_range_checkEm[_ZNKSt6vectorI18PairednessCoverageSaIS0_EE14_M_range_checkEm]+0x48): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
filterBam.o: In function `std::vector<int, std::allocator<int> >::_M_range_check(unsigned long) const':
filterBam.cc:(.text._ZNKSt6vectorIiSaIiEE14_M_range_checkEm[_ZNKSt6vectorIiSaIiEE14_M_range_checkEm]+0x48): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
filterBam.o: In function `std::vector<BamTools::BamAlignment, std::allocator<BamTools::BamAlignment> >::_M_range_check(unsigned long) const':
filterBam.cc:(.text._ZNKSt6vectorIN8BamTools12BamAlignmentESaIS1_EE14_M_range_checkEm[_ZNKSt6vectorIN8BamTools12BamAlignmentESaIS1_EE14_M_range_checkEm]+0x48): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
filterBam.o: In function `std::vector<MatePairs, std::allocator<MatePairs> >::_M_range_check(unsigned long) const':
filterBam.cc:(.text._ZNKSt6vectorI9MatePairsSaIS0_EE14_M_range_checkEm[_ZNKSt6vectorI9MatePairsSaIS0_EE14_M_range_checkEm]+0x48): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
getReferenceName.o:getReferenceName.cc:(.text._ZNKSt6vectorIN8BamTools7RefDataESaIS1_EE14_M_range_checkEm[_ZNKSt6vectorIN8BamTools7RefDataESaIS1_EE14_M_range_checkEm]+0x48): more undefined references to `std::__throw_out_of_range_fmt(char const*, ...)' follow
collect2: error: ld returned 1 exit status
make[1]: *** [filterBam] Error 1
make[1]: Leaving directory `/home/jjian/augustus-3.1/auxprogs/filterBam/src'
make: *** [all] Error 2
User avatar
katharina
Site Admin
Posts: 530
Joined: Wed Nov 18, 2015 6:14 pm
Location: Greifswald
Contact:

Re: filterBam compiling error

Post by katharina »

by Katharina on 08.07.2015 - 15:49
Another question: did you remove the pre-existing *.o files of filterBam prior your attempt to compile?
I am wondering because your output seems to show the linking process, only, not the compiling process.
User avatar
katharina
Site Admin
Posts: 530
Joined: Wed Nov 18, 2015 6:14 pm
Location: Greifswald
Contact:

Re: filterBam compiling error

Post by katharina »

by Willow on 20.07.2015 - 09:24
No,I did not remove any files of filterBam
User avatar
katharina
Site Admin
Posts: 530
Joined: Wed Nov 18, 2015 6:14 pm
Location: Greifswald
Contact:

Re: filterBam compiling error

Post by katharina »

by katharina on 20.07.2015 - 11:48
Then please remove the pre-compiled *.o files and try again.
User avatar
katharina
Site Admin
Posts: 530
Joined: Wed Nov 18, 2015 6:14 pm
Location: Greifswald
Contact:

Re: filterBam compiling error

Post by katharina »

by Willow on 21.07.2015 - 04:08
When I remove all *.o files in filterBam directory and src directory,and type make, it returns:
make[1]: Entering directory `/home/jjian/augustus-3.1/auxprogs/filterBam/src'
g++ -I/home/jjian/bamtools-2.3.0/include -Iheaders -I/home/jjian/bamtools-2.3.0/src/toolkit -std=c++0x -c filterBam.cc -o filterBam.o
g++ -I/home/jjian/bamtools-2.3.0/include -Iheaders -I/home/jjian/bamtools-2.3.0/src/toolkit -std=c++0x -c functions/MatePairs.cc -o MatePairs.o
g++ -I/home/jjian/bamtools-2.3.0/include -Iheaders -I/home/jjian/bamtools-2.3.0/src/toolkit -std=c++0x -c functions/getReferenceName.cc -o getReferenceName.o
g++ -I/home/jjian/bamtools-2.3.0/include -Iheaders -I/home/jjian/bamtools-2.3.0/src/toolkit -std=c++0x -c functions/initOptions.cc -o initOptions.o
g++ -I/home/jjian/bamtools-2.3.0/include -Iheaders -I/home/jjian/bamtools-2.3.0/src/toolkit -std=c++0x -c functions/SingleAlignment.cc -o SingleAlignment.o
g++ -I/home/jjian/bamtools-2.3.0/include -Iheaders -I/home/jjian/bamtools-2.3.0/src/toolkit -std=c++0x -c functions/printElapsedTime.cc -o printElapsedTime.o
g++ -I/home/jjian/bamtools-2.3.0/include -Iheaders -I/home/jjian/bamtools-2.3.0/src/toolkit -std=c++0x -c functions/sumMandIOperations.cc -o sumMandIOperations.o
g++ -I/home/jjian/bamtools-2.3.0/include -Iheaders -I/home/jjian/bamtools-2.3.0/src/toolkit -std=c++0x -c functions/sumDandIOperations.cc -o sumDandIOperations.o
g++ -I/home/jjian/bamtools-2.3.0/include -Iheaders -I/home/jjian/bamtools-2.3.0/src/toolkit -std=c++0x -c functions/PairednessCoverage.cc -o PairednessCoverage.o
g++ -I/home/jjian/bamtools-2.3.0/include -Iheaders -I/home/jjian/bamtools-2.3.0/src/toolkit -std=c++0x filterBam.o MatePairs.o getReferenceName.o initOptions.o SingleAlignment.o printElapsedTime.o sumMandIOperations.o sumDandIOperations.o PairednessCoverage.o -o filterBam /home/jjian/bamtools-2.3.0/lib/libbamtools.a -lz
filterBam compiled with BAMTOOLS=/home/jjian/bamtools-2.3.0
mkdir -p ../bin;mv filterBam ../bin;
make[1]: Leaving directory `/home/jjian/augustus-3.1/auxprogs/filterBam/src'
User avatar
katharina
Site Admin
Posts: 530
Joined: Wed Nov 18, 2015 6:14 pm
Location: Greifswald
Contact:

Re: filterBam compiling error

Post by katharina »

by Willow on 21.07.2015 - 04:11
Oh, the bin directory is created!And filterBam can run successfully!Thank you very much!
User avatar
katharina
Site Admin
Posts: 530
Joined: Wed Nov 18, 2015 6:14 pm
Location: Greifswald
Contact:

Re: filterBam compiling error

Post by katharina »

by Willow on 22.07.2015 - 02:21
I have another question about filterBam. When I run filterBam with the command
/home/jjian/augustus-3.1/auxprogs/filterBam/bin/filterBam --uniq --paired --in accepted_hits.s.bam --out accepted_hits.sf.bam
it aborted after running several hours and told me
[1]+ Aborted (core dumped) nohup /home/jjian/augustus-3.1/auxprogs/filterBam/bin/filterBam --uniq --paired --in accepted_hits.s.bam --out accepted_hits.sf.bam (wd: ~/RNA-seq/454_1he2/hint)
(wd now: ~)
does filterBam take a lot of memory?It took 99% CPU when it run, and when aborted it took 99% memory. Can I split my bam files for running filterBam savely?
User avatar
katharina
Site Admin
Posts: 530
Joined: Wed Nov 18, 2015 6:14 pm
Location: Greifswald
Contact:

Re: filterBam compiling error

Post by katharina »

by Katharina on 22.07.2015 - 09:17
This may happen if you filter for pairedness but the "paired format" is not supported by filterBam. Have you compared the format of your input file to the format instructions at http://bioinf.uni-greifswald.de/bioinf/ ... Aseq.GSNAP ?
However, it is not a problem to split the files for filtering if you take care that all reads in a pair end up in the same file.
I recommend combining the filtered output files before bam2hints.
Post Reply