Learn R Programming

baseq (version 0.1.4)

gc_content: Calculate GC content of a DNA sequence

Description

Calculates the percentage of nucleotides in a DNA sequence that are either guanine (G) or cytosine (C).

Usage

gc_content(sequence)

Value

A numeric value representing the percentage of nucleotides in the sequence that are G or C.

Arguments

sequence

A character string containing the DNA sequence.

Examples

Run this code
sequence <- "ATCGAGCTAGCTAGCTAGCTAGCT"
gc_content(sequence)
50

Run the code above in your browser using DataLab