gc_content: Calculate GC content of a DNA sequence

View source: R/gc_content.R

gc_contentR Documentation

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)

Arguments

sequence

A character string containing the DNA sequence.

Value

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

Examples

sequence <- "ATCGAGCTAGCTAGCTAGCTAGCT"
gc_content(sequence)
50

ambu-vijayan/baseq documentation built on May 6, 2023, 10:31 p.m.