Entering edit mode
Samuel Wuest
▴
330
@samuel-wuest-2821
Last seen 10.3 years ago
Hello,
I am trying to follow the example outlined in the PICS vignette in
order to analyse a ChIP-Seq dataset, but the code does not actually
work anymore (see code below).
The GenomeData-object used for the analysis (i.e. the
segmentReads-command) cannot be constructed anymore, it seems that the
respective conversion from a RangedData-object to a GenomeData-object
is deprecated.
I am not sure why the conversion from a RangedData to a
GenomeData-object should work, actually, as the RangedData-contains
information on start and end of the reads.
I can convert the RangedData into a GRanges object, but the PICS
command segmentReads()-wouldn't work with that.
Any suggestions?
Thanks for any help, best, Sam
### Following the R-script according to the PICS vignette:
> path<-system.file("extdata",package="PICS")
> #Read the experiment :
> dataIP<-read.table(file.path(path,"Treatment_tags_chr21_sort.bed"),h
eader=TRUE,colClasses=c("factor","integer","integer","factor"))
> dataIP<-as(dataIP,"RangedData")
> dataIP<-as(dataIP,"GenomeData")
Warning message:
Storing reads only by their start positions is deprecated. Please use
a range representation like GRanges.
>
> dataCont<-read.table(file.path(path,"Input_tags_chr21_sort.bed"),hea
der=TRUE,colClasses=c("factor","integer","integer","factor"))
> dataCont<-as(dataCont,"RangedData")
> dataCont<-as(dataCont,"GenomeData")
Warning message:
Storing reads only by their start positions is deprecated. Please use
a range representation like GRanges.
###?looking at the object created here shows that it is basically
empty:
> dataCont
A GenomeData instance
chromosomes(1): chr21
### the "segmentReads"-command works but is not very useful, for the
dataIP and dataCont-objects are both empty:
> seg<-segmentReads(dataIP, dataC=dataCont, minReads=1)
### alternatively, trying to provide a GRanges-objects to the
segmentReads-command:
> dataIP<-read.table(file.path(path,"Treatment_tags_chr21_sort.bed"),h
eader=TRUE,colClasses=c("factor","integer","integer","factor"))
> dataIP<-as(dataIP,"RangedData")
> dataIP <- as(dataIP, "GRanges")
> seg<-segmentReads(dataIP, dataC=dataCont, minReads=1)
Error in segmentReads(dataIP, dataC = dataCont, minReads = 1) :
The input data should be 'GenomeData' objects
### I am not sure whether the problem could be fixed using a different
constructor for GenomeData-objects?
Here is my sessionInfo():
> sessionInfo()
R version 2.12.0 (2010-10-15)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_IE.UTF-8/en_IE.UTF-8/C/C/en_IE.UTF-8/en_IE.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] PICS_1.4.0 BSgenome_1.18.2 Biostrings_2.18.2
GenomicRanges_1.2.1 IRanges_1.8.5
loaded via a namespace (and not attached):
[1] Biobase_2.10.0
-------------------------------------------------------
Samuel Wuest
Smurfit Institute of Genetics
Trinity College Dublin
Dublin 2, Ireland
Phone: +353-1-896 2444
Web: http://www.tcd.ie/Genetics/wellmer-2/index.html
Email: wuests at tcd.ie