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

fasta to nexus conversion -- ValueError: Sequences must all be the same length #81

Open
asttra opened this issue Nov 30, 2019 · 2 comments

Comments

@asttra
Copy link

asttra commented Nov 30, 2019

Can anyone tell me why I am getting this error and how to fix it?

/projects/nanopore-working/niki/bin/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: This module has been deprecated. We encourage users to switch to alternative libraries implementing a trie data structure, for example pygtrie.

return f(*args, **kwds)

/projects/nanopore-working/niki/bin/anaconda3/lib/python3.6/site-packages/Bio/triefind.py:34: BiopythonDeprecationWarning: This module has been deprecated. We encourage users to switch to alternative libraries implementing a trie data structure, for example pygtrie.

"for example pygtrie.", BiopythonDeprecationWarning)

Traceback (most recent call last):
  File "/projects/nanopore-working/niki/bin/anaconda3/bin/seqmagick", line 10, in <module>
    sys.exit(main())
  File "/projects/nanopore-working/niki/bin/anaconda3/lib/python3.6/site-packages/seqmagick/scripts/cli.py", line 29, in main
    return action(arguments)
  File "/projects/nanopore-working/niki/bin/anaconda3/lib/python3.6/site-packages/seqmagick/subcommands/convert.py", line 354, in action
    transform_file(src, dest, arguments)
  File "/projects/nanopore-working/niki/bin/anaconda3/lib/python3.6/site-packages/seqmagick/subcommands/convert.py", line 318, in transform_file
    SeqIO.write(records, destination_file, destination_file_type)
  File "/projects/nanopore-working/niki/bin/anaconda3/lib/python3.6/site-packages/Bio/SeqIO/__init__.py", line 537, in write
    alignment = MultipleSeqAlignment(sequences)
  File "/projects/nanopore-working/niki/bin/anaconda3/lib/python3.6/site-packages/Bio/Align/__init__.py", line 170, in __init__
    self.extend(records)
  File "/projects/nanopore-working/niki/bin/anaconda3/lib/python3.6/site-packages/Bio/Align/__init__.py", line 531, in extend
    self._append(rec, expected_length)
  File "/projects/nanopore-working/niki/bin/anaconda3/lib/python3.6/site-packages/Bio/Align/__init__.py", line 594, in _append
    raise ValueError("Sequences must all be the same length")

ValueError: Sequences must all be the same length

@eharkins
Copy link
Collaborator

eharkins commented Dec 3, 2019

@asttra since you are converting to nexus format I think you must have your sequences aligned / all the same length.

@ozankiratli
Copy link

you can use muscle to align your sequences to same length

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

No branches or pull requests

3 participants