Error: invalid subscript
Hi, thanks for your tools.
When I try to give annotion to my bed file of ATAC-Seq data, I used code of following.
peakAnno <- annotatePeak(Ascl1_1_peaks,TxDb=txdb,tssRegion=c(-3000, 3000), verbose=FALSE,addFlankGeneInfo=TRUE, flankDistance=5000,annoDb="org.Mm.eg.db")
But it always prompts the error like 'Error: invalid subscript'.
So I try to check my input file with head(peaks).
GRanges object with 6 ranges and 2 metadata columns: seqnames ranges strand | V4 V5 <Rle> <IRanges> <Rle> |
[1] NC_000067.7 3051930 * | Ascl1-1_peak_1 5.22645 [2] NC_000067.7 3077661 * | Ascl1-1_peak_2 3.50514 [3] NC_000067.7 3264656 * | Ascl1-1_peak_3 4.34534 [4] NC_000067.7 3404048 * | Ascl1-1_peak_4 2.71066 [5] NC_000067.7 3431298 * | Ascl1-1_peak_5 7.09632 [6] NC_000067.7 3443044 * | Ascl1-1_peak_6 7.09632 ....... seqinfo: 33 sequences from an unspecified genome; no seqlengths
Is there any mistakes in my file, or how can I solve this problem?
Hi, I encountered the same issue, and here's the solution: First, fix the GFF file using TBtools to update it to the latest version. Then, convert the GFF file to GTF format using gffread. This resolved the problem.
Hi @YujingLin123 What do you mean by "fix the GFF file using TBtools to update it to the latest version"? What's the problem with the GTF or GFF downloaded from Ensembl directly? Thanks.
The original GFF : Chr1 GLEAN mRNA 667 4641 0.697869 - . ID=Pbr041604.1;source_id=pyrus_GLEAN_10003889; Chr1 GLEAN CDS 4081 4641 . - 0 Parent=Pbr041604.1; Chr1 GLEAN CDS 1723 2025 . - 0 Parent=Pbr041604.1; Chr1 GLEAN CDS 667 1626 . - 0 Parent=Pbr041604.1;
And then convert this GFF to the new GFF using TBtools, like this: Chr1 TBtools gene 667 4641 . - . ID=Pbr041604.1.gene Chr1 GLEAN mRNA 667 4641 0.697869 - . ID=Pbr041604.1;source_id=pyrus_GLEAN_10003889;Parent=Pbr041604.1.gene Chr1 TBtools exon 667 1626 . - . Parent=Pbr041604.1 Chr1 GLEAN CDS 667 1626 . - 0 Parent=Pbr041604.1 Chr1 TBtools exon 1723 2025 . - . Parent=Pbr041604.1 Chr1 GLEAN CDS 1723 2025 . - 0 Parent=Pbr041604.1 Chr1 TBtools exon 4081 4641 . - . Parent=Pbr041604.1 Chr1 GLEAN CDS 4081 4641 . - 0 Parent=Pbr041604.1
Finally, convert this new GFF to GTF using gffread.