Open
Description
Right now digest_fasta strictly requires a string.
works:
from gtars.digests import digest_fasta
path_to_fasta_file = "../gtars/gtars/tests/data/base.fa"
df = digest_fasta(path_to_fasta_file)
Doesn't work:
from pathlib import Path
p = Path(path_to_fasta_file)
digest_fasta(p)
# TypeError: argument 'fasta': 'PosixPath' object cannot be converted to 'PyString'
Also fails:
digest_fasta(path_to_fasta_file.encode('utf-8'))
TypeError: argument 'fasta': 'bytes' object cannot be converted to 'PyString'
Would it be easy/possible/advisable to make this friendly enough to convert string-like inputs to string automatically?
Raised by @stolarczyk
Metadata
Metadata
Assignees
Labels
No labels
Activity