Entering edit mode
9.7 years ago
MAPK
★
2.1k
Hi everyone,
I have this dataframe below(df1). I want to first match rs44444 in mafid and then 0/1 and 1/1 across all the genotypes (GT) samples (,GT1:GT4). and extract only the matching row and columns that has this result:
result
mafid GT.2 GT.3 GT.4
rs44444 1/1 0/1 0/1
df1
mafid GT.1 GT.2 GT.3 GT.4
rs44444 0/0 1/1 0/1 0/1
NA
rs44554 0/1 1/1 0/1 0/0
Thank you