Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: invalid subscript #238

Open
CherryX727 opened this issue Aug 12, 2024 · 3 comments
Open

Error: invalid subscript #238

CherryX727 opened this issue Aug 12, 2024 · 3 comments

Comments

@CherryX727
Copy link

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
|
[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?

@YujingLin123
Copy link

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.

@weishwu
Copy link

weishwu commented Dec 7, 2024

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.

@YujingLin123
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants