function chado_reverse_compliment_sequence
3.x tripal_chado.feature.api.inc | chado_reverse_compliment_sequence($sequence) |
Performs a reverse compliment of a nucleotide sequence.
Parameters
$sequence: The nucelotide sequence.
Return value
an upper-case reverse complemented sequence.
Related topics
2 calls to chado_reverse_compliment_sequence()
- chado_get_feature_sequences in tripal_chado/
api/ modules/ tripal_chado.feature.api.inc - Retrieves the sequences for a given feature.
- tripal_reverse_compliment_sequence in tripal_chado/
api/ modules/ tripal_chado.module.DEPRECATED.api.inc - Performs a reverse compliment of a nucleotide sequence.
File
- tripal_chado/
api/ modules/ tripal_chado.feature.api.inc, line 64 - Provides API functions specificially for managing feature records in Chado.
Code
function chado_reverse_compliment_sequence($sequence) {
$seq = strtoupper($sequence);
$seq = strrev($seq);
$seq = str_replace("A", "t", $seq);
$seq = str_replace("T", "a", $seq);
$seq = str_replace("G", "c", $seq);
$seq = str_replace("C", "g", $seq);
$seq = str_replace("Y", "r", $seq);
$seq = str_replace("R", "y", $seq);
$seq = str_replace("W", "w", $seq);
$seq = str_replace("S", "s", $seq);
$seq = str_replace("K", "m", $seq);
$seq = str_replace("M", "k", $seq);
$seq = str_replace("D", "h", $seq);
$seq = str_replace("V", "b", $seq);
$seq = str_replace("H", "d", $seq);
$seq = str_replace("B", "v", $seq);
return strtoupper($seq);
}