Description Details Accessors Subsetting Author(s) See Also Examples
The qProject class is a container for the meta-data (e.g. sample
names, paths and names of sequence and alignment files) associated
with a high-throughput sequencing experiment analyzed with QuasR.
The qProject class is returned by qAlign and stores all
information on a high-throughput sequencing experiment analyzed with
QuasR. qProject objects can be conveniently passed to
‘q’-functions (function name starting with the letter
‘q’). The information is stored in the following slots:
readsa 'data.frame' with sequence read files.
reads_md5subsuma 'data.frame' with fingerprints for sequence read files.
alignmentsa 'data.frame' with alignment files.
samplesFormata 'character(1)' specifying the format of input files.
genomea 'character(1)' specifying the reference genome.
genomeFormata 'character(1)' specifying the format of the reference genome.
auxa 'data.frame' with auxiliary reference sequence files.
auxAlignmentsa 'data.frame' with alignment files for auxiliary reference sequence files.
alignera 'character(1)' specifying the aligner.
maxHitsa 'numeric(1)' specifying the maximum number of alignments per sequence.
paireda 'character(1)' specifying the paired-type; one of "no", "fr", "rf", "ff".
splicedAlignmenta 'logical(1)'; TRUE when
performing spliced-alignments.
snpFilea 'character(1)' with a file name containing SNP information.
bisulfitea 'character(1)' defining the bisulfite type; one of "no", "dir", "undir".
alignmentParametera 'character(1)' with aligner command line parameters.
projectNamea 'character(1)' with the project name.
alignmentsDira 'character(1)' with the directory to be used to store alignment files.
lib.loca 'character(1)' with the library directory to use for installing of alignment index packages.
cacheDira 'character(1)' with a directory to use for temporary files.
alnModeIDa 'character(1)' used internally to indicate the alignment mode.
In the following code snippets, x is a qProject object.
length(x):
Gets the number of input files.
genome(x):
Gets the reference genome as a 'character(1)'. The type of genome
is stored as an attribute in
attr(genome(x),"genomeFormat"): "BSgenome" indicates that
genome(x) refers to the name of a BSgenome package, "file"
indicates that it contains the path and filename of a genome in
FASTA format.
auxiliaries(x):
Gets a data.frame with auxiliary target sequences, with one
row per auxiliary target, and columns "FileName" and "AuxName".
alignments(x):
Gets a list with two elements "genome" and
"aux". alignments(x)$genome contains a data.frame
with length(x) rows and the columns "FileName" (containing
the path to bam files with genomic alignments) and
"SampleName". alignments(x)$aux contains a
data.frame with one row per auxiliary target sequence (with
auxiliary names as row names), and length(x) columns.
In the following code snippets, x is a qProject object.
x[i]:
Get qProject object instance with i input files,
where i can be an NA-free logical, numeric, or character vector.
Anita Lerch, Dimos Gaidatzis and Michael Stadler
qAlign
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # copy example data to current working directory
file.copy(system.file(package="QuasR", "extdata"), ".", recursive=TRUE)
# create alignments
sampleFile <- "extdata/samples_chip_single.txt"
genomeFile <- "extdata/hg19sub.fa"
auxFile <- "extdata/auxiliaries.txt"
proj <- qAlign(sampleFile, genomeFile, auxiliaryFile=auxFile)
proj
# alignment statistics using a qProject
alignmentStats(proj)
# alignment statistics using bam files
alignmentStats(alignments(proj)$genome$FileName)
alignmentStats(unlist(alignments(proj)$aux))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.