Sequence Tools¶
This module defines functions and constants related to sequences.
-
splitSeqLabel
(label)[source]¶ Returns label, starting residue number, and ending residue number parsed from sequence label.
-
alignBioPairwise
(a_sequence, b_sequence, ALIGNMENT_METHOD='local', MATCH_SCORE=1.0, MISMATCH_SCORE=0.0, GAP_PENALTY=-1.0, GAP_EXT_PENALTY=-0.1, max_alignments=1)[source]¶ Wrapper function to align two sequences using Biopython to support deprecation and associated warnings.
It first attempts to use
Bio.Align.PairwiseAligner
and formats the output to matchBio.pairwise2
methods and if it doesn’t find it then it defaults back toBio.pairwise2
methods.Parameters: - a_sequence (str) – first sequence to align
- b_sequence (str) – second sequence to align
- ALIGNMENT_METHOD (str) – method for pairwise2 alignment
Possible values are
"local"
and"global"
- MATCH_SCORE (int) – a positive integer, used to reward finding a match
- MISMATCH_SCORE (int) – a negative integer, used to penalise finding a mismatch
- GAP_PENALTY (int) – a negative integer, used to penalise opening a gap
- GAP_EXT_PENALTY (int) – a negative integer, used to penalise extending a gap
- max_alignments (int) – maximum number of alignments to extract