load_seq

load_seq(
    filename,
    annotation_path=None,
    format_name=None,
    moltype='text',
    label_to_name=None,
    parser_kw=None,
    info=None,
    annotation_offset=0,
    **kwargs,
)

loads unaligned sequences from file

Parameters

Name Type Description Default
filename os.PathLike | str path to sequence file required
annotation_path os.PathLike | str | None path to annotation file, ignored if format is genbank None
format_name str | None sequence file format, if not specified tries to guess from the path suffix None
moltype MolTypeLiteral the moltype, eg DNA, PROTEIN, ‘dna’, ‘protein’ 'text'
label_to_name Callable | None function for converting original name into another name. None
parser_kw dict | None optional arguments for the parser None
info dict | None a dict from which to make an info object None
annotation_offset int integer indicating start position relative to annotations 0
**kwargs typing.Any other keyword arguments passed to sequence loader {}

Notes

Returns one sequence from a file. Use load_aligned_seqs or load_unaligned_seqs to get a collection.

Use cogent3.available_seq_formats() to see the supported formats and file suffixes.

Returns

Name Type Description
Sequence