Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NxTrim-0.4.0 Segmentation fault (core dumped) #17

Closed
wangyugui opened this issue Mar 27, 2016 · 4 comments
Closed

NxTrim-0.4.0 Segmentation fault (core dumped) #17

wangyugui opened this issue Mar 27, 2016 · 4 comments

Comments

@wangyugui
Copy link

[root@T630 NxTrim-0.4.0]# ./nxtrim -1 /arch/fastq/juglans.DNA/Mate/SRR2057824_1.fastq.gz -2 /arch/fastq/juglans.DNA/Mate/SRR2057824_2.fastq.gz -O mate
Output: mate.*.fastq.gz
Trimming:
R1: /arch/fastq/juglans.DNA/Mate/SRR2057824_1.fastq.gz
R2: /arch/fastq/juglans.DNA/Mate/SRR2057824_2.fastq.gz
Segmentation fault (core dumped)
[root@T630 NxTrim-0.4.0]# gdb ./nxtrim ./core.76735

(gdb) where
#0 0x00007fb25dd99961 in __strlen_sse2_pminub () from /lib64/libc.so.6
#1 0x00000000004082cd in fastqReader::next(fqread&) ()
#2 0x0000000000408b04 in pairReader::next(readPair&) ()
#3 0x000000000040264d in main ()

(gdb) q
[root@T630 NxTrim-0.4.0]# zless /arch/fastq/juglans.DNA/Mate/SRR2057824_1.fastq.gz
[root@T630 NxTrim-0.4.0]# zless /arch/fastq/juglans.DNA/Mate/SRR2057824_1.fastq.gz|head
@DJB77P1:542:H881JADXX:1:1101:1162:2100
NTTTATTTTTTTTCTTTTTCCTCTCGGTTTCTCTCTGTCTCTCACCGTGTGCTTCTCTCGATCATCTCTCTCTCCCTCTCTATCATTTTTTCAACTGCCCAGGCACCTGTCTCTNATACACATCTAGATGTGTATAAGAGACAGGAGTGTG
+DJB77P1:542:H881JADXX:1:1101:1162:2100
#1=BDFDDHDFDHIIIIGHGFEE>FGDBDGH@F9B?DDFGIEGHHGGG;=CCDH>CHEHE?CDBCECCAECCCCCCCC9?C>CCCDDD@CBC@@>@ACAB488ABBA3+:@cc#+88?C@CCC:CAD:BCDDDC>@cc?<B?<9?>:

@DJB77P1:542:H881JADXX:1:1101:1155:2123
TGCGCGAGAAAACTATTGAGTAAAAGGCAAGAAAGTGTGAGACAATTATCTGGAAACTGTCTCTTATACACATCTAGATGTGTATAAGAGACAGGTTCTTGGNTAAATTTATGTNTTGGTTGATGTTTACCCATGTGATCTTGAGTTTGAA
+DJB77P1:542:H881JADXX:1:1101:1155:2123
?@@da@@@FFDHHDEHIHIFCFHI<CFGH@GIEGC9?09?FAGGHIIIIGG8;C=@FGGA=CEAEHEEAA>;;@cc3;3..>BCC@@;9=(58,55::@@#+8?B@@3>@::#+++(+289::4>>>AAC@CC(:(::4>C>C######
@DJB77P1:542:H881JADXX:1:1101:1180:2131
CATTAATTATTGCATACTGCTAGTATATCTAGAAGCATTGCATATTATTTGTCATGTACGAGGAGTATGTAGCCCTGTGTTGCATGTCCCGTCGTTTCAGTCACAATCCAATCCCAAGCGGGGGCTGGGAGCGCCACACAATGTATAGATT
[root@T630 NxTrim-0.4.0]#

@wangyugui
Copy link
Author

Are there any other good tools that can remove adapter of mate pair lib?

The result of trimmomatic 0.35(simple mode) seems Not Good
(the k-mer result reported by fastQC is NOT good)

@wangyugui
Copy link
Author

a dirty fix.

diff --git a/fastqlib.cpp b/fastqlib.cpp
index eff47d7..08a9af2 100755
--- a/fastqlib.cpp
+++ b/fastqlib.cpp
@@ -215,7 +215,12 @@ int fastqWriter::write(readPair & p) {

remove
r.set((string)seq->name.s+(string)+" "+seq->comment.s,(string)seq->seq.s,"+",(string)seq->qual.s);

add
if(seq->comment.s!=NULL){
r.set((string)seq->name.s+" "+seq->comment.s,(string)seq->seq.s,"+",(string)seq->qual.s);
}else{
r.set((string)seq->name.s,(string)seq->seq.s,"+",(string)seq->qual.s);
}

@jaredo
Copy link
Contributor

jaredo commented Mar 27, 2016

Thanks for the bug report. I just pushed a fix (very similar to your own).

The bug was introduced in v0.4.0 when I swapped to kseq for file i/o.

@wangyugui
Copy link
Author

The bug is fixed and please close the issue.

And the result of NxTrim is much better than trimmomatic (simple mode) when mate lib fastq file.
Thanks for your job.

@jaredo jaredo closed this as completed Mar 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants