load_seq

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

loads unaligned sequences from file

Parameters:
  • filename (str) – path to sequence file

  • format (str) – sequence file format, if not specified tries to guess from the path suffix

  • moltype (str) – the moltype, eg DNA, PROTEIN, ‘dna’, ‘protein’

  • label_to_name (callable) – function for converting original name into another name.

  • parser_kw (dict) – optional arguments for the parser

  • info (dict) – a dict from which to make an info object

  • **kw – other keyword arguments passed to SequenceCollection

Notes

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

Return type:

Sequence