- biotite.sequence.find_subsequence(sequence, query)¶
Find a subsequence in a sequence.
The sequence to find the subsequence in.
The potential subsequence. Its alphabet must extend the sequence alphabet.
The starting indices in sequence, where query has been found. The array is empty if no match has been found.
If the query alphabet does not extend the sequence alphabet.
>>> main_seq = NucleotideSequence("ACTGAATGA") >>> sub_seq = NucleotideSequence("TGA") >>> print(find_subsequence(main_seq, sub_seq)) [2 6]