writeAnnotatedRegions: Writes annotated genomic regions

Description Usage Arguments Examples

Description

Creates a CSV file with genomic regions annoted as promotor or enhances categorized by cell type

Usage

1
writeAnnotatedRegions(countsPeaks, con)

Arguments

countsPeaks

output generated from getCounts()

con

connection filepath

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
dir <- system.file('extdata', package='ALTRE', mustWork=TRUE)
csvfile <- file.path(dir, 'lung.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,
                                          mergedistenh = 1500,
                                          mergedistprom = 1000 )
#Need to run getcounts on all chromosomes
countsPeaks <- getcounts(annotpeaks = consPeaksAnnotated,
                             csvfile = csvfile,
                             reference = 'SAEC')
con <- "annotatedRegions.csv"
writeAnnotatedRegions(countsPeaks, con)

## End(Not run)

ewymathe/testALTREinstall documentation built on May 16, 2019, 9:42 a.m.