setting genotypes to missing
1
0
Entering edit mode
3.4 years ago
raalsuwaidi ▴ 100

is there a tool to set a selection of genotypes to missing? that is replace the values by

like for example, this section of the VCF file, can i select a set of different POS and IDs and change the genotype values to . ?

chr5    97306635    rs112129873 A   AT  352.31  PASS    AC=0;AF=0.004167;AN=32;BaseQRankSum=-0.184;ClippingRankSum=0;DP=3230;ExcessHet=3.0103;FS=0;InbreedingCoeff=-0.0043;MLEAC=1;MLEAF=0.004167;MQ=60;MQRankSum=0;QD=19.57;ReadPosRankSum=1.13;SOR=0.387;VQSLOD=16.37;culprit=MQ;ASP;CAF=0.9994,0.000599;COMMON=1;GNO;KGPhase3;RS=112129873;RSPOS=97306635;SAO=0;SLO;SSR=0;TOPMED=0.99976904943934760,0.00023095056065239;VC=DIV;VP=0x050100000005000126000200;WGT=1;dbSNPBuildID=132;INS;VARTYPE=INS;EFF=INTERGENIC(MODIFIER||||||||)    GT:AD:DP:GQ:PL  0/0:36,0:36:94:0,94,1127    0/0:31,0:31:84:0,84,1260    0/0:25,0:25:60:0,60,900 0/0:27,0:27:63:0,63,945 0/0:38,0:38:99:0,99,1204    ./.:0,0:0:.:0,0,0   ./.:0,0:0:.:0,0,0   0/0:31,0:31:90:0,90,1350    0/0:27,0:27:70:0,70,897 ./.:0,0:0:.:0,0,0   0/0:20,0:20:60:0,60,644 0/0:23,0:23:60:0,60,900 ./.:0,0:0:.:0,0,0   0/0:19,0:19:51:0,51,765 0/0:24,0:24:72:0,72,776 0/0:31,0:31:90:0,90,1350    0/0:23,0:23:60:0,60,751 0/0:34,0:34:90:0,90,1350    0/0:18,0:18:51:0,51,7650/0:21,0:21:57:0,57,855
genotype vcf impute • 1.6k views
ADD COMMENT
0
Entering edit mode

same as missing REF and ALT in vcf . Please edit your first question instead of asking a new one.

ADD REPLY
0
Entering edit mode

when you look at the first question, it is clear that i still didnt get an answer. i thought maybe the question was in the wrong way, so i am writing it in another way. can you please help in answering it?

ADD REPLY
4
Entering edit mode
3.4 years ago
atorreso ▴ 130

You can use one of bcftools plugins.

For the example you gave:

bcftools +setGT input.vcf.gz -- -t q -i 'ID="rs112129873"' -n "./."

or

bcftools +setGT input.vcf.gz -- -t q -i 'POS=97306635' -n "./."

should do the job.

ADD COMMENT
0
Entering edit mode

thank you sooooo much

ADD REPLY

Login before adding your answer.

Traffic: 1739 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6