text: user10821: How do I remove rows in a VCF file on 1kGenome column, where Match=EXACT using bash ?
  
  user2108: Hard to say without seeing VCF rows, but generally speaking with text files you can use grep, if I understand the question:
  grep -vw "Match=EXACT" file.vcf > filtered.vcf
  
  
  user12502: You can filter records in Python for example using pyvcf.VcfFrame.filter_flagany() method I wrote:
  >>> from fuc import pyvcf
  >>> data = {
  ...     'CHROM': ['chr1', 'chr1', 'chr1', 'chr1'],
  ...     'POS': [100, 101, 102, 103],
  ...     'ID': ['.', '.', '.', '.'],
  ...     'REF': ['G', 'T', 'A', 'C'],
  ...     'ALT': ['A', 'C', 'T', 'A'],
  ...     'QUAL': ['.', '.', '.', '.'],
  ...     'FILTER': ['.', '.', '.', '.'],
  ...     'INFO': ['DB', 'DB;H2;Match=EXACT', 'DB;H2;Match=EXACT', '.'],
  ...     'FORMAT': ['GT', 'GT', 'GT', 'GT'],
  ...     'Steven': ['0/0', '0/1', '0/1', '0/0'],
  ... }
  >>> vf = pyvcf.VcfFrame.from_dict([], data)
  >>> # vf = pyvcf.VcfFrame.from_file('your_vcf.vcf')
  >>> vf.df
    CHROM  POS ID REF ALT QUAL FILTER               INFO FORMAT Steven
  0  chr1  100  .   G   A    .      .                 DB     GT    0/0
  1  chr1  101  .   T   C    .      .  DB;H2;Match=EXACT     GT    0/1
  2  chr1  102  .   A   T    .      .  DB;H2;Match=EXACT     GT    0/1
  3  chr1  103  .   C   A    .      .                  .     GT    0/0
  >>> vf.filter_flagany(['Match=EXACT'], opposite=True).df
    CHROM  POS ID REF ALT QUAL FILTER INFO FORMAT Steven
  0  chr1  100  .   G   A    .      .   DB     GT    0/0
  1  chr1  103  .   C   A    .      .    .     GT    0/0
  >>> # vf.to_file('filtered.vcf')
  
  
original_text: 10821: <p>How do I remove rows in a VCF file on 1kGenome column, where Match=EXACT using bash ?</p>
   2108: <p>Hard to say without seeing VCF rows, but generally speaking with text files you can use <code>grep</code>, if I understand the question:</p>
  <pre><code>grep -vw &quot;Match=EXACT&quot; file.vcf &gt; filtered.vcf
  </code></pre>
   12502: <p>You can filter records in Python for example using <code>pyvcf.VcfFrame.filter_flagany()</code> <a href="https://sbslee-fuc.readthedocs.io/en/latest/api.html#fuc.api.pyvcf.VcfFrame.filter_flagany" rel="nofollow noreferrer">method</a> I wrote:</p>
  <pre><code>&gt;&gt;&gt; from fuc import pyvcf
  &gt;&gt;&gt; data = {
  ...     'CHROM': ['chr1', 'chr1', 'chr1', 'chr1'],
  ...     'POS': [100, 101, 102, 103],
  ...     'ID': ['.', '.', '.', '.'],
  ...     'REF': ['G', 'T', 'A', 'C'],
  ...     'ALT': ['A', 'C', 'T', 'A'],
  ...     'QUAL': ['.', '.', '.', '.'],
  ...     'FILTER': ['.', '.', '.', '.'],
  ...     'INFO': ['DB', 'DB;H2;Match=EXACT', 'DB;H2;Match=EXACT', '.'],
  ...     'FORMAT': ['GT', 'GT', 'GT', 'GT'],
  ...     'Steven': ['0/0', '0/1', '0/1', '0/0'],
  ... }
  &gt;&gt;&gt; vf = pyvcf.VcfFrame.from_dict([], data)
  &gt;&gt;&gt; # vf = pyvcf.VcfFrame.from_file('your_vcf.vcf')
  &gt;&gt;&gt; vf.df
    CHROM  POS ID REF ALT QUAL FILTER               INFO FORMAT Steven
  0  chr1  100  .   G   A    .      .                 DB     GT    0/0
  1  chr1  101  .   T   C    .      .  DB;H2;Match=EXACT     GT    0/1
  2  chr1  102  .   A   T    .      .  DB;H2;Match=EXACT     GT    0/1
  3  chr1  103  .   C   A    .      .                  .     GT    0/0
  &gt;&gt;&gt; vf.filter_flagany(['Match=EXACT'], opposite=True).df
    CHROM  POS ID REF ALT QUAL FILTER INFO FORMAT Steven
  0  chr1  100  .   G   A    .      .   DB     GT    0/0
  1  chr1  103  .   C   A    .      .    .     GT    0/0
  &gt;&gt;&gt; # vf.to_file('filtered.vcf')
  </code></pre>
  