1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
# Copyright (c) 2008, Michigan State University.
# Copyright (c) 2021, University of California
"""
screed is a database tool useful for retrieving arbitrary kinds of sequence
data through a on-disk database that emulates a read-only Python dictionary.
For opening a screed database, the 'ScreedDB' class is used. This class
accepts a string file path to a pre-created screed database. Read-only
dictionary methods are implemented here.
For creating a screed database, the 'create_db' function is used. This
function accepts an iterator as an argument which will yield records
from its respective sequence file. create_db will sequentially pull
records from the iterator, writing them to disk in a screed database
until the iterator is done.
Automatic ways for parsing FASTA and FASTQ files are accessed through
the read_fast*_sequences functions. These parse the given sequence
file into a screed database.
Conversion between sequence file types is provided in the ToFastq and
ToFasta functions
"""
from __future__ import absolute_import
from screed.openscreed import ScreedDB
from screed.openscreed import Open as open
from screed.conversion import ToFastq
from screed.conversion import ToFasta
from screed.createscreed import create_db, make_db
from screed.seqparse import read_fastq_sequences
from screed.seqparse import read_fasta_sequences
from screed.dna import rc
from screed.screedRecord import Record
from importlib.metadata import version, PackageNotFoundError
try:
VERSION = version(__name__)
except PackageNotFoundError: # pragma: no cover
try:
from .version import version as VERSION # noqa
except ImportError: # pragma: no cover
raise ImportError(
"Failed to find (autogenerated) version.py. "
"This might be because you are installing from GitHub's tarballs, "
"use the PyPI ones."
)
__version__ = VERSION
|