Login | Register

Info | Home

BioPHP - G+C content

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
Computes G+C content of DNA sequence

Code

Last change: 2010/10/18 17:04 | Edit Code | Recent Changes | Download | Original code
function GC_content($seq) {
        $number_of_G=substr_count($seq,"G");
        $number_of_C=substr_count($seq,"C");
        $gc_porcentaje=round(100*($number_of_G+$number_of_C)/strlen($seq),2);
        return $gc_porcentaje;
}