Compression {Rsamtools} | R Documentation |
These functions compress files for use in other parts of
Rsamtools: bgzip
for tabix files, razip
for
random-access fasta files.
bgzip(file, dest=sprintf("%s.bgz", sub("\\.gz$", "", file)), overwrite = FALSE) razip(file, dest=sprintf("%s.rz", sub("\\.gz$", "", file)), overwrite = FALSE)
file |
A character(1) path to an existing uncompressed or gz-compressed file. This file will be compressed. |
dest |
A character(1) path to a file. This will be the compressed
file. If |
overwrite |
A logical(1) indicating whether |
The full path to dest
.
Martin Morgan <mtmorgan@fhcrc.org>
http://samtools.sourceforge.net/
from <- system.file("extdata", "ex1.sam", package="Rsamtools", mustWork=TRUE) to <- tempfile() zipped <- bgzip(from, to)