dasi.models.AlignmentContainerFactory

class dasi.models.AlignmentContainerFactory(seqdb)[source]

Bases: object

Class that maintains a shared list of alignments and shared sequence database.

AlignmentContainers can be retrieved in a dict grouped by their query via .containers()

Construct a new AlignmentContainer.

Parameters

seqdb (Dict[str, SeqRecord]) – a sequence record database

Attributes

alignments

Return dict of alignments keyed by query_key.

Methods

containers()

Return dictionary of AlignmentContainers keyed by query_keys.

load_blast_json(data, atype)

Create alignments from a formatted BLAST JSON result.

__init__(seqdb)[source]

Construct a new AlignmentContainer.

Parameters

seqdb (Dict[str, SeqRecord]) – a sequence record database

Methods

__init__(seqdb)

Construct a new AlignmentContainer.

containers()

Return dictionary of AlignmentContainers keyed by query_keys.

load_blast_json(data, atype)

Create alignments from a formatted BLAST JSON result.

AlignmentContainerFactory.set_alignments

Attributes

alignments

Return dict of alignments keyed by query_key.

valid_types

property alignments

Return dict of alignments keyed by query_key.

Return type

frozendict

Returns

containers()[source]

Return dictionary of AlignmentContainers keyed by query_keys.

Return type

Dict[str, AlignmentContainer]

Returns

load_blast_json(data, atype)[source]

Create alignments from a formatted BLAST JSON result.

Parameters
  • data (List[Dict]) – formatted BLAST JSON result

  • atype (str) – the type of alignment to initialize

Returns

None