Hello,
I am trying to subset individuals from an imputed vcf file, but the resulting vcf has altered chr and position. For example, in chr 1, the chr changes to chr 5 part way through the file, then to ":"+pos further down, causing the pos to change to the snp id. There are no errors, but I discovered the issue when tabix failed. If there is anything I can do to correct this, any advice would be appreciated.
Example commands:
plink2 --vcf original_chr1_dose.vcf.gz dosage=DS \ #### original imputed vcf file
--keep keep_IDs.txt \ #### File with list of IIDs contained in vcf for subsetting
--export vcf vcf-dosage=DS-force bgz \ #### output in bgzipped vcf format retaining dosage
--out subset_chr1_dose #### output prefix
Example switch in chr/pos map:
gunzip -cd subset_dose.vcf.gz | cut -f 1-3 > chr1_chr_pos_subset.txt
##fileformat=VCFv4.3
##fileDate=20200526
##source=PLINKv2.00
## rest of header not posted
#CHROM POS ID
1 13305 chr1:13305:T:C
1 15778 chr1:15778:G:A
...
1 976639 chr1:976639:C:A
1 976655 chr1:976655:G:A
1 976669 chr1:976669:T:C
5 976671 chr1:976671:G:A
5 976675 chr1:976675:C:T
...
5 119885467 chr1:119885467:C:T
5 119885474 chr1:119885474:A:T
:0119885518 chr1:119885518:C:A C
:0119885527 chr1:119885527:T:C T
:0119885543 chr1:119885543:C:T C