loadTSSobj {TSRchitect} | R Documentation |
loadTSSobj
processes alignment files in .bam or .bed
formats from the local directory supplied.
loadTSSobj(experimentTitle, inputDir, isPairedBAM = FALSE, isPairedBED = FALSE, sampleNames, replicateIDs) ## S4 method for signature 'character,character,ANY,ANY,character,numeric' loadTSSobj(experimentTitle, inputDir, isPairedBAM = FALSE, isPairedBED = FALSE, sampleNames, replicateIDs)
experimentTitle |
a descriptive title for the experiment (character). |
inputDir |
path to the directory containing the alignment files (in either .bam or .bed formats) (character). Note that all the paths to all files in inputDir with the extension .bam or .bed will be imported with this function. |
isPairedBAM |
if the input is in BAM format, specifies whether the TSS profiling experiment is paired-end (if TRUE) or single-end (if FALSE) (logical) |
isPairedBED |
if the input is in BED format, specifies whether the TSS profiling experiment is paired-end (if TRUE) or single-end (if FALSE). Set to FALSE by default. (logical) Note: if TRUE, the input data must be in bedpe format, as described here: http://bedtools.readthedocs.io/en/latest/content/general-usage.html |
sampleNames |
unique labels of class character for each TSS sample within the experiment (character). |
replicateIDs |
identifiers indicating which samples are biological
replicates. Note that |
loadTSSobj fills the slot bamData and/or bedData on the returned tssObject with GAlignments objects (for .bam files), or GRanges objects (for .bed files).
An example similar to the one provided can be found in the vignette (/inst/doc/TSRchitect.Rmd).
All files found in inputDir will be retrieved and written in ascending alphanumeric order to the @fileNamesBAM and/or @fileNamesBED slot(s) on the tssObject that is created.
extdata.dir <- system.file("extdata", package="TSRchitect") test.Obj <- loadTSSobj(experimentTitle="Code example", inputDir=extdata.dir, isPairedBAM=TRUE, sampleNames=c("sample1-rep1", "sample1-rep2", "sample2-rep1","sample2-rep2"), replicateIDs=c(1,1,2,2))