reads2pairs(reads, max.distance)
RangedData
table containing positions
of sequenced reads, i.e. output of get.reads
. The first 'values' column has
to contain read pair identifiers, i.e. when reads
was created by get.reads
,
the option idcol
had to be specified. The input can also contain single reads without
'read mate' (e.g. when the first read of a pair did not align to the reference genome, however the second one did
align and was still kept). Those single reads will be returned in a separate table singleReads
.
When the two reads in a pair align to different chromosomes, they will also be returned in table singleReads
.singleReads
. If max.distance
is
not specified, reads will be joined to pairs regardless of their distance. Only when the two reads in a pair
align to different chromosomes, they will be removed in any case and added to table singleReads
.reads
only contains complete read pairs and for all pairs the respective reads
align to the same chromosome and their distances do not exceed max.distance
(if specified),
a RangedData
object is returned containing positions of the merged reads per pair, ranging from start
position of the first read to end position of the second read.If reads
also contains single reads, or if reads within a pair are further apart than
max.distance
(if specified) or align to different chromosome, a list is returned with elements
RangedData
object containing original positions of single reads without
'read mates' and/or read pairs aligning too far apart or on different chromosomesRangedData
object containing positions of the merged reads per pair, ranging from start
position of the first read to end position of the second readfraction.reads.target
, readsPerTarget
, duplicates.barplot
get.reads
, fraction.reads.target
,
readsPerTarget
, duplicates.barplot
, insert.size.hist
exptPath <- system.file("extdata", package="TEQC")
readsfile <- file.path(exptPath, "ExampleSet_Reads.bed")
reads <- get.reads(readsfile, idcol=4, skip=0)
readpairs <- reads2pairs(reads)
Run the code above in your browser using DataLab