maskFASTA: Mask FASTA sequence at defined regions.

View source: R/maskFasta.R

maskFASTAR Documentation

Mask FASTA sequence at defined regions.

Description

Mask FASTA sequence at defined regions.

Usage

maskFASTA(
  fasta.file,
  mask.ranges = NULL,
  invert = FALSE,
  mask.character = "N",
  fasta.save = NULL
)

Arguments

fasta.file

A path to a FASTA file to be masked.

mask.ranges

A IRanges-class object of coordinates to be masked in input FASTA.

invert

If set TRUE ranges defined in 'mask.ranges' will be kept while the rest of the FASTA will be masked.

mask.character

A single character to be used for masking (Default : 'N').

fasta.save

A path to a filename where to store final FASTA file.

Value

A DNAStringSet-class object with masked regions

Author(s)

David Porubsky

Examples

## FASTA sequence to mask
fasta.file <- system.file("extdata", "test4_query.fasta", package = "SVbyEye")
## Define ranges to mask
mask.ranges <- IRanges::IRanges(start = c(11, 1981), end = c(20, 1990))
## Mask FASTA sequence at defined ranges
maskFASTA(fasta.file = fasta.file, mask.ranges = mask.ranges)
## Mask FASTA sequence except of defined ranges
maskFASTA(fasta.file = fasta.file, mask.ranges = mask.ranges, invert = TRUE)


daewoooo/SVbyEye documentation built on Oct. 15, 2024, 6:12 a.m.