[BioC] ChIPpeakAnnot -names field requried

Julie Zhu julie.zhu at umassmed.edu
Thu Jan 14 15:52:36 CET 2010


Hi Cass,

Thank you very much for the valuable feedback! Yes, the function expects
peak.ranges to be a RangedData with a "names" field as the name of the
binding site.

I will add your fix to make sure the function works when "names" field is
not set.

Thanks again for making this package more user friendly!

Best regards,

Julie




*******************************************
Julie Zhu, Ph.D
Research Associate Professor
Program Gene Function and Expression
University of Massachusetts Medical School
364 Plantation Street, Room 613
Worcester, MA 01605
508-856-5256
http://www.umassmed.edu/pgfe/faculty/zhu.cfm




On 1/14/10 7:41 AM, "Cass Johnston" <caroline.johnston at kcl.ac.uk> wrote:

> Hello,
> 
> I'm getting an error from ChIPpeakAnnot when I try and get the nearest
> TSS to a load of ChIPseq peaks:
> 
> annotatedPeak = annotatePeakInBatch(peak.ranges[1:5,], AnnotationData =
> TSS.mouse.NCBIM37)
> Error in dimnames(x) <- dn :
>   length of 'dimnames' [2] not equal to array extent
> 
> Giving the peaks default rownames seems to fix it:
> 
> *** annotatePeakInBatch.R.old   2010-01-14 12:36:00.000000000 +0000
> --- annotatePeakInBatch.R       2010-01-14 12:37:47.000000000 +0000
> ***************
> *** 26,31 ****
> --- 26,34 ----
>           "strand")
>       allChr.Anno = unique(space(TSS.ordered))
>       numberOfChromosome = length(unique(space(myPeakList)))
> +     if(is.null(rownames(myPeakList))){
> +       rownames(myPeakList)<-paste("peak", seq(1,nrow(myPeakList)),
> sep="")
> +     }
>       z1 = cbind(as.character(rownames(myPeakList)),
> as.character(space(myPeakList)),
>           start(myPeakList), end(myPeakList))
>       colnames(z1) = c("name", "chr", "peakStart", "peakEnd")
> 
> 
> Cheers,
> Cass Johnston.
> 
>



More information about the Bioconductor mailing list