schrodinger.protein.align module¶
-
class
schrodinger.protein.align.AbstractAligner(gap_open_penalty=1, gap_extend_penalty=0.0, sub_matrix=None, direct_scores=False, constraints=None, merge_all=False, ss_constraints=False)¶ Bases:
future.types.newobject.newobjectBase class of objects that can perform an alignment
-
run(aln)¶ Aligns the sequences in an alignment using the parameters supplied on init
Subclasses need to override this default implementation.
Parameters: aln ( schrodinger.protein.alignment.BaseAlignment) – The alignment to align
-
sub_matrix¶ Get or set the sub_matrix.
When setting, it will be converted to a numpy array.
-
-
exception
schrodinger.protein.align.AlignmentException¶ Bases:
exceptions.Exception
-
class
schrodinger.protein.align.BasicAligner(gap_open_penalty=1, gap_extend_penalty=0.0, sub_matrix=None, direct_scores=False, constraints=None, merge_all=False, ss_constraints=False)¶ Bases:
schrodinger.protein.align.AbstractAlignerAligns sequences by simply adding gaps to the ends of sequences to make them the same length
-
run(aln)¶
-
-
class
schrodinger.protein.align.ClustalAligner(gap_open_penalty=1, gap_extend_penalty=0.0, sub_matrix=None, direct_scores=False, constraints=None, merge_all=False, ss_constraints=False)¶ Bases:
schrodinger.protein.align.AbstractAlignerAligns sequences using the Clustal alignment algorithm.
-
class
schrodinger.protein.align.PairwiseAligner(**kwargs)¶ Bases:
schrodinger.protein.align.AbstractAlignerImplementation of the Needleman-Wunsch local alignment algorithm for pairwise sequence alignment.
- ability to merge new sequence with existing alignment,
- ability to penalize gaps in secondary structure elements,
- ability to use custom substitution matrix generated from a family of proteins or provided by the user.
Variables: - CONSTRAINT_SCORE – Reward amount of keeping constrained residues aligned
- RES_IDENT_SCORE – Reward amount for aligning matching residues. Used by default if a substitution matrix is not specified.
- RES_IDENT_PENALTY – Penalty for aligning differing residues. Used by default if a subtitution matrix is not specified
Ctype CONSTRAINT_SCORE: float
Ctype RES_IDENT_SCORE: float
Ctype RES_IDENT_PENALTY: float
-
CONSTRAINT_SCORE= 1000000.0¶
-
RES_IDENT_PENALTY= 0.0¶
-
RES_IDENT_SCORE= 1.0¶
-
getAlignmentScore()¶ Get the score of the alignment. Found by taking the highest value in the scoring matrix.
Returns: Score of the pairwise alignment. :rtype : float
-
run(aln, seqs_to_align=None)¶ Parameters: - aln (alignment.Alignment) – The alignment containing sequences to align.
- seqs_to_align (list of sequence.Sequence or NoneType) – The sequences in
alnto align against the reference sequence ofaln. IfNone, defaults to the first non-reference sequence inaln(iealn[1])
Raises: ValueError – If
seqs_to_aligncontains a sequence not found inaln.
-
class
schrodinger.protein.align.RescodeAligner(gap_open_penalty=1, gap_extend_penalty=0.0, sub_matrix=None, direct_scores=False, constraints=None, merge_all=False, ss_constraints=False)¶ Bases:
schrodinger.protein.align.AbstractAlignerAligns sequences by rescode
-
run(aln)¶
-
-
class
schrodinger.protein.align.SuperpositionAligner(gap_open_penalty=None, gap_extend_penalty=None)¶ Bases:
schrodinger.protein.align.PairwiseAlignerAlign structured sequences based on their superposition.
-
run(aln, seqs_to_align=None)¶ Align sequences based on structure superposition to the reference.
Parameters: - aln (alignment.Alignment) – The alignment containing sequences to align.
- seqs_to_align (list of sequence.Sequence or NoneType) – The sequences in
alnto align against the reference sequence ofaln. IfNone, defaults to the first non-reference sequence inaln(iealn[1])
Raises: - ValueError – If
seqs_to_aligncontains a sequence not found inaln. - ValueError – If the reference sequence or any of
seqs_to_aligndon’t have an associated structure.
-