getCountsFast: THIS FUNCTION FOR USE WHEN RUNNING ALTRE ON MACOS/LINUX ONLY!...

Description Usage Arguments Value Examples

Description

Counts the number of reads in each regulatory region for each sample type – read count is derived from user-input BAM files, and regions of interest are supplied in a GRanges object, ideally output of combineAnnotatePeaks. The function getCounts generates count data using the featureCounts function from the R package Rsubreads, which is the fastest way available on R to count. The getCountsFast function CANNOT be used when running ALTRE on a Windows computer. Windows computers must use the function getCounts (also available in the ALTRE package), which is significantly slower, but ultimately will give the exact same results. For high-thoughput experiments (many samples need to be analyzed), it is highly suggested that a non-Windows computer is used (MacOS/Linux).

Usage

1
2
getCountsFast(annotpeaks, sampleinfo, reference, singleEnd = TRUE,
  chrom = NULL)

Arguments

annotpeaks

list output from combineAnnotatePeaks() function

sampleinfo

dataframe as returned from loadCSVFile() function

reference

name of sample type to be considered 'reference' in DESeq2 analysis

singleEnd

whether input data is single-end (default is TRUE)

chrom

optional, only chromosome chrom will be evaluated

Value

List containing three items: (1) DESeqDataSet: contains count information for all replicates of all samples (2) Matrix: contains number of TSS-distal and TSS-proximal before and after filtering (if applicable) (3) Data frame for creating a density plot (use function plotGetCounts()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
csvfile <- loadCSVFile("DNaseEncodeExample.csv")
samplePeaks <- loadBedFiles(csvfile)
consensusPeaks <- getConsensusPeaks(samplepeaks = samplePeaks, minreps = 2)
TSSannot <- getTSS()
consensusPeaksAnnotated <- combineAnnotatePeaks(conspeaks = consensusPeaks,
   TSS = TSSannot,
   merge = TRUE,
   regionspecific = TRUE,
   distancefromTSSdist = 1500,
   distancefromTSSprox = 1000)
consensusPeaksCounts <- getCountsFast(annotpeaks = consensusPeaksAnnotated,
   sampleinfo = csvfile,
   reference = 'SAEC',
   chrom = 'chr21')

## End(Not run)

Mathelab/ALTRE documentation built on May 7, 2019, 3:41 p.m.