melisanahtar / ea-utils

Automatically exported from code.google.com/p/ea-utils
0 stars 0 forks source link

fastq-join does not work on set of (fastq-mcf) trimmed seqs, although it works perfectly for each seq seperately #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. copy fwd.fastq in one dir
2. copy rvs.fastq in the same dir
3. fastq-join fwd.fastq rvs.fastq -o c1

What is the expected output? What do you see instead?
I expect three joined reads. Everything goes right if I process each of the 
separately!

But I see just an error:
*** glibc detected *** fastq-join: realloc(): invalid next size: 
0x0000000000ad4e30 ***
======= Backtrace: =========
/lib/libc.so.6(+0x774b6)[0x7f6e8e4ff4b6]
/lib/libc.so.6(+0x7db96)[0x7f6e8e505b96]
/lib/libc.so.6(realloc+0xf0)[0x7f6e8e505eb0]
fastq-join[0x401065]
fastq-join[0x401ce5]
/lib/libc.so.6(__libc_start_main+0xfe)[0x7f6e8e4a6d8e]
fastq-join[0x400c79]
======= Memory map: ========
00400000-00403000 r-xp 00000000 08:05 9579591                            
/usr/local/bin/fastq-join
00602000-00603000 r--p 00002000 08:05 9579591                            
/usr/local/bin/fastq-join
00603000-00604000 rw-p 00003000 08:05 9579591                            
/usr/local/bin/fastq-join
00ad4000-00af5000 rw-p 00000000 00:00 0                                  [heap]
7f6e88000000-7f6e88021000 rw-p 00000000 00:00 0 
7f6e88021000-7f6e8c000000 ---p 00000000 00:00 0 
7f6e8e488000-7f6e8e602000 r-xp 00000000 08:05 4458098                    
/lib/libc-2.12.1.so
7f6e8e602000-7f6e8e801000 ---p 0017a000 08:05 4458098                    
/lib/libc-2.12.1.so
7f6e8e801000-7f6e8e805000 r--p 00179000 08:05 4458098                    
/lib/libc-2.12.1.so
7f6e8e805000-7f6e8e806000 rw-p 0017d000 08:05 4458098                    
/lib/libc-2.12.1.so
7f6e8e806000-7f6e8e80b000 rw-p 00000000 00:00 0 
7f6e8e80b000-7f6e8e820000 r-xp 00000000 08:05 4456504                    
/lib/libgcc_s.so.1
7f6e8e820000-7f6e8ea1f000 ---p 00015000 08:05 4456504                    
/lib/libgcc_s.so.1
7f6e8ea1f000-7f6e8ea20000 r--p 00014000 08:05 4456504                    
/lib/libgcc_s.so.1
7f6e8ea20000-7f6e8ea21000 rw-p 00015000 08:05 4456504                    
/lib/libgcc_s.so.1
7f6e8ea21000-7f6e8eaa3000 r-xp 00000000 08:05 4461329                    
/lib/libm-2.12.1.so
7f6e8eaa3000-7f6e8eca2000 ---p 00082000 08:05 4461329                    
/lib/libm-2.12.1.so
7f6e8eca2000-7f6e8eca3000 r--p 00081000 08:05 4461329                    
/lib/libm-2.12.1.so
7f6e8eca3000-7f6e8eca4000 rw-p 00082000 08:05 4461329                    
/lib/libm-2.12.1.so
7f6e8eca4000-7f6e8ed8c000 r-xp 00000000 08:05 1313209                    
/usr/lib/libstdc++.so.6.0.14
7f6e8ed8c000-7f6e8ef8b000 ---p 000e8000 08:05 1313209                    
/usr/lib/libstdc++.so.6.0.14
7f6e8ef8b000-7f6e8ef93000 r--p 000e7000 08:05 1313209                    
/usr/lib/libstdc++.so.6.0.14
7f6e8ef93000-7f6e8ef95000 rw-p 000ef000 08:05 1313209                    
/usr/lib/libstdc++.so.6.0.14
7f6e8ef95000-7f6e8efaa000 rw-p 00000000 00:00 0 
7f6e8efaa000-7f6e8efca000 r-xp 00000000 08:05 4461330                    
/lib/ld-2.12.1.so
7f6e8f1a6000-7f6e8f1ab000 rw-p 00000000 00:00 0 
7f6e8f1c5000-7f6e8f1ca000 rw-p 00000000 00:00 0 
7f6e8f1ca000-7f6e8f1cb000 r--p 00020000 08:05 4461330                    
/lib/ld-2.12.1.so
7f6e8f1cb000-7f6e8f1cc000 rw-p 00021000 08:05 4461330                    
/lib/ld-2.12.1.so
7f6e8f1cc000-7f6e8f1cd000 rw-p 00000000 00:00 0 
7fff309b5000-7fff309d6000 rw-p 00000000 00:00 0                          [stack]
7fff309ff000-7fff30a00000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  
[vsyscall]

What version of the product are you using? On what operating system?
ea-utils.1.1.1-237.tar.gz, but also tried older version or those precompiled 
from CentOs rpm (same problem).

Please provide any additional information below.

Original issue reported on code.google.com by boykeb...@gmail.com on 30 Nov 2011 at 12:34

Attachments:

GoogleCodeExporter commented 8 years ago
Program quits at line 352. But I can't debug that, because I am not familiar 
with that code.

Original comment by boykeb...@gmail.com on 1 Dec 2011 at 12:19

GoogleCodeExporter commented 8 years ago
The problem occurs where revcomp changes the size of the buffer for the reverse 
read's reverse compliment.  Since the reverse reads are changing in size, this 
realloc() is getting exercised, and it doesn't quite work. 

Original comment by wltri...@gmail.com on 4 Dec 2011 at 4:39

GoogleCodeExporter commented 8 years ago
A colleague of mine friendly fixed that problem exchanging lines 351 and 352 
with:
                d->seq.s=(char *) realloc(s->seq.s, (d->seq.a=(s->seq.n)*1000));
                d->qual.s=(char *) realloc(s->qual.s, (d->qual.a=(s->qual.n)*1000));
She said its a little bit dirty, but it works fine for me!

Original comment by boykeb...@gmail.com on 6 Dec 2011 at 6:36

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Fix Committed revision 260.

Original comment by earone...@gmail.com on 11 Jan 2012 at 5:47