Skip to content

GTF to Bed file conversion with gtf2bed gives error Potentially missing gene or transcript ID from GTF attributes

Polina Bevad edited this page Apr 12, 2019 · 1 revision

Problem

VarDict needs a BED file to process the regions from it. If you have GTF file, you can simply get in from it. Sometimes message Error: Potentially missing gene or transcript ID from GTF attributes appears when the first line is missing the transcript_id field.

Solution

The author of issue 212 found the way to get BED from GTF with awk and gtf2bed utility. The error was bypassed by awk conditions:

awk '{ if ( ~ "transcript_id") print ; else print " transcript_id "";"; }' gencode.vM19.annotation.gtf | gtf2bed - > gencode.vM19.annotation.gtf.bed