Learn R Programming

TarSeqQC (version 1.2.0)

initialize: TargetExperiment object constructor.

Description

initialize creates the TargetExperiment object architecture for the specified bed and alingment BAM files. If 'scanBamP' and/or 'pileupP' parameters are not specified, default values of their constructors will be used.

Usage

"initialize"(.Object, bedFile, bamFile, fastaFile, scanBamP = NULL, pileupP = NULL, feature = NULL, attribute = NULL, BPPARAM = bpparam())

Arguments

.Object
TargetExperiment class.
bedFile
Character indicating the bed file full path.
bamFile
Character indicating the alignment and index bam files full paths.
fastaFile
Character indicating the full path to the genome reference and index files.
scanBamP
ScanBamParam indicating the parameters for read the BAM file.
pileupP
PileupParam indicating the parameters for pileup building.
feature
Character indicating the name of the feature that will be explored (e.g 'amplicon', 'exon').
attribute
Character indicating the name of the attribute that will be explored. Should be 'coverage' or 'medianCounts'.
BPPARAM
An optional BiocParallelParam instance defining the parallel back-end to be used during evaluation.

Value

TargetExperiment object.

See Also

TargetExperiment, buildFeaturePanel summarizePanel

Other TargetExperiment: TargetExperiment-class; TargetExperiment, TargetExperiment-methods; ampliPanel

Examples

Run this code
## Defining bam file, bed file and fasta file names and paths
if (interactive()){
    bamFile<-system.file("extdata", "mybam.bam", package="TarSeqQC",
        mustWork=TRUE)
    bedFile<-system.file("extdata", "mybed.bed", package="TarSeqQC",
        mustWork=TRUE)
    fastaFile<-system.file("extdata", "myfasta.fa", package="TarSeqQC",
        mustWork=TRUE)

    ## Creating a TargetExperiment object

    ## Defining feature parameter
    feature<-"amplicon"
    ## Defining attribute parameter
    attribute<-"coverage"
    ##Calling the constructor
    ampliPanel<-TargetExperiment(bedFile, bamFile, fastaFile, 
        attribute=attribute, feature=feature)
}

Run the code above in your browser using DataLab