title: Filtering with help of two columns from a TSV file
body: <p>I have the following file:</p>
  <pre><code>Pepper1.55ch01  PGA1.55 gene    63209   63880   .       -       .       ID=CA01g00010;Name=CA01g00010
  Pepper1.55ch01  PGA1.55 mRNA    63209   63880   .       -       .       ID=mRNA.CA01g00010;Parent=CA01g00010;Note=&quot;Detected protein of unknown function&quot;
  Pepper1.55ch01  PGA1.55 exon    63209   63300   .       -       .       ID=exon:CA01g00010:1;Parent=mRNA.CA01g00010
  Pepper1.55ch01  PGA1.55 CDS     63209   63300   .       -       0       ID=CDS:CA01g00010:1;Parent=mRNA.CA01g00010
  Pepper1.55ch01  PGA1.55 exon    63445   63730   .       -       .       ID=exon:CA01g00010:2;Parent=mRNA.CA01g00010
  Pepper1.55ch01  PGA1.55 CDS     63445   63730   .       -       0       ID=CDS:CA01g00010:2;Parent=mRNA.CA01g00010
  Pepper1.55ch01  PGA1.55 exon    63758   63880   .       -       .       ID=exon:CA01g00010:3;Parent=mRNA.CA01g00010
  Pepper1.55ch01  PGA1.55 CDS     63758   63880   .       -       0       ID=CDS:CA01g00010:3;Parent=mRNA.CA01g00010
  
  Pepper1.55ch01  PGA1.55 gene    112298  112938  .       -       .       ID=CA01g00020;Name=CA01g00020
  Pepper1.55ch01  PGA1.55 mRNA    112298  112938  .       -       .       ID=mRNA.CA01g00020;Parent=CA01g00020;Note=&quot;PREDICTED: protein ECERIFERUM 3-like [Solanum tuberosum]&quot;
  Pepper1.55ch01  PGA1.55 exon    112298  112457  .       -       .       ID=exon:CA01g00020:1;Parent=mRNA.CA01g00020
  Pepper1.55ch01  PGA1.55 CDS     112298  112457  .       -       0       ID=CDS:CA01g00020:1;Parent=mRNA.CA01g00020
  Pepper1.55ch01  PGA1.55 exon    112565  112743  .       -       .       ID=exon:CA01g00020:2;Parent=mRNA.CA01g00020
  Pepper1.55ch01  PGA1.55 CDS     112565  112743  .       -       0       ID=CDS:CA01g00020:2;Parent=mRNA.CA01g00020
  Pepper1.55ch01  PGA1.55 exon    112828  112938  .       -       .       ID=exon:CA01g00020:3;Parent=mRNA.CA01g00020
  Pepper1.55ch01  PGA1.55 CDS     112828  112938  .       -       0       ID=CDS:CA01g00020:3;Parent=mRNA.CA01g00020
  ...
  </code></pre>
  <p>Now I want to extract ID (e.g. CA01g00010) from column 9 if column 3 is a gene. However, the below awk/grep commands delivered different amounts of ids.</p>
  <pre><code>&gt; awk '{print $3,$9}' Pepper_1.55.gene_models-1-12.gff3 | grep gene | wc -l
  30265
  
  &gt; awk '{print $3}' Pepper_1.55.gene_models-1-12.gff3 | grep gene | wc -l
  30242
  </code></pre>
  <p>It appears that column 9 sometimes contain the gene. What did I miss?</p>