ntfreq: ntfreq

Description Usage Arguments Value Author(s) Examples

Description

Calculates nucleotide frequency of reads in bam file

Usage

1
ntfreq(bam_file, ntlength, toRNA = TRUE, count_type = "total")

Arguments

bam_file

An object of class data.frame or DataFrame

ntlength

An integer specifying the length of the sequence to quantify

toRNA

A logical value on whether to translate the DNA sequence to RNA

count_type

A character string on how to count the nucleotides. Can be either "total" or "unique". If total is selected, the function will look for the countcolumn and multiply the reads by its number of occurence when calculating the frequency.

Value

Returns a data.frame of the frequency of nucleotides (either A/C/G/T or A/C/G/U) at each position up to the specified ntlength

Author(s)

Diana H.P. Low

Examples

1
2
data(ssviz)
freq<-ntfreq(pctrlbam,ntlength=10)

ssviz documentation built on Nov. 8, 2020, 5:53 p.m.