atgcContent: Calculate Percentages of Nucleotides in Reads

Description Usage Arguments Details Value Author(s)

View source: R/atgcContent.R

Description

Calculate percentages of nucleotides A, T, G and C in the input FASTQ or FASTQ file.

Usage

1
2
3
4
atgcContent(

    filename,
    basewise = FALSE)

Arguments

filename

a character string giving the name of input FASTQ/FASTA file

basewise

logical specifying how the percentages are calculated. If TRUE, nucleotide percentages will be calculated for each base position in the read across all the reads. By default, percentages are calculated for the entire dataset.

Details

Sequencing reads could contain letter "N" besides "A", "T", "G" and "C". Percentage of "N" in the read dataset is calcuated as well.

The basewise calculation is useful for examining the GC bias towards the base position in the read. By default, the percentages of nucleotides in the entire dataset will be reported.

Value

A named vector containing percentages for each nucleotide type if basewise is FALSE. Otherwise, a data matrix containing nucleotide percentages for each base position of the reads.

Author(s)

Zhiyin Dai and Wei Shi


Rsubread documentation built on March 17, 2021, 6:01 p.m.