--check-sex problem

2,107 views
Skip to first unread message

anita...@gmail.com

unread,
Oct 26, 2017, 10:04:28 AM10/26/17
to plink2-users
Dear Team,

I have a multiple sample vcf file (from GATK pipeline). I have converted vcf file to plink format and run sex check

/plink --vcf vcf --double-id --make-bed --out

plink --bfile --check-sex 0.35 0.65 --out

However, almost a half of my samples are showing a problem...

Thank you 

475071 variants loaded from .bim file.
850 people (557 males, 293 females) loaded from .fam.
Ambiguous sex IDs written sex_pheno.nosex .
850 phenotype values loaded from .fam.
Warning: Ignoring phenotypes of missing-sex samples.  If you don't want those
phenotypes to be ignored, use the --allow-no-sex flag.
Using 1 thread (no multithreaded calculations invoked).
Before main variant filters, 850 founders and 0 nonfounders present.
Calculating allele frequencies... done.
Warning: 90612 het. haploid genotypes present (see
sex_pheno.hh ); many commands treat these as missing.
Warning: Nonmissing nonmale Y chromosome genotype(s) present; many commands
treat these as missing.
Total genotyping rate is 0.986978.
475071 variants and 850 people pass filters and QC.
Among remaining phenotypes, 425 are cases and 425 are controls. 
--check-sex: 7949 Xchr and 0 Ychr variant(s) scanned, 395 problems detected




Auto Generated Inline Image 1

Christopher Chang

unread,
Oct 26, 2017, 1:10:53 PM10/26/17
to plink2-users
Hi,

Can you post the full .log file (and maybe rerun with the latest plink 1.9 build)?  "Ambiguous sex IDs written" is a bit odd when there appear to be no missing-sex samples.

anita...@gmail.com

unread,
Oct 27, 2017, 4:39:52 AM10/27/17
to plink2-users
Hi Christopher,

Thank you for your reply. I have re-run it using the v1.90b4.9 with smaller dataset, but still in ~50% samples "problem" was detected.

Thank you again.
Anita

plink --vcf vcf --double-id --make-bed --out

plink --bfile --check-sex --out

PLINK v1.90b4.9 64-bit (13 Oct 2017)
Options in effect:
  --bfile all.snp.filtered_sex_pheno
  --check-sex
  --out all.snp.filtered_sex_pheno
Hostname: gouj80.black
Working directory: /anita
Start time: Fri Oct 27 09:30:30 2017

Random number seed: 1509093030
48293 MB RAM detected; reserving 24146 MB for main workspace.
465065 variants loaded from .bim file.
779 people (498 males, 270 females, 11 ambiguous) loaded from .fam.
Ambiguous sex IDs written to all.snp.filtered_sex_pheno.nosex .
779 phenotype values loaded from .fam.


Warning: Ignoring phenotypes of missing-sex samples.  If you don't want those
phenotypes to be ignored, use the --allow-no-sex flag.
Using 1 thread (no multithreaded calculations invoked).

Before main variant filters, 779 founders and 0 nonfounders present.


Calculating allele frequencies... done.
Warning: 90612 het. haploid genotypes present (see

all.snp.filtered_sex_pheno.hh ); many commands treat these as missing.


Warning: Nonmissing nonmale Y chromosome genotype(s) present; many commands
treat these as missing.

Total genotyping rate is 0.987229.
465065 variants and 779 people pass filters and QC.
Among remaining phenotypes, 241 are cases and 527 are controls.  (11 phenotypes
are missing.)
--check-sex: 7949 Xchr and 0 Ychr variant(s) scanned, 365 problems detected.
Report written to all.snp.filtered_sex_pheno.sexcheck

Christopher Chang

unread,
Oct 31, 2017, 2:41:01 AM10/31/17
to plink2-users
This run had the default 0.2/0.8 thresholds; does the more generous 0.35/0.65 help?

If not, well, the simplest explanation is that there really is a sample ID and/or gender mixup here that needs to be tracked down.

anita...@gmail.com

unread,
Nov 13, 2017, 9:41:02 AM11/13/17
to plink2-users
Hi Christopher,

Thanks for that. The problem was with GATK4beta5 it had a bug that mixed samples ID. The bug is sorted in GATK4beta and the results looks much better 60 samples are problematic.
I have another question for sex-check do you recommend to use SNPs only? with SNPs only I have 60 PROBLEMS but with SNPs and INDELs 105 PROBLEMS.

Thanks


On Tuesday, October 31, 2017 at 6:41:01 AM UTC, Christopher Chang wrote:
Reply all
Reply to author
Forward
0 new messages