Description Usage Arguments Details Author(s) See Also Examples
Methods for import and export of
GAlignments
or
GAlignmentPairs
objects from and to BAM
files, represented as BamFile
objects.
1 2 3 4 5 6 7 |
object |
The object to export, such as
a |
con |
A path, URL, connection or |
format |
If not missing, should be “bam”. |
text |
Not supported. |
paired |
If |
use.names |
Whether to parse QNAME as the names on the result. |
param |
The |
genome |
Single string or |
... |
Arguments that are passed to |
BAM fields not formally present in the GAlignments[Pairs]
object
are extracted from the metadata columns, if present; otherwise, the
missing value, “"."”, is output. The file is sorted and
indexed. This can be useful for subsetting BAM files, although
filterBam
may eventually become flexible
enough to be the favored alternative.
Michael Lawrence
The readGAlignments
and
readGAlignmentPairs
functions
for reading BAM files.
1 2 3 4 5 6 7 8 | library(Rsamtools)
ex1_file <- system.file("extdata", "ex1.bam", package="Rsamtools")
gal <- import(ex1_file, param=ScanBamParam(what="flag"))
gal.minus <- gal[strand(gal) == "-"]
## Not run:
export(gal, BamFile("ex1-minus.bam"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.