Entering edit mode
7.1 years ago
waqasnayab
▴
250
Hi,
I have a VCF file. If any of the sample has genotype 0/1 and 1/1, than the sample ID of such genotype should be pasted into the ID column like (I am just putting here ID and sample column):
ID sample1 sample2 sample3
rs123456 0/0 0/1 0/1
rs789101 1/1 0/0 0/1
rs11213145 0/0 1/1 0/0
My desired output would be:
ID sample1 sample2 sample3
rs123456:sample2:sample3 0/0 0/1 0/1
rs789101:sample1:sample3 1/1 0/0 0/1
rs11213145:sample2 0/0 1/1 0/0
Any awk or sed would be helpful, searches available to copy the contents of the column to the desired column but not for header (as header here is sample1 etc)
Thanks,
Waqas.
YES, Pierre, it worked for me, although just cross-checking a bit, will further confirm this command...,,,!!!!!