schemarecomb.parent_alignment.choose_candidates¶
- schemarecomb.parent_alignment.choose_candidates(candidate_sequences, existing_parents, num_additional, desired_identity)¶
Choose the ideal set of candidate sequences.
Ideal set is defined as the set of candidates with the minimum max_diff, where max_diff is the maximum cross-wise abs(% identity - desired_identity) between each pair of sequences in the concatenation of the set and parents.
- Parameters
candidate_sequences (
list[SeqRecord]) – Sequences able to be selected.existing_parents (
list[SeqRecord]) – Parent sequences in the library already.num_additional (
int) – Number of candidate sequences to choose.desired_identity (
float) – Ideal cross-wise identity between all sequences in the concatenation set of parents and selected candidates.
- Return type
list[SeqRecord]- Returns
Ideal set of candidate SeqRecords.
- Raises
ValueError – if nonpositive num_additional provided, desired_identity not bet 0.0 and 1.0 (noninclusive), or less candidate_sequences than num_additional provided.