Description Usage Arguments Details Value See Also Examples
View source: R/utils_imports.R
Read in Bam file from either single end or paired end.
Safer combined version of readGAlignments
and
readGAlignmentPairs that takes care of some common errors.
If QNAMES of the aligned reads are from collapsed fasta files
(if the names are formated from collapsing in either
(ORFik, ribotoolkit or fastx)), the
bam file will contain a meta column called collapsed with the counts
of duplicates per read.
1 |
path |
a character / data.table with path to .bam file. There are 3 input file possibilities.
|
chrStyle |
a GRanges object, TxDb, FaFile,
or a |
param |
By default (i.e. |
strandMode |
numeric, default 0. Only used for paired end bam files. One of (0: strand = *, 1: first read of pair is +, 2: first read of pair is -). See ?strandMode. Note: Sets default to 0 instead of 1, as readGAlignmentPairs uses 1. This is to guarantee hits, but will also make mismatches of overlapping transcripts in opposite directions. |
In the future will use a faster .bam loader for big .bam files in R.
a GAlignments
or GAlignmentPairs
object of bam file
Other utils:
bedToGR()
,
convertToOneBasedRanges()
,
export.bed12()
,
export.wiggle()
,
fimport()
,
findFa()
,
fread.bed()
,
optimizeReads()
,
readWig()
1 2 | bam_file <- system.file("extdata", "ribo-seq.bam", package = "ORFik")
readBam(bam_file, "UCSC")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.