df2pfm: Turn a data.frame with sequences into a positional frequency...

View source: R/pwm_utils.R

df2pfmR Documentation

Turn a data.frame with sequences into a positional frequency matrix.

Description

Given a dataframe with a column called 'Sequence' it transforms the sequences into a matrix where the frequency of each letter in the alphabet is counted at every position

Usage

df2pfm(data, ID_col, alphabet)

Arguments

data

A data.frame with a minimum of 2 columns. One named Sequence, the other named as you prefer that will be specified with ID_col.

ID_col

The name of the column in data to be used as the identifier of the Sequence column.

alphabet

A character vector containing the alphabet letters present in Sequence. Guessed by default.

Details

For a great song click here.

Value

A data frame with positional frequencies.


Ni-Ar/niar documentation built on Feb. 3, 2025, 9:25 a.m.