load_seq

load_seq(filename: Union[str, pathlib.Path], format: Optional[str] = None, moltype: Optional[str] = None, label_to_name: Optional[Callable] = None, parser_kw: Optional[dict] = None, info: Optional[dict] = None, **kw) cogent3.core.sequence.Sequence

loads unaligned sequences from file

Parameters
filenamestr

path to sequence file

formatstr

sequence file format, if not specified tries to guess from the path suffix

moltypestr

the moltype, eg DNA, PROTEIN, ‘dna’, ‘protein’

label_to_namecallable

function for converting original name into another name.

parser_kwdict

optional arguments for the parser

infodict

a dict from which to make an info object

**kw

other keyword arguments passed to SequenceCollection

Returns
Sequence

Notes

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