I want to convert an hg38 GTF file to bed format using gtf2bed
:
gtf2bed Homo_sapiens.GRCh38.106.gtf > Homo_sapiens.GRCh38.106.gtf.bed
It outputs a bed file but it only contains the coordinates for the whole genes and has lost the locations of the exons, UTRs, etc.
While I am running gtf2bed
, I get thousands of warning like this:
WARNING:root:None 21 33276625 33276753 + three_prime_utr
WARNING:root:WARNING End is after gene end (33279918 > 0)
WARNING:root:WARNING Start is after gene end
WARNING:root:None 21 33279752 33279918 + three_prime_utr
WARNING:root:WARNING End is after gene end (33283212 > 0)
WARNING:root:WARNING Start is after gene end
WARNING:root:None 21 33283094 33283212 + three_prime_utr
WARNING:root:WARNING End is after gene end (37101343 > 0)
WARNING:root:WARNING Start is after gene end
WARNING:root:None 21 37100814 37101343 + transcript
WARNING:root:WARNING End is after gene end (37101343 > 0)
WARNING:root:WARNING Start is after gene end
WARNING:root:None 21 37100814 37101343 + exon
WARNING:root:WARNING End is after gene end (37237744 > 0)
WARNING:root:WARNING Start is after gene end
WARNING:root:None 21 37221419 37237744 + transcript
WARNING:root:WARNING End is after gene end (37221597 > 0)
WARNING:root:WARNING Start is after gene end
WARNING:root:None 21 37221419 37221597 + exon
WARNING:root:WARNING End is after gene end (37237744 > 0)
WARNING:root:WARNING Start is after gene end
WARNING:root:None 21 37237404 37237744 + exon
How can I create a bed file that also contains the coordinates of the other genomic features?