alignStats {systemPipeR} | R Documentation

## Alignment statistics

### Description

Generate data frame containing important read alignment statistics such as the total number of reads in the FASTQ files, the number of total alignments, as well as the number of primary alignments in the corresponding BAM files.

### Usage

    alignStats(args)

### Arguments

`args` | Object of class `SYSargs`.

### Value

`data.frame` with alignment statistics.

### Author(s)

Thomas Girke

### Examples

    ## Construct SYSargs object from param and targets files
    param <- system.file("extdata", "tophat.param", package="systemPipeR")
    targets <- system.file("extdata", "targets.txt", package="systemPipeR")
    args <- systemArgs(sysma=param, mytargets=targets)
    args
    names(args); modules(args); cores(args); outpaths(args); sysargs(args)

    ## Not run:
    ## Execute SYSargs on single machine
    runCommandline(args=args)

    ## Execute SYSargs on multiple machines
    qsubargs <- getQsubargs(queue="batch", Nnodes="nodes=1", cores=cores(tophat), memory="mem=10gb", time="walltime=20:00:00")
    qsubRun(args=args, qsubargs=qsubargs, Nqsubs=1, package="systemPipeR")
    ## Alignment stats
    read_statsDF <- alignStats(args)
    read_statsDF <- cbind(read_statsDF[targets$FileName,], targets)
    write.table(read_statsDF, "results/alignStats.xls", row.names=FALSE, quote=FALSE, sep="\t")

    ## End(Not run)

[Package systemPipeR version 1.16.1 Index]