-
Notifications
You must be signed in to change notification settings - Fork 20
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
ENH: add support for --addfragments flag #71
Conversation
q2_alignment/plugin_setup.py
Outdated
'fragments': 'This flag indicates that alignment optimized for ' | ||
'addition of fragmentary sequences should be used.'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename fragments
to short_fragments
and default to False
?
and rephrase to something like:
'Optimize for the addition for short sequence fragments. For example, primer or amplicon sequences'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like taking the approach of ensuring the plugin parameter name matches the underlying tool flag name - so in this case, addfragments
. I like to think that this helps minimize "translation" confusion when trying to figure out how a wrapper-plugin (like this one) does what it does. What do you think, @mikerobeson?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. That makes sense to me. fragments
it is. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm proposing a third option: addfragments
(instead of fragments
, or short_fragments
), that way the param names match!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like addfragments
. I suppose this would be defaulted False? That is it would do add
by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, changed the param name to addfragments
. Not passing the param flag would default to a plain add
.
q2_alignment/plugin_setup.py
Outdated
'addfragments': 'Optimize for the addition of short sequence ' | ||
'fragments (for example, primer or amplicon ' | ||
'sequences).'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just wondering if we should be a tiny bit more explicit to avoid confusion:
'addfragments': 'Optimize for the addition of short sequence '
'fragments (for example, primer or amplicon '
'sequences). If not set, default sequence addition '
'is used.'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, good point - updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks fine to me. Just wanted to voice my approval. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic, thanks so much for this @misialq!
Thanks so much for the contribution @misialq and for the review @mikerobeson! I have a use case for this now, so very excited to try it out! |
Adds supports for
--addfragments
flag for addition of fragmentary sequences to existing alignments.Since it's just a small variant of
mafft_add
, rather than creating a new action I introduced a new parameter in the existing one that will determine whether the--add
flag (current behaviour) or--addfragments
one should be used.