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

How are gaps to be represented (formating) in the strings? ('-' creates an error) #7

Open
mantzaris opened this issue Sep 9, 2020 · 0 comments

Comments

@mantzaris
Copy link

using the '-' creates an error which is common to represent a gap. It is in my data and is understandable if there is no point in keeping the '-' since they will be introduced later on by the algorithm, but just wanting to know if there is another convention

>>> alignment = aligner.align(reference="ACGTGAGAATTATGGCGCTGTGATT", query="ACGTGGAATTATGCGCTGGATT--")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/cool/.local/lib/python2.7/site-packages/ssw/sswobj.py", line 112, in align
    res = self._align(query, reference, flags, filter_score, filter_distance, mask_length)
  File "/home/cool/.local/lib/python2.7/site-packages/ssw/sswobj.py", line 121, in _align
    _query = self.matrix.convert_sequence_to_ints(query)
  File "/home/cool/.local/lib/python2.7/site-packages/ssw/sswobj.py", line 70, in convert_sequence_to_ints
    _seq_instance[idx] = self.symbol_map[symbol]
KeyError: '-'
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

1 participant