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

Fixed stand-alone version of multiple-seq-alignment #218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

litwinowicz
Copy link

Deblur throws the following error:

AttributeError: 'str' object has no attribute 'to_fasta'

when running

deblur multiple-seq-alignment

This error stems from the multiple_sequence_alignment returning string containing the path to created .msa file and not the Sequence object.
Two changes have been made to fix this issue:

  1. optional output_fp argument has been added to multiple_sequence_alignment. To avoid breaking the existing code, if output_fp is not provided, then behavior does not change. If output_fp is provided, then msa_fp gets assigned to output_fp, resulting in the creation of multiple sequence alignment file in a path specified by output_fp.
  2. In the multiple_seq_alignment function additional argument output_fp=output_fp is passed to multiple_sequence_alignment; since this already results in the creation of the requested msa file, the problematic code:
    with open(output_fp, 'w') as f:
        f.write(alignment.to_fasta())

can be removed.

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