schrodinger.test.hypothesis.strategies.proteins module¶
- schrodinger.test.hypothesis.strategies.proteins.generated_annotation_lists()[source]¶
Returns a strategy providing a list of annotations
- class schrodinger.test.hypothesis.strategies.proteins.AlignmentInfo(seqs=(), cysteines_to_bond=(), anchor_residues=())[source]¶
Bases:
object
- __init__(seqs=(), cysteines_to_bond=(), anchor_residues=())[source]¶
An object that can be used in alignment tests
This object can be used to create an alignment, along with fixtures adapted to the alignment that can be used in testing it. We use this object so that different tests can create different kinds of alignments (regular kinds and undoable alignments).
- Parameters
seqs – List of sequences to be used in constructing an alignment
- schrodinger.test.hypothesis.strategies.proteins.generated_residues(residue_types=None, gaps=True)[source]¶
- Parameters
draw (function) – A function supplied by hypothesis
residue_types (list(residue.ElementType)) – Alphabet to use for residues. By default, it will use 95% standard and 5% nonstandard protein amino acids.
gaps (bool) – Whether to include gaps in default residue types
- Returns
A residue suitable for testing
- Return type
- schrodinger.test.hypothesis.strategies.proteins.cysteine_pair_lists(residues)[source]¶
Given an iterable of residues, returns a list of tuples of cysteine pairs
- Parameters
draw (function) – A function supplied by hypothesis
residues (iterable) – An iterable of residues
- Return type
list(tuple)
- Returns
A list of tuples of cysteine pairs
- schrodinger.test.hypothesis.strategies.proteins.generated_sequences(min_size=0, max_size=None, residue_types=None, include_gaps=True, add_cysteine_bonds=True)[source]¶
- Parameters
draw (function) – A function supplied by hypothesis
min_size (int) – Minimum length for sequences
max_size (int) – Maximum number of residues to include in the sequence
residue_types (list(residue.ElementType)) – Alphabet to use for residues
include_gaps (bool) – Whether to generate gaps in the sequence
- Returns
A protein sequence suitable for testing
- Return type
- schrodinger.test.hypothesis.strategies.proteins.generated_multichain_sequences(min_chain_size=0, max_chain_size=None, min_num_chains=1, max_num_chains=None, residue_types=None, include_gaps=True)[source]¶
Generates multiple sequences that represent different chains of a single protein.
- Parameters
draw (function) – A function supplied by hypothesis
min_chain_size (int) – The minimum length of each chain’s sequence
max_chain_size (int) – The maximum length of each chain’s sequence
min_num_chains – The minimum number of chains in the protein. Must be positive.
max_num_chains – The maximum number of chains in the protein. Must be less than or equal to 62 since each chain needs a unique single-character name.
residue_types (list(residue.ElementType)) – Alphabet to use for residues
include_gaps (bool) – Whether to generate gaps in the sequence
- Returns
The generated sequences
- Return type
- schrodinger.test.hypothesis.strategies.proteins.alignment_infos(include_interseq_ss_bonds=True, include_anchor_residues=False, **kwargs)[source]¶
Returns everything we need to create an alignment. Takes in
kwargs
to pass tostrategies.lists()
.We return an alignment_info instead of an alignment in order to allow tests to create different kinds of alignments and also to pass along additional test data customized to the alignment that the test will create.
- Returns
A test fixture for alignment tests
- Return type