qProject-class {QuasR} | R Documentation

## qProject objects

### Description

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`.

### Details

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:

`reads`

  a 'data.frame' with sequence read files.

`reads_md5subsum`

  a 'data.frame' with fingerprints for sequence read files.

`alignments`

  a 'data.frame' with alignment files.

`samplesFormat`

  a 'character(1)' specifying the format of input files.

`genome`

  a 'character(1)' specifying the reference genome.

`genomeFormat`

  a 'character(1)' specifying the format of the reference genome.

`aux`

  a 'data.frame' with auxiliary reference sequence files.

`auxAlignments`

  a 'data.frame' with alignment files for auxiliary reference sequence files.

`aligner`

  a 'character(1)' specifying the aligner.

`maxHits`

  a 'numeric(1)' specifying the maximum number of alignments per sequence.

`paired`

  a 'character(1)' specifying the paired-type; one of "no", "fr", "rf", "ff".

`splicedAlignment`

  a 'logical(1)'; `TRUE` when performing spliced-alignments.

`snpFile`

  a 'character(1)' with a file name containing SNP information.

`bisulfite`

  a 'character(1)' defining the bisulfite type; one of "no", "dir", "undir".

`alignmentParameter`

  a 'character(1)' with aligner command line parameters.

`projectName`

  a 'character(1)' with the project name.

`alignmentsDir`

  a 'character(1)' with the directory to be used to store alignment files.

`lib.loc`

  a 'character(1)' with the library directory to use for installing of alignment index packages.

`cacheDir`

  a 'character(1)' with a directory to use for temporary files.

`alnModeID`

  a 'character(1)' used internally to indicate the alignment mode.

### Accessors

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.

### Subsetting

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.

### Author(s)

Anita Lerch, Dimos Gaidatzis and Michael Stadler

### See Also

qAlign

### Examples

    # 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))

[Package QuasR version 1.28.0 Index]