R/get_bam_chr.R

Defines functions get_bam_chr

Documented in get_bam_chr

#' Helper function to extract chromosome names from a bam file
#' @param bam the path to bam file
#' @keywords internal

get_bam_chr <- function(bam) {
  chr <- GenomeInfoDb::seqnames(GenomeInfoDb::seqinfo(Rsamtools::BamFile(bam)))

  return(chr)
}

Try the ctDNAtools package in your browser

Any scripts or data that you put into this service are public.

ctDNAtools documentation built on March 26, 2020, 7:39 p.m.