Obtain the ATCG content of a gene {oligo}R Documentation

Boxplot

Description

This function accepts a character vector representing the nucleotide sequences and computes the frequencies of each base (A, C, G, T).

Usage

basecontent(seq)

Arguments

seq character vector.

Details

The base frequencies are calculated separately for each element of 'x'. The elements of 'x' can be in upper case, lower case or mixed.

Value

A matrix with 4 columns and 'length(x)' rows. The columns are names 'A', 'C', 'T', 'G', and the values in each column are the counts of the corresponding bases in the elements of 'x'.

Note

Based on MPbasecontent in matchprobes

Examples

seqs <- c("AATCG", "gTCa", "aaaTTTT")
basecontent(seqs)

[Package oligo version 0.99.15 Index]