bed2GRanges | R Documentation |
Import aligned reads from a BED file into a GRanges-class
object.
bed2GRanges(bedfile, assembly, chromosomes = NULL,
remove.duplicate.reads = FALSE, min.mapq = 10,
max.fragment.width = 1000, blacklist = NULL)
bedfile |
A file with aligned reads in BED format. The columns have to be c('chromosome','start','end','description','mapq','strand'). |
assembly |
Please see |
chromosomes |
If only a subset of the chromosomes should be imported, specify them here. |
remove.duplicate.reads |
A logical indicating whether or not duplicate reads should be removed. |
min.mapq |
Minimum mapping quality when importing from BAM files. Set |
max.fragment.width |
Maximum allowed fragment length. This is to filter out erroneously wrong fragments. |
blacklist |
A |
A GRanges-class
object containing the reads.
## Get an example BED file with single-cell-sequencing reads
bedfile <- system.file("extdata", "KK150311_VI_07.bam.bed.gz", package="AneuFinderData")
## Read the file into a GRanges object
reads <- bed2GRanges(bedfile, assembly='mm10', chromosomes=c(1:19,'X','Y'),
min.mapq=10, remove.duplicate.reads=TRUE)
print(reads)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.