RangedData
object.get.reads(readsfile, filetype = c("bed", "bam"), chrcol = 1, startcol = 2, endcol = 3, idcol, zerobased = TRUE, sep = "\t", skip = 1, header = FALSE, ...)
"bam"
, the .bam file is read using
scanBam
, where flag option isUnmappedQuery=FALSE
is used. Defaults to "bed"
filetype = "bam"
.filetype = "bam"
.filetype = "bam"
.filetype = "bam"
(the ID column is automatically included then).
If read IDs include "#0/1" and "#0/2"
in the end (indicating read 1 and read 2 of a pair), those characters will
be removed from the IDs.TRUE
, start coordinates in readsfile
are assumed to be 0-based
and are then converted to 1-based system by adding 1. If FALSE
, coordinates are not
shifted. In this case they should already be 1-based in readsfile
.
Ignored if filetype = "bam"
, since scanBam
converts 0-based
to 1-based coordinates.filetype = "bam"
.filetype = "bam"
.filetype = "bam"
.read.delim
. Ignored if filetype = "bam"
.RangedData
table holding the read positionsget.targets
exptPath <- system.file("extdata", package="TEQC")
readsfile <- file.path(exptPath, "ExampleSet_Reads.bed")
reads <- get.reads(readsfile, idcol=4, skip=0)
Run the code above in your browser using DataLab