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

fix: not erroring out when a non-ACGT base is in the query file #22

Merged
merged 4 commits into from
Dec 7, 2023

Conversation

leoisl
Copy link

@leoisl leoisl commented Dec 7, 2023

Right now if there is even a single non-ACGT base in the query file, COBS will fail with:

DIE: Invalid DNA base pair in query string. Only ACGT are allowed.

This is quite annoying as it is extremely common to have Ns or other non-ACGT bases in assembly, contig, reads files, etc... I'd say COBS query would actually fail more than succeed on random real-data query files.

This PR is a first approach to solve this issue. It simply replaces non-ACGT bases by A. This is what is done MOF-search (https://github.com/karel-brinda/mof-search) and it is an ok approach. Maybe a better approach would be to randomise this replacement character, or receive it as a parameter, or actually skip the kmers, etc, etc... there are many approaches to deal with this that can be discussed and implemented later, but I think it is important to have a first solution to this.

@leoisl leoisl merged commit 458b5b6 into iqbal-lab-org:master Dec 7, 2023
3 checks passed
@leoisl leoisl deleted the fix/non_acgt_bases_in_query branch December 7, 2023 18:35
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

Successfully merging this pull request may close these issues.

1 participant