Entering edit mode
I am attempting to use ChIPpeakAnno to annotate peaks I have found from DAPseq data. I am using annotatePeakInBatch function, please see code below.
Annotated_peaks <- annotatePeakInBatch(Peaks,featureType = "TSS", PeakLocForDistance = "middle", AnnotationData = genes)
Error in seqlevelsStyle(seqlevels) :
The style does not have a compatible entry for the species supported by Seqname. Please see genomeStyles() for supported species/style
In response to this error, I modified the chromosome names in seqnames using the following code.
rename_chr_Wheat = function(x) {
renameSeqlevels(x, c("Chr1A" = "Chr1", "Chr1B" = "Chr2", "Chr1D" = "Chr3", "Chr2A" = "Chr4", "Chr2B" = "Chr5", "Chr2D" = "Chr6", "Chr3A" = "Chr7", "Chr3B" = "Chr8", "Chr3D" = "Chr9", "Chr4A" = "Chr10", "Chr4B" = "Chr11", "Chr4D" = "Chr12", "Chr5A" = "Chr13", "Chr5B" = "Chr14", "Chr5D" = "Chr15", "Chr6A" = "Chr16", "Chr6B" = "Chr17", "Chr6D" = "Chr18", "Chr7A" = "Chr19", "Chr7B" = "Chr20", "Chr7D" = "Chr21", "ChrUnknown" = "Chr22"))
}
Peaks_edited <- rename_chr_Wheat(Peaks)
genes_edited <- rename_chr_Wheat(genes)