-
-
Save webyroki/f3cde4f7282c30c53a67e737a345bfad to your computer and use it in GitHub Desktop.
Замена букв, на указанные
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- $this->assertEquals("TTTT", DNA_strand("AAAA")); | |
$this->assertEquals("AAAA", DNA_strand("TTTT")); | |
$this->assertEquals("TAACG", DNA_strand("ATTGC")); | |
$this->assertEquals("ATTGC", DNA_strand("TAACG")); | |
$this->assertEquals("CATA", DNA_strand("GTAT")); | |
$this->assertEquals("GTAT", DNA_strand("CATA")); --> | |
function DNA_strand($dna) { | |
$from= "ATCG"; | |
$to = "TAGC"; | |
$DNA = strtr($dna, $from, $to); | |
echo $DNA; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment