Learn R Programming

rbamtools (version 2.0.1)

insertSize: insertSize: Reads insert size from bamAlign

Description

Reads the core.isize field from an alignment. Insert size should represent the distance between mate pair reads (but this is not explicitly declared in the format documentation).

Usage

insertSize(object)

Arguments

object
An instance of class bamAlign.

Value

  • Integer.

References

The SAM Format Specification (v1.4-r985). The SAM Format Specification Working Group. September 7, 2011. http://www.samtools.sourceforge.net/SAM1.pdf

Examples

Run this code
bam_file <- system.file("extdata", "accepted_hits.bam", package="rbamtools")
reader<-bamReader(bam_file)
isOpen(reader)
align<-getNextAlign(reader)
insertSize(align)
bamClose(reader)

Run the code above in your browser using DataLab