-excl-variants Not matching any variants.

Issue #57 invalid
Former user created an issue

My command: ./gavinband-qctool-ba5eaa44a62f/build/release/qctool_v2.0.1 -g chr22.gen.gz -og see.bgen -excl-variants chr22_filter.txt -log see.log

The above command fails to find any matching variants and I'm failing to understand why. Not sure if it was because my gen.gz file is a bit weird or not.. So I converted it to a bgen using the (-assume-chromosome 22) parameter, but it still fails with that bgen. Below are tiny snippets of my input files.

My gen file: 22 22:16050435 16050435 T C 0.999 0.001 0.000

My exlusion file: SNPID rsid chromosome position alleleA alleleB 22:16050435 22:16050435 22 16050435 T C

Qctools output: Output GEN file(s): "see.bgen" Output SNP position file(s): (n/a) Sample filter: . SNP filter: NOT( SNP (comparing position,alleles,ids) in { 22:16050435 [22:16050435] 22 16050435 T C, 22:16050783 [22:16050783] 22 16050783 A G, 22:16050822 [22:16050822] 22 16050822 G A...(+342615 others) } ).

Comments (6)

  1. Gavin Band repo owner

    Hi, It looks to me that your exclusion file should be:

    SNPID rsid chromosome position alleleA alleleB
    22 22:16050435 22 16050435 T C
    

    because the SNPID column of the GEN file contains chromosomes. You can use the -compare-variants-by option to control how variants are matched, see here for more on this.

    Hope that help, Gavin

  2. Kevin Boehme

    Thanks for the response. I see, you are right about that SNPID column. Updated mine but still doesn't seem to work. I tried every possible -compare-variants-by option too but it fails to match everything I'm interested in (which is chrom, pos, alleleA, and alleleB). It doesn't seem possible to use more than one -compare-variants-by option?

    My new exclusion file:

    SNPID rsid chromosome position alleleA alleleB
    22 22:16050435 22 16050435 T C
    

    gen.gz file:

    22 22:16050435 16050435 T C 0.999 0.001 0.000
    
  3. Gavin Band repo owner

    Hi Kevin, What I'd advise doing is this: run qctool to peek at what the data looks like:

    qctool -g see.bgen -og - -ofiletype gen | cut -d' ' -f1-6 | head
    

    Based on what you've said above, the output lines should look like this:

    22 22 22:16050435 22 16050435 T C
    

    ...in which case I'd expect your command to work. If it doesn't look like that then that would explain why it's not working - feel free to paste the output here if it's not obvious.

    Best, Gavin.

  4. Kevin Boehme

    Thanks again for the help. My file was missing the first 22, and it seems running the excl-variants command like this works (using assume-chromosome param):

    gavinband-qctool-ba5eaa44a62f/build/release/qctool_v2.0.1 -g chr22_head.gen -assume-chromosome 22 -excl-variants chr22_filter.txt -og tester.gen

  5. Log in to comment