writeBedFile: Creates a custom track for visualization on genome browser

Description Usage Arguments Examples

Description

Creates a color-coded BED file for visualization of peaks and their ALTRE categories in a genome browser: red indicates increased log2fold change/low p-value, blue indicates decreased lod2fold change/low p-value, and purple indicates regions with little to no change and insignificant p-values. Based on the log2fold change and p-value inputs, there is a possibility that some regions will not fulfill any of the supplied criteria ("in-between" shared and type-specific). They are colored grey.

Usage

1
writeBedFile(analysisresults, con)

Arguments

analysisresults

output generated from categAltrePeaks()

con

connection

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 
csvfile <- file.path(dir="yourfilepath", 'sampleinfo.csv')
sampleinfo <- loadCSVFile(csvfile)
samplePeaks <- loadBedFiles(sampleinfo)
consPeaks <- getConsensusPeaks(samplepeaks=samplePeaks,minreps=2)
TSSannot <- getTSS()
consPeaksAnnotated <- combineAnnotatePeaks(conspeaks = consPeaks,
                                          TSS = TSSannot,
                                          merge = TRUE,
                                          regionspecific = TRUE,
                                          distancefromTSSdist = 1500,
                                          distancefromTSSprox = 1000)
#Need to run getcounts on all chromosomes
counts_consPeaks <- getcounts(annotpeaks = consPeaksAnnotated,
                             csvfile = csvfile,
                             reference = 'SAEC')
altre_peaks <- countanalysis(counts = counts_consPeaks,
                             pval = 0.01,
                             lfcvalue = 1)
categaltre_peaks <- categAltrePeaks(altre_peaks, lfctypespecific = 1.5,
lfcshared = 1.2, pvaltypespecific = 0.01, pvalshared = 0.05)
writeBedFile(categaltre_peaks)

## End(Not run)

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