Open samarth8392 opened 1 year ago
I forgot to mention, the 0/1
vs 0|1
issue is captured if I run extract.gt() with return.alleles = F
sca0947 sca0949 sca0950 sca0951 sca1113 sca1115 sca1117
Scate-ma1_67509 "0/0" "0/0" "0/0" "0/0" "0/0" "0/0" "0/0"
Scate-ma1_67559 "0/0" "0/0" "0/0" "0/0" "0/0" "0/0" "0/0"
Scate-ma1_219664 "0/0" "0/0" "0/0" "0/0" "0/0" "0/0" "0/0"
Scate-ma1_1152241 "0|1" "0|1" "0|1" "0|1" "0|1" "0|1" "0|1"
Scate-ma1_1152242 "0|1" "0|1" "0|1" "0|1" "0|1" "0|1" "0|1"
Scate-ma1_1311761 "0/0" "0/0" "0/0" "0/0" "0/0" "0/0" "0/0"
sca1120
Scate-ma1_67509 "0/0"
Scate-ma1_67559 "0/0"
Scate-ma1_219664 "0/0"
Scate-ma1_1152241 "0|1"
Scate-ma1_1152242 "0|1"
Scate-ma1_1311761 "0/0"
Hi, I have a vcf file that I read using vcfR
and then I used extract.gt() with return.alleles = T
del.gt <- extract.gt(vcf, element = "GT",return.alleles = T)
and I get:
HOWEVER, if I use extract.gt() with as.numeric = TRUE
del.gt <- extract.gt(vcf, element = "GT",as.numeric = TRUE)
I get:
As you can clearly see, at SNP Scate-ma1_1152241, all individuals are heterozygotes, but the numeric value is 0 for all of them. The only reason I could think of for this discrepancy is some genotypes are Ref/Alt while others are Ref|Alt
Do you think there's an issue with 0/1 or 0|1 notation for genotypes that's causing extract.gt() to miss heterozygotes or am I doing something wrong here?
Any help figuring this out would be appreciated.
Thanks, Samarth