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

feat: deprecate old alignment params #1270

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

ivan-aksamentov
Copy link
Member

@ivan-aksamentov ivan-aksamentov commented Oct 11, 2023

Here I deprecate some of the alignment params which lost their use after the alignment algo was changed.

I emit an error if any of these parameters are still present in CLI args and/or in dataset's pathogen.json. We could also make it a warning.

@vercel
Copy link

vercel bot commented Oct 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nextclade ✅ Ready (Inspect) Visit Preview Oct 12, 2023 1:56am

@ivan-aksamentov ivan-aksamentov marked this pull request as draft October 11, 2023 06:49
Comment on lines +187 to +192
(o!("--min-seeds (minSeeds)"), &self.min_seeds),
(o!("--seed-length (seedLength)"), &self.seed_length),
(o!("--seed-spacing (seedSpacing)"), &self.seed_spacing),
(o!("--min-match-rate (minMatchRate)"), &self.min_match_rate),
(o!("--mismatches-allowed (mismatchesAllowed)"), &self.mismatches_allowed),
(o!("--max-indel (maxIndel)"), &self.max_indel),
Copy link
Member Author

@ivan-aksamentov ivan-aksamentov Oct 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the params being deprecated.

And the error message is constructed just below this fragment.

Let's use `kmer_length` instead of removed `seed_length` and adjust the coefficient to roughly match the old value.
@@ -46,7 +46,7 @@ pub fn align_nuc(
);
}

if ref_len + qry_len < (10 * params.seed_length) {
if ref_len + qry_len < (20 * params.kmer_length) {
// for very short sequences, use full square
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to Richard's recommendation, for short sequence check let's use kmer_length instead of removed seed_length and adjust the coefficient to roughly match the old value.

@ivan-aksamentov ivan-aksamentov marked this pull request as ready for review October 12, 2023 01:49
@ivan-aksamentov ivan-aksamentov merged commit 71d3a59 into master Oct 12, 2023
16 checks passed
@ivan-aksamentov ivan-aksamentov deleted the feat/deprecate-old-aln-params branch October 12, 2023 03:49
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