pileUp: PileUp

Description Usage Arguments Author(s) Source Examples

Description

Generates a pile up matrix from a unified set of peaks and a list of raw data sets

Usage

1
pileUp(data, rawdata, n = 0, verbose = FALSE, clust = NULL)

Arguments

data

A preloaded bed data.frame which includes slots $chro $start $end

rawdata

a list of raw data files

n

the number of nodes to use. If 0 then the parrallel package is not used

Author(s)

Alexander Griffith griffita@gmail.com

Source

https://github.com/alexjgriffith/mulcal

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
25
26
27
# Initialize catagories, files containing raw data 
cats<-read.table("/home/griffita/Dropbox/UTX-Alex/jan/catagories")
prefix<-"/mnt/brand01-00/mbrand_analysis/data_sets/"
suffix<-"_sorted.bed"
rawdata<-apply(cats,1,function(x){paste(prefix,x,"/",x,suffix,sep="")})
# Apply pileUp to peaks found using MACS
data<-hg19Sort(loadBedFile(file))
# score<-pileUp(data,rawdata,n=22)
# cluster the data sets based on the read hights of the peaks
# temp<-cor(score)
rownames(temp)<-t(cats)
colnames(temp)<-t(cats)
pdf("test.pdf")
plot(hclust(dist(temp)),hang=-1)
# Rather than using peaks we can do global analyis
# this relies on breaking the genome into bins
# human.hg19.genome provides the start and stop point for each genome
# bin size desides how large the regions should be
binSize=10000
regions<-do.call(rbind,
apply(read.table("/data/binaries/BEDTools/genomes/human.hg19.genome")[1:24,],1,
function(x,step) {y<-seq(1,as.numeric(x[2]),step);
cbind(as.character(x[1]),as.character(y),as.character(y+step))} ,binSize))
  data<-hg19Sort(data.frame(chro=regions[,1],
                            start=as.integer(regions[,2]),
                            end=as.integer(regions[,3])))
  #score<-pileUp(data,rawdata,n=22)

alexjgriffith/CCCA documentation built on May 10, 2019, 8:52 a.m.