tamilahey / ea-utils

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

fastq-mcf: invalid adapter file ==> Floating point exception #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

$ cat test_empty_seq_line.fa 
>test1

>test2
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
>test3
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT

$ /software/ea-utils/ea-utils-svn/bin/fastq-mcf test_noseq_line.fa test.fq.gz
Scale used: 2.2
Phred: 33
Threshold used: 751 out of 300000
Adapter test1 (): counted 300000 at the 'start' of 
'DMPABP_JO15_Gal4.clean.fq.gz', clip set to 0, warning end was not reliable
Adapter test3 (TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT): counted 
11363 at the 'end' of 'DMPABP_JO15_Gal4.clean.fq.gz', clip set to 4
Files: 1
Floating point exception (core dumped)

$ cat test_no_seq_line.fa 
>test1
>test2
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
>test3
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT

$ /software/ea-utils/ea-utils-svn/bin/fastq-mcf test_no_seq_line.fa test.fq.gz

Malformed adapter fasta record at line 3
Scale used: 2.2
Phred: 33
Threshold used: 751 out of 300000
No adapters found, no skewing detected, and no trimming needed.
Files: 1
@HWI-ST571:356:C2C51ACXX:4:1201:1288:2123 1:N:0:TTTGGC
GACTCCTGAGTAGCTGGGATTACGGGCGCAGGCCACCACACCCAGCTAATT
+
C@@FFFFDHGHBFGDIGIBGHIIIJIH):@GGBH@FHIJDHJIEAAEEHAE
@HWI-ST571:356:C2C51ACXX:4:1201:1326:2156 1:N:0:TTAGGC
CAGGGGAAACTTGGCCTCGATGGGCACCAGGGTGGTGTAGGTCTGTTTCAC
+

...

$ cat test_no_seq_line_with2seq.fa 
>test1
>test2
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

$ /software/ea-utils/ea-utils-svn/bin/fastq-mcf test_no_seq_line_with2seqs.fa 
test.fq.gz | head -n50
Scale used: 2.2
Phred: 33
Threshold used: 751 out of 300000
No adapters found, no skewing detected, and no trimming needed.
Files: 1
@HWI-ST571:356:C2C51ACXX:4:1201:1288:2123 1:N:0:TTTGGC
GACTCCTGAGTAGCTGGGATTACGGGCGCAGGCCACCACACCCAGCTAATT
+
C@@FFFFDHGHBFGDIGIBGHIIIJIH):@GGBH@FHIJDHJIEAAEEHAE
@HWI-ST571:356:C2C51ACXX:4:1201:1326:2156 1:N:0:TTAGGC
CAGGGGAAACTTGGCCTCGATGGGCACCAGGGTGGTGTAGGTCTGTTTCAC
+
CCCFFFFFHHHHHJJJJJJHIJJJJJJJJJJJ?DH@FFGIJFHGGHGIJJJ
...

What is the expected output? What do you see instead?

When an empty sequence is given in the adapter.fa file, fastq-mcf crashes.

When a corrupt adapter.fa file is given (lines next after each other start both 
with ">"), only a warning is printed when there are 2.5 sequences.

When a corrupt adapter.fa file is given (lines next after each other start both 
with ">"), no warning is printed when there are 1.5 sequences.

It would be nice if those problems could be fixed.
Instead of a warning that is displayed when there is something wrong in the 
adapter.fa file, it might be a good idea to error out by default if that 
happens (with optionally an option to override this behaviour).

What version of the product are you using? On what operating system?
svn version

Original issue reported on code.google.com by hulselma...@gmail.com on 4 Dec 2013 at 7:09

GoogleCodeExporter commented 9 years ago
i agree, i think crashing or erroring out is probably better than warning

Original comment by earone...@gmail.com on 13 Dec 2013 at 4:42