Identify non-coding regions from a genome annotation I have this GTF file and I use the command below on a Linux machine to extract the coding regions of the genome:
awk '{if($3=="transcript" &amp;&amp; $20==&quot;\&quot;protein_coding\&quot;;&quot;){print $0}}' gencode.gtf

How I could do the inverse and keep only non coding regions?
I need non coding regions of human genome, but for asking my question here I referred to coding parts too.
After googling I see I actually need enhancers, promoters, or other regulatory elements of human genome to find cancer driver genes placed in these regions.
Likely non-coding regions of genome are here:
https://elifesciences.org/download/aHR0cHM6Ly9jZG4uZWxpZmVzY2llbmNlcy5vcmcvYXJ0aWNsZXMvMjE3NzgvZWxpZmUtMjE3Nzgtc3VwcDQtdjMueGxzeA==/elife-21778-supp4-v3.xlsx?_hash=KQi5jfO3kT2c4Qw44j4Rg6YAyCBQilYuWHVYXcRDuuo%3D
Getting the non coding regions of a protein coding transcript, sounds like you are looking for UTR.
UTR has its own feature in the gtf file. So you can do this:
$ awk -v FS="\t" '$3==&quot;UTR&quot;' gencode.gtf

If the gtf file is compressed use this instead:
$ zcat gencode.gtf.gz | awk -v FS="\t" '$3==&quot;UTR&quot;'

BTW: Why are you using such an old release of gencode? The current version is v29.
As @Wouter tells you, the non coding region of a genome is the complement of the coding regions. Coding regions have its own feature in the gtf file. You can get them with $ awk -v FS=&quot;\t&quot; '$3==&quot;CDS&quot;' gencode.gtf. Reading the manual for bedtools complement is your task.