Login | Register

Info | Home

BioPHP - DNA is palindromics

Original code submitted by joseba
Code bellow is covered by GNU GPL v2 license.

Description

Last change: 2010/10/18 17:04 | Edit description | Recent Changes | Original description
This is my proposal to substitute is_palindrome function from GenePHP. I
have just tried to make it simple.
By using function RevComp_DNA2 it allows searching within sequences with
degenerated nucleotides
Although its length is not odd, a pattern like TATANTATA will be
considered palindromic
Uses function RevComp_DNA2

Code

Last change: 2010/10/18 17:04 | Edit Code | Recent Changes | Download | Original code
function DNA_is_palindrome($string){
        if ($string==RevComp_DNA2($string)){
                return TRUE;
                }else{
                return FALSE;
                }
}