readBamFileAsGRanges | R Documentation |
Import aligned reads from a BAM file into a GRanges-class
object.
readBamFileAsGRanges(
file,
bamindex = file,
chromosomes = NULL,
pairedEndReads = FALSE,
min.mapq = 10,
remove.duplicate.reads = TRUE,
pair2frgm = FALSE,
filtAlt = FALSE
)
file |
Bamfile with aligned reads. |
bamindex |
Bam-index file with or without the .bai ending. If this file does not exist it will be created and a warning is issued. |
chromosomes |
If only a subset of the chromosomes should be binned, specify them here. |
pairedEndReads |
Set to |
min.mapq |
Minimum mapping quality when importing from BAM files. |
remove.duplicate.reads |
A logical indicating whether or not duplicate reads should be kept. |
pair2frgm |
Set to |
filtAlt |
Set to |
A GRanges-class
object.
David Porubsky, Aaron Taudt, Ashley Sanders
## Get an example file
exampleFolder <- system.file("extdata", "example_bams", package="breakpointRdata")
exampleFile <- list.files(exampleFolder, full.names=TRUE)[1]
## Load the file
fragments <- readBamFileAsGRanges(exampleFile, pairedEndReads=FALSE, chromosomes='chr22')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.