GrammaredSequence.
degap
()[source]¶Return a new sequence with gap characters removed.
State: Stable as of 0.4.0.
Returns: | GrammaredSequence
|
---|
See also
Notes
The type and metadata of the result will be the same as the biological sequence. If positional metadata is present, it will be filtered in the same manner as the sequence characters and included in the resulting degapped sequence.
Examples
>>> from skbio import DNA
>>> s = DNA('GGTC-C--ATT-C.',
... positional_metadata={'quality':range(14)})
>>> s.degap()
DNA
-----------------------------
Positional metadata:
'quality': <dtype: int64>
Stats:
length: 9
has gaps: False
has degenerates: False
has non-degenerates: True
GC-content: 55.56%
-----------------------------
0 GGTCCATTC