fimport {ORFik}R Documentation

Load any type of sequencing reads

Description

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

Usage

fimport(path, chrStyle = NULL)

Arguments

path

a character path to file or a GRanges/Galignment object etc. Any Ranged object.

chrStyle

a GRanges object, or a seqlevelsStyle (Default: NULL) to get seqlevelsStyle from. Is chromosome 1 called chr1 or 1, is mitocondrial chromosome called MT or chrM etc. Will use 1st seqlevel-style if more are present. Like: c("NCBI", "UCSC") -> pick "NCBI"

Details

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.

Value

a GAlignments/GRanges object, depending on input.

See Also

Other utils: bedToGR(), convertToOneBasedRanges(), findFa(), fread.bed(), optimizeReads(), readBam(), readWig()

Examples

bam_file <- system.file("extdata", "ribo-seq.bam", package = "ORFik")
fimport(bam_file)
# Certain chromosome naming
fimport(bam_file, "NCBI")


[Package ORFik version 1.6.9 Index]