Skip to content

Instantly share code, notes, and snippets.

@webyroki
Created July 2, 2017 13:50
Show Gist options
  • Save webyroki/f3cde4f7282c30c53a67e737a345bfad to your computer and use it in GitHub Desktop.
Save webyroki/f3cde4f7282c30c53a67e737a345bfad to your computer and use it in GitHub Desktop.
Замена букв, на указанные
<!-- $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