bamSave: bamSave: Creation of a sorted copy of a BAM file.

Description Usage Arguments Details Author(s) Examples

Description

The methods for bamSave write BAM alignment data (either single alignments as bamAlign objects or lists of alignments as bamRange objects) out to a bamWriter.

Usage

1
bamSave(object, value, refid, ...)

Arguments

object

bamWriter. The writer must be opened.

value

Object of type bamAlign or bamRange.

refid

(Optional) Defines sequence association (ID) in Reference sequence dictionary of output BAM file. May be given as numeric, or character. When missing, ID is determined from reference name (only for bamRange).

...

Currently unused.

Details

The different methods specialize on different methods for determining the Reference sequence ID in the output file.

Author(s)

Wolfgang Kaisers

Examples

1
2
3
4
5
6
7
bam<-system.file("extdata","accepted_hits.bam",package="rbamtools")
reader<-bamReader(bam, idx=TRUE)
rg <- bamRange(reader, getRefCoords(reader,"chr1"))

writer <- bamWriter(bamReader, "out.BAM")
bamSave(writer, rg)
bamClose(writer)

rbamtools documentation built on Nov. 11, 2019, 5:09 p.m.