alejandrogzi / bed2gtf Goto Github PK
View Code? Open in Web Editor NEWA high-performance BED-to-GTF converter written in Rust
License: MIT License
A high-performance BED-to-GTF converter written in Rust
License: MIT License
To be implemented in the next version.
*Also include version badge in README
I don´t have an isoform.txt file, can I still convert bed to gtf?
Hi, this is a very useful tool, but i met some error here
I'm running in centos7 zsh:
bed2gtf --bed test.bed12 --isoforms test.isoform --output test.gtf
you could see many "exon_number 0" have been generated in output gtf
could you explanin why this happened?
-> % cat ./test.bed12
chrX 119786505 119791643 ENST00000361575.3 0 - 119786683 119791576 0 3 227,104,70, 0,3402,5068,
chrX 119786505 119791595 ENST00000468844.1 0 - 119791595 119791595 0 2 227,1688, 0,3402,
chrX 119786503 119787456 ENST00000477403.1 0 - 119787456 119787456 0 2 229,176, 0,777,
-> % cat test.isoform
ENSG00000198918.7 ENST00000477403.1
ENSG00000198918.7 ENST00000468844.1
ENSG00000198918.7 ENST00000361575.3
-> % cat test.gtf
#provider: bed2gtf
#version: 1.8.0
#contact: github.com/alejandrogzi/bed2gtf
#date: 2024-1-3
chrX bed2gtf gene 119786504 119791643 . - . gene_id "ENSG00000198918.7";
chrX bed2gtf transcript 119786504 119787456 . - . gene_id "ENSG00000198918.7"; transcript_id "ENST00000477403.1";
chrX bed2gtf exon 119786504 119786732 . - . gene_id "ENSG00000198918.7"; transcript_id "ENST00000477403.1"; exon_number "0"; exon_id "ENST00000477403.1.2";
chrX bed2gtf transcript 119786506 119791643 . - . gene_id "ENSG00000198918.7"; transcript_id "ENST00000361575.3";
chrX bed2gtf exon 119786506 119786732 . - . gene_id "ENSG00000198918.7"; transcript_id "ENST00000361575.3"; exon_number "0"; exon_id "ENST00000361575.3.3";
chrX bed2gtf three_prime_utr 119786506 119786683 . - 1 gene_id "ENSG00000198918.7"; transcript_id "ENST00000361575.3";
chrX bed2gtf transcript 119786506 119791595 . - . gene_id "ENSG00000198918.7"; transcript_id "ENST00000468844.1";
chrX bed2gtf exon 119786506 119786732 . - . gene_id "ENSG00000198918.7"; transcript_id "ENST00000468844.1"; exon_number "0"; exon_id "ENST00000468844.1.2";
chrX bed2gtf stop_codon 119786684 119786686 . - 0 gene_id "ENSG00000198918.7"; transcript_id "ENST00000361575.3"; exon_number "0"; exon_id "ENST00000361575.3.3";
chrX bed2gtf CDS 119786687 119786732 . - 1 gene_id "ENSG00000198918.7"; transcript_id "ENST00000361575.3"; exon_number "0"; exon_id "ENST00000361575.3.3";
chrX bed2gtf exon 119787281 119787456 . - . gene_id "ENSG00000198918.7"; transcript_id "ENST00000477403.1"; exon_number "1"; exon_id "ENST00000477403.1.1";
chrX bed2gtf exon 119789908 119790011 . - . gene_id "ENSG00000198918.7"; transcript_id "ENST00000361575.3"; exon_number "1"; exon_id "ENST00000361575.3.2";
chrX bed2gtf CDS 119789908 119790011 . - 0 gene_id "ENSG00000198918.7"; transcript_id "ENST00000361575.3"; exon_number "1"; exon_id "ENST00000361575.3.2";
chrX bed2gtf exon 119789908 119791595 . - . gene_id "ENSG00000198918.7"; transcript_id "ENST00000468844.1"; exon_number "1"; exon_id "ENST00000468844.1.1";
chrX bed2gtf exon 119791574 119791643 . - . gene_id "ENSG00000198918.7"; transcript_id "ENST00000361575.3"; exon_number "2"; exon_id "ENST00000361575.3.1";
chrX bed2gtf CDS 119791574 119791576 . - 0 gene_id "ENSG00000198918.7"; transcript_id "ENST00000361575.3"; exon_number "2"; exon_id "ENST00000361575.3.1";
chrX bed2gtf start_codon 119791574 119791576 . - 0 gene_id "ENSG00000198918.7"; transcript_id "ENST00000361575.3"; exon_number "2"; exon_id "ENST00000361575.3.1";
chrX bed2gtf five_prime_utr 119791577 119791643 . - 0 gene_id "ENSG00000198918.7"; transcript_id "ENST00000361575.3";
Even since gtfsort exists, user may want to receive an output nicely sorted. The computation cost is not that significant (~0.2 seconds).
How to do it: Implement an early ordering layer before converting lines into BedRecords.
In any given bed2gtf run, the logging info lacks time units:
2023-10-05T17:20:03.860Z INFO [bed2gtf] Memory usage: 10.5582695 MB
2023-10-05T17:20:03.860Z INFO [bed2gtf] Elapsed: 9.9935
should be:
2023-10-05T17:20:03.860Z INFO [bed2gtf] Memory usage: 10.5582695 MB
2023-10-05T17:20:03.860Z INFO [bed2gtf] Elapsed: 9.9935 secs
How to fix it: modify the formatted String in the logging function.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.