Learn R Programming

riboSeqR (version 1.6.0)

readRibodata: Reads ribosomal and (optionally) rna data from alignment files.

Description

Reads BAM files, or flat text files (which may be compressed) containing strand, transcript name, start and sequence information for each alignment.

Usage

readRibodata(riboFiles, rnaFiles, columns = c(strand = 1, seqname = 2, start = 3, sequence = 4), zeroIndexed = TRUE, header = FALSE, replicates, seqnames)

Arguments

riboFiles
Filenames of ribosomal alignments.
rnaFiles
Filenames of RNA alignments.
columns
Columns of alignment files containing strand, transcript (seqname) name, start of alignment, and sequence. Ignored for BAM files.
zeroIndexed
Are the alignments zero-indexed (i.e., the first base in a sequence is 0). Defaults to TRUE, which will result in an adjustment to 1-indexed data.
header
Does the alignment file have a header line? Defaults to FALSE.
replicates
Replicate information for the files.
seqnames
Transcript (seqname) names to be read into the object.

Value

riboData object.

Details

If a filename ends in '.bam' or '.BAM' it will be assumed that the file is a BAM file and processed accordingly. Otherwise, it will be treated as a flat text file.

Examples

Run this code
datadir <- system.file("extdata", package = "riboSeqR")
ribofiles <- paste(datadir, 
                   "/chlamy236_plus_deNovo_plusOnly_Index", c(17,3,5,7), sep = "")
rnafiles <- paste(datadir, 
                  "/chlamy236_plus_deNovo_plusOnly_Index", c(10,12,14,16), sep = "")

riboDat <- readRibodata(ribofiles, rnafiles, replicates = c("WT", "WT", "M", "M"))

Run the code above in your browser using DataLab