ChIPseeker
ChIPseeker copied to clipboard
Unable to find an inherited method for function 'NSBS' for signature '"SortedByQueryHits"'
I am trying to use annotatePeak
with "Ensembl".
They have the same seqlevels
> seqlevels(peaksGRange)
[1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16" "17"
[18] "18" "19" "X" "Y" "MT"
edb <- EnsDb.Hsapiens.v92
> head(seqlevels(edb))
[1] "1" "10" "11" "12" "13" "14"`
annotatePeak(peaksGRange, tssRegion = c(-10000,10000),
TxDb = edb, annoDb = "org.Hs.eg.db")
So I am not sure why I am getting an error...
I am also getting this error, did you figure out a solution yet?
Yes, I got the transcript info from the edb
object and it worked.
edb <- EnsDb.Hsapiens.v92
#get features we want Tx <- transcripts(edb, columns = c("tx_id", "gene_id", "gene_name", "tx_biotype", "tx_support_level"))
#check that we are working with the same sequence levels seqlevelsStyle(peaksGRange) seqlevelsStyle(annotDataEnsmb)
- Error description We need to reproduce the situation of this error. First, we need to reorganize the peak file to meet the need. We change the seqlevels of the peak files.
## get the txdb and peak files
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene::TxDb.Hsapiens.UCSC.hg19.knownGene
files <- ChIPseeker::getSampleFiles()
peak <- ChIPseeker::readPeakFile(files[[4]])
## change the seqlevels of peak files
oldseqlevels <- data.frame(old=GenomeInfoDb::seqlevels(peak),
new=gsub("chr","",GenomeInfoDb::seqlevels(peak)))
newseqlevels <- data.frame(new=c(1:22,"X","Y"))
combine <- merge(oldseqlevels,newseqlevels,by="new")
newnames <- combine$new
names(newnames) <- combine$old
peak <- GenomeInfoDb::renameSeqlevels(peak,newnames)
With this peak file, we can reproduce the error
## annotatePeak the peak files
annotatePeak_result <- ChIPseeker::annotatePeak(peak = peak,TxDb = txdb)
> annotatePeak_result <- ChIPseeker::annotatePeak(peak = peak,TxDb = txdb)
>> preparing features information... 2021-12-23 11:17:36
>> identifying nearest features... 2021-12-23 11:17:36
>> calculating distance from peak to TSS... 2021-12-23 11:17:36
>> assigning genomic annotation... 2021-12-23 11:17:36
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘NSBS’ for signature ‘"SortedByQueryHits"’
In addition: Warning messages:
1: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
2: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
3: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
4: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
5: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
- Explanation The reasons of the error comes from the discrepancy of the seqlevels between peak files and txdb.
## the seqlevels of peak files
> GenomeInfoDb::seqlevels(peak)
[1] "1" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "2" "20"
[14] "21" "22" "3" "4" "5" "6" "7" "8" "9" "X" "Y"
> GenomeInfoDb::seqlevels(txdb)
[1] "chr1" "chr2"
[3] "chr3" "chr4"
[5] "chr5" "chr6"
[7] "chr7" "chr8"
[9] "chr9" "chr10"
[11] "chr11" "chr12"
[13] "chr13" "chr14"
[15] "chr15" "chr16"
[17] "chr17" "chr18"
[19] "chr19" "chr20"
[21] "chr21" "chr22"
[23] "chrX" "chrY"
[25] "chrM" "chr1_gl000191_random"
[27] "chr1_gl000192_random" "chr4_ctg9_hap1"
[29] "chr4_gl000193_random" "chr4_gl000194_random"
[31] "chr6_apd_hap1" "chr6_cox_hap2"
[33] "chr6_dbb_hap3" "chr6_mann_hap4"
[35] "chr6_mcf_hap5" "chr6_qbl_hap6"
[37] "chr6_ssto_hap7" "chr7_gl000195_random"
[39] "chr8_gl000196_random" "chr8_gl000197_random"
[41] "chr9_gl000198_random" "chr9_gl000199_random"
[43] "chr9_gl000200_random" "chr9_gl000201_random"
[45] "chr11_gl000202_random" "chr17_ctg5_hap1"
[47] "chr17_gl000203_random" "chr17_gl000204_random"
[49] "chr17_gl000205_random" "chr17_gl000206_random"
[51] "chr18_gl000207_random" "chr19_gl000208_random"
[53] "chr19_gl000209_random" "chr21_gl000210_random"
[55] "chrUn_gl000211" "chrUn_gl000212"
[57] "chrUn_gl000213" "chrUn_gl000214"
[59] "chrUn_gl000215" "chrUn_gl000216"
[61] "chrUn_gl000217" "chrUn_gl000218"
[63] "chrUn_gl000219" "chrUn_gl000220"
[65] "chrUn_gl000221" "chrUn_gl000222"
[67] "chrUn_gl000223" "chrUn_gl000224"
[69] "chrUn_gl000225" "chrUn_gl000226"
[71] "chrUn_gl000227" "chrUn_gl000228"
[73] "chrUn_gl000229" "chrUn_gl000230"
[75] "chrUn_gl000231" "chrUn_gl000232"
[77] "chrUn_gl000233" "chrUn_gl000234"
[79] "chrUn_gl000235" "chrUn_gl000236"
[81] "chrUn_gl000237" "chrUn_gl000238"
[83] "chrUn_gl000239" "chrUn_gl000240"
[85] "chrUn_gl000241" "chrUn_gl000242"
[87] "chrUn_gl000243" "chrUn_gl000244"
[89] "chrUn_gl000245" "chrUn_gl000246"
[91] "chrUn_gl000247" "chrUn_gl000248"
[93] "chrUn_gl000249"
- Debug for this error For the reason above, some methods are used to solve this error.
For example, adding "chr" to the seqlevels, like github issue and Bioconductor issue
## peak files before changes
> peak
GRanges object with 1331 ranges and 2 metadata columns:
seqnames ranges strand | V4
<Rle> <IRanges> <Rle> | <character>
[1] 1 815093-817883 * | MACS_peak_1
[2] 1 1243288-1244338 * | MACS_peak_2
[3] 1 2979977-2981228 * | MACS_peak_3
[4] 1 3566182-3567876 * | MACS_peak_4
[5] 1 3816546-3818111 * | MACS_peak_5
... ... ... ... . ...
[1327] X 135244783-135245821 * | MACS_peak_1327
[1328] X 139171964-139173506 * | MACS_peak_1328
[1329] X 139583954-139586126 * | MACS_peak_1329
[1330] X 139592002-139593238 * | MACS_peak_1330
[1331] Y 13845134-13845777 * | MACS_peak_1331
V5
<numeric>
[1] 295.76
[2] 63.19
[3] 100.16
[4] 558.89
[5] 57.57
... ...
[1327] 55.54
[1328] 270.19
[1329] 918.73
[1330] 210.88
[1331] 58.39
-------
seqinfo: 24 sequences from an unspecified genome; no seqlengths
> GenomeInfoDb::seqlevels(peak)
[1] "1" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "2" "20"
[14] "21" "22" "3" "4" "5" "6" "7" "8" "9" "X" "Y"
## use the methods of adding "chr"
peak <- diffloop::addchr(peak)
## peak files after changing
> peak
GRanges object with 1331 ranges and 2 metadata columns:
seqnames ranges strand | V4
<Rle> <IRanges> <Rle> | <character>
[1] chr1 815093-817883 * | MACS_peak_1
[2] chr1 1243288-1244338 * | MACS_peak_2
[3] chr1 2979977-2981228 * | MACS_peak_3
[4] chr1 3566182-3567876 * | MACS_peak_4
[5] chr1 3816546-3818111 * | MACS_peak_5
... ... ... ... . ...
[1327] chrX 135244783-135245821 * | MACS_peak_1327
[1328] chrX 139171964-139173506 * | MACS_peak_1328
[1329] chrX 139583954-139586126 * | MACS_peak_1329
[1330] chrX 139592002-139593238 * | MACS_peak_1330
[1331] chrY 13845134-13845777 * | MACS_peak_1331
V5
<numeric>
[1] 295.76
[2] 63.19
[3] 100.16
[4] 558.89
[5] 57.57
... ...
[1327] 55.54
[1328] 270.19
[1329] 918.73
[1330] 210.88
[1331] 58.39
-------
seqinfo: 24 sequences from an unspecified genome; no seqlengths
> GenomeInfoDb::seqlevels(peak)
[1] "chr1" "chr10" "chr11" "chr12" "chr13" "chr14" "chr15" "chr16"
[9] "chr17" "chr18" "chr19" "chr2" "chr20" "chr21" "chr22" "chr3"
[17] "chr4" "chr5" "chr6" "chr7" "chr8" "chr9" "chrX" "chrY"
In this way, peak file is changed, having the same seqlevels with txdb. And the annotatePeak()
can work properly without any error.
> annotatePeak_result <- ChIPseeker::annotatePeak(peak = peak,TxDb = txdb)
>> preparing features information... 2021-12-23 11:31:28
>> identifying nearest features... 2021-12-23 11:31:28
>> calculating distance from peak to TSS... 2021-12-23 11:31:28
>> assigning genomic annotation... 2021-12-23 11:31:28
>> assigning chromosome lengths 2021-12-23 11:31:29
>> done...
- Another situaion having the same error Definitely, adding "chr" can solve the error in some situations. But if the situation come like this. ATTACHMENT:
load("test_peak.Rdata")
test_peak
> test_peak
GRanges object with 91 ranges and 0 metadata columns:
seqnames ranges strand
<Rle> <IRanges> <Rle>
[1] 1 44247-44835 *
[2] 1 44247-44835 *
[3] 10 106154-106413 *
[4] 2 40042-41047 *
[5] 3 155021-155356 *
... ... ... ...
[87] B73V4_ctg89 18553-19574 *
[88] B73V4_ctg91 51227-51931 *
[89] B73V4_ctg95 33500-34087 *
[90] B73V4_ctg98 5686-6846 *
[91] Mt 75155-75610 *
-------
seqinfo: 90 sequences from an unspecified genome; no seqlengths
> GenomeInfoDb::seqlevels(test_peak)
[1] "1" "10" "2" "3"
[5] "4" "5" "6" "7"
[9] "8" "9" "B73V4_ctg10" "B73V4_ctg100"
[13] "B73V4_ctg103" "B73V4_ctg104" "B73V4_ctg105" "B73V4_ctg107"
[17] "B73V4_ctg11" "B73V4_ctg115" "B73V4_ctg119" "B73V4_ctg12"
[21] "B73V4_ctg121" "B73V4_ctg123" "B73V4_ctg129" "B73V4_ctg13"
[25] "B73V4_ctg134" "B73V4_ctg140" "B73V4_ctg141" "B73V4_ctg142"
[29] "B73V4_ctg146" "B73V4_ctg147" "B73V4_ctg15" "B73V4_ctg150"
[33] "B73V4_ctg153" "B73V4_ctg168" "B73V4_ctg170" "B73V4_ctg173"
[37] "B73V4_ctg174" "B73V4_ctg178" "B73V4_ctg181" "B73V4_ctg182"
[41] "B73V4_ctg186" "B73V4_ctg188" "B73V4_ctg190" "B73V4_ctg193"
[45] "B73V4_ctg2" "B73V4_ctg201" "B73V4_ctg203" "B73V4_ctg205"
[49] "B73V4_ctg225" "B73V4_ctg23" "B73V4_ctg24" "B73V4_ctg242"
[53] "B73V4_ctg248" "B73V4_ctg253" "B73V4_ctg26" "B73V4_ctg28"
[57] "B73V4_ctg3" "B73V4_ctg31" "B73V4_ctg35" "B73V4_ctg4"
[61] "B73V4_ctg41" "B73V4_ctg42" "B73V4_ctg44" "B73V4_ctg46"
[65] "B73V4_ctg48" "B73V4_ctg49" "B73V4_ctg5" "B73V4_ctg50"
[69] "B73V4_ctg51" "B73V4_ctg52" "B73V4_ctg53" "B73V4_ctg56"
[73] "B73V4_ctg58" "B73V4_ctg6" "B73V4_ctg60" "B73V4_ctg61"
[77] "B73V4_ctg65" "B73V4_ctg68" "B73V4_ctg72" "B73V4_ctg73"
[81] "B73V4_ctg74" "B73V4_ctg75" "B73V4_ctg8" "B73V4_ctg87"
[85] "B73V4_ctg88" "B73V4_ctg89" "B73V4_ctg91" "B73V4_ctg95"
[89] "B73V4_ctg98" "Mt"
## make the txdb from gff (https://ftp.ncbi.nlm.nih.gov/genomes/genbank/plant/Zea_mays/latest_assembly_versions/GCA_000005005.6_B73_RefGen_v4/GCA_000005005.6_B73_RefGen_v4_genomic.gff.gz)
TxDb_maize <- GenomicFeatures::makeTxDbFromGFF('GCA_000005005.6_B73_RefGen_v4_genomic.gff',
format = 'gff3')
> GenomeInfoDb::seqlevels(TxDb_maize)
[1] "CM000780.4" "CM000781.4" "CM000782.4"
[4] "CM000784.4" "CM000785.4" "CM000786.4"
[7] "CM007647.1" "CM007648.1" "CM007649.1"
[10] "CM007650.1" "LPUQ01000002.1" "LPUQ01000003.1"
[13] "LPUQ01000004.1" "LPUQ01000005.1" "LPUQ01000006.1"
[16] "LPUQ01000008.1" "LPUQ01000010.1" "LPUQ01000011.1"
[19] "LPUQ01000012.1" "LPUQ01000013.1" "LPUQ01000014.1"
[22] "LPUQ01000018.1" "LPUQ01000020.1" "LPUQ01000023.1"
[25] "LPUQ01000024.1" "LPUQ01000026.1" "LPUQ01000028.1"
[28] "LPUQ01000029.1" "LPUQ01000031.1" "LPUQ01000035.1"
[31] "LPUQ01000040.1" "LPUQ01000041.1" "LPUQ01000042.1"
[34] "LPUQ01000044.1" "LPUQ01000046.1" "LPUQ01000048.1"
[37] "LPUQ01000049.1" "LPUQ01000050.1" "LPUQ01000051.1"
[40] "LPUQ01000052.1" "LPUQ01000053.1" "LPUQ01000054.1"
[43] "LPUQ01000055.1" "LPUQ01000057.1" "LPUQ01000060.1"
[46] "LPUQ01000064.1" "LPUQ01000065.1" "LPUQ01000067.1"
[49] "LPUQ01000068.1" "LPUQ01000071.1" "LPUQ01000072.1"
[52] "LPUQ01000073.1" "LPUQ01000074.1" "LPUQ01000076.1"
[55] "LPUQ01000082.1" "LPUQ01000087.1" "LPUQ01000088.1"
[58] "LPUQ01000090.1" "LPUQ01000091.1" "LPUQ01000094.1"
[61] "LPUQ01000096.1" "LPUQ01000097.1" "LPUQ01000099.1"
[64] "LPUQ01000101.1" "LPUQ01000102.1" "LPUQ01000103.1"
[67] "LPUQ01000104.1" "LPUQ01000106.1" "LPUQ01000109.1"
[70] "LPUQ01000114.1" "LPUQ01000116.1" "LPUQ01000118.1"
[73] "LPUQ01000119.1" "LPUQ01000120.1" "LPUQ01000122.1"
[76] "LPUQ01000124.1" "LPUQ01000128.1" "LPUQ01000132.1"
[79] "LPUQ01000133.1" "LPUQ01000139.1" "LPUQ01000140.1"
[82] "LPUQ01000141.1" "LPUQ01000143.1" "LPUQ01000146.1"
[85] "LPUQ01000149.1" "LPUQ01000150.1" "LPUQ01000169.1"
[88] "LPUQ01000172.1" "LPUQ01000177.1" "LPUQ01000179.1"
[91] "LPUQ01000180.1" "LPUQ01000181.1" "LPUQ01000187.1"
[94] "LPUQ01000188.1" "LPUQ01000189.1" "LPUQ01000192.1"
[97] "LPUQ01000204.1" "LPUQ01000205.1" "LPUQ01000207.1"
[100] "LPUQ01000218.1" "LPUQ01000241.1" "LPUQ01000244.1"
[103] "LPUQ01000246.1" "LPUQ01000247.1" "LPUQ01000249.1"
[106] "LPUQ01000252.1"
> annotatePeak_result <- ChIPseeker::annotatePeak(peak = test_peak,
+ TxDb = TxDb_maize)
>> preparing features information... 2021-12-23 11:46:35
>> identifying nearest features... 2021-12-23 11:46:35
>> calculating distance from peak to TSS... 2021-12-23 11:46:36
>> assigning genomic annotation... 2021-12-23 11:46:36
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘NSBS’ for signature ‘"SortedByQueryHits"’
In addition: Warning messages:
1: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
2: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
3: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
4: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
5: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
As the situation show above, the seqlevels in peak file are chromosome
but the seqlevels in the txdb are accession number
. In this situation adding "chr" did not work.
test_peak <- diffloop::addchr(test_peak)
> test_peak
GRanges object with 91 ranges and 0 metadata columns:
seqnames ranges strand
<Rle> <IRanges> <Rle>
[1] chr1 44247-44835 *
[2] chr1 44247-44835 *
[3] chr10 106154-106413 *
[4] chr2 40042-41047 *
[5] chr3 155021-155356 *
... ... ... ...
[87] chrB73V4_ctg89 18553-19574 *
[88] chrB73V4_ctg91 51227-51931 *
[89] chrB73V4_ctg95 33500-34087 *
[90] chrB73V4_ctg98 5686-6846 *
[91] chrMt 75155-75610 *
-------
seqinfo: 90 sequences from an unspecified genome; no seqlengths
## annotate peak
> annotatePeak_result <- ChIPseeker::annotatePeak(peak = test_peak,
+ TxDb = TxDb_maize)
>> preparing features information... 2021-12-23 11:45:31
>> identifying nearest features... 2021-12-23 11:45:32
>> calculating distance from peak to TSS... 2021-12-23 11:45:32
>> assigning genomic annotation... 2021-12-23 11:45:32
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘NSBS’ for signature ‘"SortedByQueryHits"’
In addition: Warning messages:
1: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
2: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
3: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
4: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
5: In .Seqinfo.mergexy(x, y) :
The 2 combined objects have no sequence levels in common. (Use
suppressWarnings() to suppress this warning.)
- Methods for solving the error by changing seqlevels
Another method is pushed by changing the
chromosome
toaccession number
, like Bioconductor issue.
This method can work properly, but it did not explain the method in details. How to change the seqlevels? How to find the correspondence between chromosome and accession number?
First, we need to get in the repository from which we had download GFF files.
The picture above is the gff files which we can use to make txdb. The is a files name
GCA_000005005.6_B73_RefGen_v4_assembly_structure/
which stored the correspondence between chromosome and accession number. We stepped into the GCA_000005005.6_B73_RefGen_v4_assembly_structure/Primary_Assembly/
.
We need to download two files, assembled_chromosomes/chr2acc
and component_localID2acc
.
component_localID2acc <- read.table("component_localID2acc.txt",
header = F,col.names = c("Chromosome", "Accession.version"))
chr2acc <- read.table("chr2acc.txt",header = F,
col.names = c("Chromosome","Accession.version"))
> head(component_localID2acc)
Chromosome Accession.version
1 B73V4_ctg1 LPUQ01000001.1
2 B73V4_ctg2 LPUQ01000002.1
3 B73V4_ctg3 LPUQ01000003.1
4 B73V4_ctg4 LPUQ01000004.1
5 B73V4_ctg5 LPUQ01000005.1
6 B73V4_ctg6 LPUQ01000006.1
> head(chr2acc)
Chromosome Accession.version
1 1 CM007647.1
2 2 CM007648.1
3 3 CM007649.1
4 4 CM000780.4
5 5 CM000781.4
6 6 CM000782.4
Above all the files, we can not find the levels Mt
, so we need to drop it.
test_peak <- GenomeInfoDb::dropSeqlevels(test_peak,
value = "Mt",
pruning.mode = "coarse")
> test_peak
GRanges object with 90 ranges and 0 metadata columns:
seqnames ranges strand
<Rle> <IRanges> <Rle>
[1] 1 44247-44835 *
[2] 1 44247-44835 *
[3] 10 106154-106413 *
[4] 2 40042-41047 *
[5] 3 155021-155356 *
... ... ... ...
[86] B73V4_ctg88 8464-9103 *
[87] B73V4_ctg89 18553-19574 *
[88] B73V4_ctg91 51227-51931 *
[89] B73V4_ctg95 33500-34087 *
[90] B73V4_ctg98 5686-6846 *
-------
seqinfo: 89 sequences from an unspecified genome; no seqlengths
And then we need to change the seqlevels in Peak file.
all <- rbind(component_localID2acc,chr2acc)
x <- data.frame(Chromosome = GenomeInfoDb::seqlevels(test_peak))
all <- merge(all, x, by = "Chromosome")
new_seqnames <- all$Accession.version
names(new_seqnames) <- all$Chromosome
test_peak <- GenomeInfoDb::renameSeqlevels(test_peak, new_seqnames)
> new_seqnames
1 10 2 3
"CM007647.1" "CM000786.4" "CM007648.1" "CM007649.1"
4 5 6 7
"CM000780.4" "CM000781.4" "CM000782.4" "CM007650.1"
8 9 B73V4_ctg10 B73V4_ctg100
"CM000784.4" "CM000785.4" "LPUQ01000010.1" "LPUQ01000099.1"
B73V4_ctg103 B73V4_ctg104 B73V4_ctg105 B73V4_ctg107
"LPUQ01000102.1" "LPUQ01000103.1" "LPUQ01000104.1" "LPUQ01000106.1"
B73V4_ctg11 B73V4_ctg115 B73V4_ctg119 B73V4_ctg12
"LPUQ01000011.1" "LPUQ01000114.1" "LPUQ01000118.1" "LPUQ01000012.1"
B73V4_ctg121 B73V4_ctg123 B73V4_ctg129 B73V4_ctg13
"LPUQ01000120.1" "LPUQ01000122.1" "LPUQ01000128.1" "LPUQ01000013.1"
B73V4_ctg134 B73V4_ctg140 B73V4_ctg141 B73V4_ctg142
"LPUQ01000133.1" "LPUQ01000139.1" "LPUQ01000140.1" "LPUQ01000141.1"
B73V4_ctg146 B73V4_ctg147 B73V4_ctg15 B73V4_ctg150
"LPUQ01000145.1" "LPUQ01000146.1" "LPUQ01000015.1" "LPUQ01000149.1"
B73V4_ctg153 B73V4_ctg168 B73V4_ctg170 B73V4_ctg173
"LPUQ01000152.1" "LPUQ01000167.1" "LPUQ01000169.1" "LPUQ01000172.1"
B73V4_ctg174 B73V4_ctg178 B73V4_ctg181 B73V4_ctg182
"LPUQ01000173.1" "LPUQ01000177.1" "LPUQ01000180.1" "LPUQ01000181.1"
B73V4_ctg186 B73V4_ctg188 B73V4_ctg190 B73V4_ctg193
"LPUQ01000185.1" "LPUQ01000187.1" "LPUQ01000189.1" "LPUQ01000192.1"
B73V4_ctg2 B73V4_ctg201 B73V4_ctg203 B73V4_ctg205
"LPUQ01000002.1" "LPUQ01000200.1" "LPUQ01000202.1" "LPUQ01000204.1"
B73V4_ctg225 B73V4_ctg23 B73V4_ctg24 B73V4_ctg242
"LPUQ01000224.1" "LPUQ01000023.1" "LPUQ01000024.1" "LPUQ01000241.1"
B73V4_ctg248 B73V4_ctg253 B73V4_ctg26 B73V4_ctg28
"LPUQ01000247.1" "LPUQ01000252.1" "LPUQ01000026.1" "LPUQ01000028.1"
B73V4_ctg3 B73V4_ctg31 B73V4_ctg35 B73V4_ctg4
"LPUQ01000003.1" "LPUQ01000031.1" "LPUQ01000035.1" "LPUQ01000004.1"
B73V4_ctg41 B73V4_ctg42 B73V4_ctg44 B73V4_ctg46
"LPUQ01000041.1" "LPUQ01000042.1" "LPUQ01000044.1" "LPUQ01000046.1"
B73V4_ctg48 B73V4_ctg49 B73V4_ctg5 B73V4_ctg50
"LPUQ01000048.1" "LPUQ01000049.1" "LPUQ01000005.1" "LPUQ01000050.1"
B73V4_ctg51 B73V4_ctg52 B73V4_ctg53 B73V4_ctg56
"LPUQ01000051.1" "LPUQ01000052.1" "LPUQ01000053.1" "LPUQ01000055.1"
B73V4_ctg58 B73V4_ctg6 B73V4_ctg60 B73V4_ctg61
"LPUQ01000057.1" "LPUQ01000006.1" "LPUQ01000059.1" "LPUQ01000060.1"
B73V4_ctg65 B73V4_ctg68 B73V4_ctg72 B73V4_ctg73
"LPUQ01000064.1" "LPUQ01000067.1" "LPUQ01000071.1" "LPUQ01000072.1"
B73V4_ctg74 B73V4_ctg75 B73V4_ctg8 B73V4_ctg87
"LPUQ01000073.1" "LPUQ01000074.1" "LPUQ01000008.1" "LPUQ01000086.1"
B73V4_ctg88 B73V4_ctg89 B73V4_ctg91 B73V4_ctg95
"LPUQ01000087.1" "LPUQ01000088.1" "LPUQ01000090.1" "LPUQ01000094.1"
B73V4_ctg98
"LPUQ01000097.1"
> test_peak
GRanges object with 90 ranges and 0 metadata columns:
seqnames ranges strand
<Rle> <IRanges> <Rle>
[1] CM007647.1 44247-44835 *
[2] CM007647.1 44247-44835 *
[3] CM000786.4 106154-106413 *
[4] CM007648.1 40042-41047 *
[5] CM007649.1 155021-155356 *
... ... ... ...
[86] LPUQ01000087.1 8464-9103 *
[87] LPUQ01000088.1 18553-19574 *
[88] LPUQ01000090.1 51227-51931 *
[89] LPUQ01000094.1 33500-34087 *
[90] LPUQ01000097.1 5686-6846 *
-------
seqinfo: 89 sequences from an unspecified genome; no seqlengths
In this way, the seqlevels are converted to be the same as txdb. And annotatePeak()
work properly.
annotatePeak_result <- ChIPseeker::annotatePeak(peak = test_peak,
TxDb = TxDb_maize)
> annotatePeak_result <- ChIPseeker::annotatePeak(peak = test_peak,
+ TxDb = TxDb_maize)
>> preparing features information... 2021-12-23 12:12:21
>> identifying nearest features... 2021-12-23 12:12:21
>> calculating distance from peak to TSS... 2021-12-23 12:12:22
>> assigning genomic annotation... 2021-12-23 12:12:22
>> assigning chromosome lengths 2021-12-23 12:12:25
>> done... 2021-12-23 12:12:25
Warning messages:
1: In .Seqinfo.mergexy(x, y) :
Each of the 2 combined objects has sequence levels not in the other:
- in 'x': LPUQ01000145.1, LPUQ01000015.1, LPUQ01000152.1, LPUQ01000167.1, LPUQ01000173.1, LPUQ01000185.1, LPUQ01000200.1, LPUQ01000202.1, LPUQ01000224.1, LPUQ01000059.1, LPUQ01000086.1
- in 'y': LPUQ01000014.1, LPUQ01000018.1, LPUQ01000020.1, LPUQ01000029.1, LPUQ01000040.1, LPUQ01000054.1, LPUQ01000065.1, LPUQ01000068.1, LPUQ01000076.1, LPUQ01000082.1, LPUQ01000091.1, LPUQ01000096.1, LPUQ01000101.1, LPUQ01000109.1, LPUQ01000116.1, LPUQ01000119.1, LPUQ01000124.1, LPUQ01000132.1, LPUQ01000143.1, LPUQ01000150.1, LPUQ01000179.1, LPUQ01000188.1, LPUQ01000205.1, LPUQ01000207.1, LPUQ01000218.1, LPUQ01000244.1, LPUQ01000246.1, LPUQ01000249.1
Make sure to always combine/compare objects based on the same reference
genome (use suppressWarnings() to suppress this warning).
2: In .Seqinfo.mergexy(x, y) :
Each of the 2 combined objects has sequence levels not in the other:
- in 'x': LPUQ01000145.1, LPUQ01000015.1, LPUQ01000152.1, LPUQ01000167.1, LPUQ01000173.1, LPUQ01000185.1, LPUQ01000200.1, LPUQ01000202.1, LPUQ01000224.1, LPUQ01000059.1, LPUQ01000086.1
- in 'y': LPUQ01000014.1, LPUQ01000018.1, LPUQ01000020.1, LPUQ01000029.1, LPUQ01000040.1, LPUQ01000054.1, LPUQ01000065.1, LPUQ01000068.1, LPUQ01000076.1, LPUQ01000082.1, LPUQ01000091.1, LPUQ01000096.1, LPUQ01000101.1, LPUQ01000109.1, LPUQ01000116.1, LPUQ01000119.1, LPUQ01000124.1, LPUQ01000132.1, LPUQ01000143.1, LPUQ01000150.1, LPUQ01000179.1, LPUQ01000188.1, LPUQ01000205.1, LPUQ01000207.1, LPUQ01000218.1, LPUQ01000244.1, LPUQ01000246.1, LPUQ01000249.1
Make sure to always combine/compare objects based on the same reference
genome (use suppressWarnings() to suppress this warning).
3: In .Seqinfo.mergexy(x, y) :
Each of the 2 combined objects has sequence levels not in the other:
- in 'x': LPUQ01000145.1, LPUQ01000015.1, LPUQ01000152.1, LPUQ01000167.1, LPUQ01000173.1, LPUQ01000185.1, LPUQ01000200.1, LPUQ01000202.1, LPUQ01000224.1, LPUQ01000059.1, LPUQ01000086.1
- in 'y': LPUQ01000014.1, LPUQ01000018.1, LPUQ01000020.1, LPUQ01000029.1, LPUQ01000040.1, LPUQ01000054.1, LPUQ01000065.1, LPUQ01000068.1, LPUQ01000076.1, LPUQ01000082.1, LPUQ01000091.1, LPUQ01000096.1, LPUQ01000101.1, LPUQ01000109.1, LPUQ01000116.1, LPUQ01000119.1, LPUQ01000124.1, LPUQ01000132.1, LPUQ01000143.1, LPUQ01000150.1, LPUQ01000179.1, LPUQ01000188.1, LPUQ01000205.1, LPUQ01000207.1, LPUQ01000218.1, LPUQ01000244.1, LPUQ01000246.1, LPUQ01000249.1
Make sure to always combine/compare objects based on the same reference
genome (use suppressWarnings() to suppress this warning).
4: In .Seqinfo.mergexy(x, y) :
Each of the 2 combined objects has sequence levels not in the other:
- in 'x': LPUQ01000145.1, LPUQ01000015.1, LPUQ01000152.1, LPUQ01000167.1, LPUQ01000173.1, LPUQ01000185.1, LPUQ01000200.1, LPUQ01000202.1, LPUQ01000224.1, LPUQ01000059.1, LPUQ01000086.1
- in 'y': LPUQ01000014.1, LPUQ01000018.1, LPUQ01000020.1, LPUQ01000029.1, LPUQ01000040.1, LPUQ01000054.1, LPUQ01000065.1, LPUQ01000068.1, LPUQ01000076.1, LPUQ01000082.1, LPUQ01000091.1, LPUQ01000096.1, LPUQ01000101.1, LPUQ01000109.1, LPUQ01000116.1, LPUQ01000119.1, LPUQ01000124.1, LPUQ01000132.1, LPUQ01000143.1, LPUQ01000150.1, LPUQ01000179.1, LPUQ01000188.1, LPUQ01000205.1, LPUQ01000207.1, LPUQ01000218.1, LPUQ01000244.1, LPUQ01000246.1, LPUQ01000249.1
Make sure to always combine/compare objects based on the same reference
genome (use suppressWarnings() to suppress this warning).
5: In .Seqinfo.mergexy(x, y) :
Each of the 2 combined objects has sequence levels not in the other:
- in 'x': LPUQ01000145.1, LPUQ01000015.1, LPUQ01000152.1, LPUQ01000167.1, LPUQ01000173.1, LPUQ01000185.1, LPUQ01000200.1, LPUQ01000202.1, LPUQ01000224.1, LPUQ01000059.1, LPUQ01000086.1
- in 'y': LPUQ01000014.1, LPUQ01000018.1, LPUQ01000020.1, LPUQ01000029.1, LPUQ01000040.1, LPUQ01000054.1, LPUQ01000065.1, LPUQ01000068.1, LPUQ01000076.1, LPUQ01000082.1, LPUQ01000091.1, LPUQ01000096.1, LPUQ01000101.1, LPUQ01000109.1, LPUQ01000116.1, LPUQ01000119.1, LPUQ01000124.1, LPUQ01000132.1, LPUQ01000143.1, LPUQ01000150.1, LPUQ01000179.1, LPUQ01000188.1, LPUQ01000205.1, LPUQ01000207.1, LPUQ01000218.1, LPUQ01000244.1, LPUQ01000246.1, LPUQ01000249.1
Make sure to always combine/compare objects based on the same reference
genome (use suppressWarnings() to suppress this warning).
There are warnings but it does not matter.
> annotatePeak_result
Annotated peaks generated by ChIPseeker
79/90 peaks were annotated
Genomic Annotation Summary:
Feature Frequency
4 Promoter (<=1kb) 58.227848
5 Promoter (1-2kb) 11.392405
6 Promoter (2-3kb) 3.797468
1 5' UTR 1.265823
3 Other Exon 2.531646
2 Distal Intergenic 22.784810
Check the chromosome name first. This problem might caused by the inconformity of chromosome names in the input file and the database.