R/getflank2.R

Defines functions getflank2

Documented in getflank2

#' @title Extract a specified region of the (human) genome
#' @description This function extracts a specified region of the human genome with corresponding start and end position of the region under study.
#' @param species The human genome (version 19) is default but an alternative genome can be provided. For chimpanzees the parameter has to be BSgenome.Ptroglodytes.UCSC.panTro5 (given that the data is installed).
#' @param chrs A string reflecting the chromosome under study (starting with "chr" and adding either the integers from 1-22 or "X" respectively "Y"). This argument can also be a vector of strings to study several chromosomes.
#' @param start.position An integer value reflecting the start position of the region to be analyzed. If set to \code{NA} the analysis starts from the beginning of the chromosome.
#' @param end.position An integer value reflecting the end position of the region to be analyzed. If set to \code{NA} the analysis is performed until the end of the chromosome.
#' @return The DNA-sequence of the region under study (defined by the chromosome, start position, and end position) is returned.
#' @author Philipp Hermann, \email{philipp.hermann@@jku.at}, Monika Heinzl, \email{monika.heinzl@@edumail.at}
#' Angelika Heissl, Irene Tiemann-Boege, Andreas Futschik
#' @seealso \code{\link{STR_analysis}}
#' @keywords datasets array list methods univar
#' @examples
#' getflank2(BSgenome.Hsapiens.UCSC.hg19::Hsapiens, "chr1", 1, 6)
#' @references Heissl, A., et al. (2019) The impact of poly-A microsatellite heterologies in meiotic recombination. Life Science Alliance, 2(2) e20190036, doi: https://doi.org/10.26508/lsa.201900364
#' @export
getflank2 <- function(species, chrs, start.position, end.position) {
  paste(Biostrings::getSeq(species, chrs, start.position, end.position), sep="")
}
PhHermann/STRAH documentation built on June 7, 2020, 6:15 p.m.