You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a need to adjust alignment parameters; for example, I have encountered something akin to this issue, and the proposed solution from the author of MAFFT is to adjust one of the MAFFT parameters.
Adjusting alignment parameters via the .seq.align() API might be helpful. A few designs for the user-facing API that I can think of include:
# default aligner is MAFFT, so we can pass through the command line options via kwargs.sequences.seq.align(ep=1.59, op=0.0)
# want to use MUSCLE instead of MAFFTfromseqlike.AlignCommandLineimportMuscleCommandLineasmusclesequences.seq.align(aligner=muscle, muscle_arg1=something, muscle_arg2=something)
The text was updated successfully, but these errors were encountered:
The first example (MAFFT with kwargs) already works as written.
The second example (using MUSCLE) requires some extra wrapper code to align letter annotations
fromseqlike.alignment_commandsimport_generic_aligner_commandline_stdout, _generic_alignmentfromseqlike.AlignCommandLineimportMuscleCommandLinedefmuscle_alignment(seqrecs, preserve_order=True, **kwargs):
"""Align sequences using Muscle 3.8. :param seqrecs: a list or dict of SeqRecord that will be aligned to ref :param preserve_order: if True, reorder aligned seqrecs to match input order. :param **kwargs: additional arguments for alignment command :returns: a MultipleSeqAlignment object with aligned sequences """defcommandline(file_obj, **kwargs):
cline=MuscleCommandline(input=file_obj.name, **kwargs)
return_generic_aligner_commandline_stdout(cline)
# Muscle reorders alignment by default, but don't overwrite 'group' if already setif"group"notinkwargs:
kwargs["group"] =notpreserve_orderreturn_generic_alignment(commandline, seqrecs, preserve_order=preserve_order, **kwargs)
* add commandline wrapper function for Muscle 3.8
* Add mkdocstrings-python
* Modify docstrings to include Nasos' notes on the MuscleAlignment tool.
* Fix mkdocstrings configuration.
* Update changelog.
Co-authored-by: Nasos Dousis <ndousis@tesseratx.com>
Co-authored-by: Eric Ma <ericmjl@users.noreply.github.com>
I have a need to adjust alignment parameters; for example, I have encountered something akin to this issue, and the proposed solution from the author of MAFFT is to adjust one of the MAFFT parameters.
Adjusting alignment parameters via the
.seq.align()
API might be helpful. A few designs for the user-facing API that I can think of include:The text was updated successfully, but these errors were encountered: