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

v1.2.0 does not work with FASTA files #38

Closed
kmnip opened this issue Jan 27, 2020 · 4 comments
Closed

v1.2.0 does not work with FASTA files #38

kmnip opened this issue Jan 27, 2020 · 4 comments
Assignees
Labels

Comments

@kmnip
Copy link
Collaborator

kmnip commented Jan 27, 2020

ntCard version 1.2.0 histograms for FASTA and FASTQ files are different.
I think there is a bug in parsing FASTA files.
Here is an example:

test.fasta

>1
CACACACACAAAATCAGTACGTAGCTGATCGTACGATCGTACGATCGTAGCTAGCTAGCTGATGCTAGCTGACTGATCGTAGCTATGTAGCTGATCGATCGTGATCGATCGTACGTAGCTGATGATCGTACGTAGCTAGCTAGCTGATCGATCGATCGTACGTACGTACGTAGTCGATCGTA

histogram:

F1      0
F0      0
1       9223372036854775808
2       9223372036854775808
3       9223372036854775808
4       9223372036854775808
...

test.fastq

@1
CACACACACAAAATCAGTACGTAGCTGATCGTACGATCGTACGATCGTAGCTAGCTAGCTGATGCTAGCTGACTGATCGTAGCTATGTAGCTGATCGATCGTGATCGATCGTACGTAGCTGATGATCGTACGTAGCTAGCTAGCTGATCGATCGATCGTACGTACGTACGTAGTCGATCGTA
+1
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

histogram:

F1      158
F0      128
1       128
2       0
3       0
4       0
...
@kmnip kmnip added the bug label Jan 27, 2020
@hmohamadi
Copy link
Collaborator

hmohamadi commented Jan 27, 2020

The old version works.

./ntcard -k25 -p test test.fa

F1      158
F0      128
1       128
2       0
3       0
4       0
5       0
6       0

Found the error in new version. seq should be line.

@jwcodee
Copy link
Member

jwcodee commented Jan 27, 2020

@hmohamadi yup, that is correct. I'm suprised the old one didnt fail given that I only changed if the if condition for function. Never mind, I broke the code. Shouldn't copy and paste

@hmohamadi
Copy link
Collaborator

@jowong4 in FASTA processing I designed it to read multiline FASTA records. So we have line which can be multiple seq.

@hmohamadi hmohamadi self-assigned this Jan 27, 2020
@jwcodee
Copy link
Member

jwcodee commented Jan 27, 2020

Fixed in 8ebca4a. Thanks @hmohamadi .

@jwcodee jwcodee closed this as completed Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants