Skip to main content
`Ctrl`+`K`

# make_aligned_seqs

make_aligned_seqs(data: Mapping[str, str | bytes | NumpyIntArrayType] | list[str | bytes | NumpyIntArrayType] | AlignedSeqsDataABC, *, moltype: MolTypes, label_to_name: Callable[[str], str] | None = None, info: dict[str, Any] | None = None, source: PathType | None = None, annotation_db: AnnotationDbABC | None = None, offset: dict[str, int] | None = None, name_map: dict[str, str] | None = None, is_reversed: bool | None = None, reversed_seqs: set[str] | None = None, storage_backend: str | None = None, **kwargs: Any) → Alignment

  Initialise an aligned collection of sequences.

  Parameters:
    data

      sequence data, a AlignedSeqsData, a dict {name: seq, …}, an iterable of sequences

    moltype

      string representation of the moltype, e.g., ‘dna’, ‘protein’.

    label_to_name

      function for converting original names into other names.

    info

      a dict from which to make an info object

    source

      origins of this data, defaults to ‘unknown’. Converted to a string and added to info[“source”].

    annotation_db

      annotation database to attach to the collection

    offset

      a dict mapping names to annotation offsets

    name_map

      a dict mapping sequence names to “parent” sequence names. The parent name will be used for querying a annotation_db.

    is_reversed

      entire collection has been reverse complemented

    reversed_seqs

      set of names that are on the reverse strand of the parent sequence

    storage_backend

      name of the storage backend to use for the SeqsData object, defaults to cogent3 builtin.

    kwargs

      keyword arguments for the AlignedSeqsData constructor

  Notes

  If no annotation_db is provided, but the sequences are annotated, an annotation_db is created by merging any annotation db’s found in the sequences. If the sequences are annotated AND an annotation_db is provided, only the annotation_db is used.