dcjones / isolator

Rapid and robust analysis of RNA-Seq experiments.
MIT License
32 stars 7 forks source link

Problem with SAM file #4

Open k3yavi opened 7 years ago

k3yavi commented 7 years ago

Hi @dcjones,

We are interested in using isolator for our analysis but due to some reason, it is segfaulting with the attached data. testData.tar.gz

Following is the backtrace from gdb

(gdb) bt
#0  0x00000000006e76d4 in bam_init_header_hash ()
#1  0x0000000000613b9c in sam_scan(std::vector<FragmentModelInterval*, std::allocator<FragmentModelInterval*> >&, AlnIndex&, Queue<FragmentModelInterval*>&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<FragmentModelInterval*, std::allocator<FragmentModelInterval*> >&, PosTable&, PosTable&, PosTable&, char const*, char const*) ()
#2  0x0000000000615536 in FragmentModel::estimate(TranscriptSet&, char const*, char const*, bool, bool, bool, bool, bool, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >) ()
#3  0x00000000005dbed4 in SamplerInitThread::run() ()
#4  0x00000000006053a3 in boost::_mfi::mf0<void, SamplerInitThread>::operator()(SamplerInitThread*) const ()
#5  0x0000000000605126 in void boost::_bi::list1<boost::_bi::value<SamplerInitThread*> >::operator()<boost::_mfi::mf0<void, SamplerInitThread>, boost::_bi::list0>(boost::_bi::type<void>, boost::_mfi::mf0<void, SamplerInitThread>&, boost::_bi::list0&, int) ()
#6  0x0000000000604bf3 in boost::_bi::bind_t<void, boost::_mfi::mf0<void, SamplerInitThread>, boost::_bi::list1<boost::_bi::value<SamplerInitThread*> > >::operator()() ()
#7  0x000000000060469a in boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void, SamplerInitThread>, boost::_bi::list1<boost::_bi::value<SamplerInitThread*> > > >::run() ()
#8  0x00007ffff79be016 in thread_proxy () from /home/linuxbrew/.linuxbrew/lib/libboost_thread-mt.so.1.62.0
#9  0x00007ffff690e6fa in start_thread (arg=0x7fffdf05a700) at pthread_create.c:333
#10 0x00007ffff5babb5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

It looks like there was some error with sam header parsing so we sorted and converted sam to bam format with which it looks like isolator is happy till now.

Curious about the seg fault though, Also does it effect the downstream analysis somehow too?

dcjones commented 7 years ago

Thanks for the test case. It seems the old version of samtools included in isolator has no way to distinguish sam from bam and just segfaults if sam is opened as bam. This should be fixed by upgrading to htslib, I'll try to do that soon.