remove.gaps-methods: Removing gaps from 'Dna' object

remove.gaps-methodsR Documentation

Removing gaps from Dna object

Description

Removing gaps("-") from Dna object

Usage

## S4 method for signature 'Dna'
remove.gaps(x,entire.col=FALSE)

Arguments

x

an object of class Dna.

entire.col

boolean; entire columns with gaps are removed if this is TRUE. See also ‘Details’.

Details

If entire.col==TRUE, alignment is preserved. If it is FALSE, end gaps are introduced to sequence matrix.

Value

an object of class Dna.

Methods

signature(x = "Dna")

Author(s)

Caner Aktas, caktas.aca@gmail.com

Examples


data("dna.obj")

## original data
x<-dna.obj 
range(x)
x@seqlengths

## Only gaps '-' are removed from sequences.
x<-remove.gaps(dna.obj, entire.col=FALSE)
range(x)
x@seqlengths

## entire columns with gaps are removed.
x<-remove.gaps(dna.obj, entire.col=TRUE)
range(x)
x@seqlengths



haplotypes documentation built on July 26, 2023, 5:22 p.m.