fimport {ORFik} | R Documentation |
Wraps around rtracklayer::import and tries to speed up loading with the use of data.table. Supports gzip, gz, bgz compression formats. Also safer chromosome naming with the argument chrStyle
fimport(path, chrStyle = NULL)
path |
a character path to file (1 or 2 files), or data.table with 2 colums(forward&reverse) or a GRanges/Galignment/GAlignmentPairs object etc. If it is ranged object it will presume to be already loaded, so will return the object as it is, updating the seqlevelsStyle if given. |
chrStyle |
a GRanges object, TxDb, FaFile,
or a |
NOTE: For wig you can send in 2 files, so that it automaticly merges forward and reverse stranded objects. You can also just send 1 wig file, it will then have "*" as strand.
a GAlignments
/GRanges
object,
depending on input.
Other utils:
bedToGR()
,
convertToOneBasedRanges()
,
export.bed12()
,
export.wiggle()
,
findFa()
,
fread.bed()
,
optimizeReads()
,
readBam()
,
readWig()
bam_file <- system.file("extdata", "ribo-seq.bam", package = "ORFik") fimport(bam_file) # Certain chromosome naming fimport(bam_file, "NCBI")