removeGapCols: Convenience function to remove columns composed mostly of...

View source: R/plotDNA.R

removeGapColsR Documentation

Convenience function to remove columns composed mostly of gaps

Description

Remove columns in an alignment that contain more than a give proportion of gaps (e.g. A-A, G-G to AA,GG).

Usage

removeGapCols(
  seqs,
  gapChars = c("*", "-", "."),
  maxGapProp = 0.9,
  ignoreChars = c()
)

Arguments

seqs

a character vector of sequences

gapChars

a vector of single characters that count as gaps

maxGapProp

remove columns with greater than this proportion of gaps

ignoreChars

a vector of single characters that are ignored i.e. count neither as gaps or towards the total sequence count

Value

A character vector of sequences with gap columns removed

Examples

removeGapCols(c('A-A-','A-AA','A-AT','A-AG'))

sherrillmix/dnaplotr documentation built on Oct. 29, 2022, 4:42 p.m.