Skip to main content
`Ctrl`+`K`

# load_seq

load_seq(filename: PathLike | str, annotation_path: PathLike | str | None = None, format_name: str | None = None, moltype: MolTypeLiteral = 'text', label_to_name: Callable | None = None, parser_kw: dict | None = None, info: dict | None = None, annotation_offset: int = 0, **kwargs: Any) → Sequence

  loads unaligned sequences from file

  Parameters:
    filename

      path to sequence file

    annotation_path

      path to annotation file, ignored if format is genbank

    format_name

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

    moltype

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

    label_to_name

      function for converting original name into another name.

    parser_kw

      optional arguments for the parser

    info

      a dict from which to make an info object

    annotation_offset

      integer indicating start position relative to annotations

    **kwargs

      other keyword arguments passed to sequence loader

  Returns:
    `Sequence`

  Notes

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