Sample Header Ad - 728x90

subset my .fam file using a .txt file of names

2 votes
1 answer
39 views
I have a .fam file in plink format, looks like this 1 I001.HO 0 0 1 1 2 I002.HO 0 0 1 1 3 IREJ-T006.HO 0 0 1 1 4 IREJ-T009.HO 0 0 1 1 5 IREJ-T022.HO 0 0 1 1 6 IREJ-T023.HO 0 0 1 1 7 IREJ-T026.HO 0 0 1 1 8 IREJ-T027.HO 0 0 1 1 9 IREJ-T037.HO 0 0 1 1 10 IREJ-T040.HO 0 0 1 1 11 IREJ-T053.HO 0 0 1 1 12 IREJ-T064.HO 0 0 1 1 13 IREJ-T078.HO 0 0 1 1 14 IREJ-T090.HO 0 0 1 1 15 IREJ-T101.HO 0 0 1 1 16 IREJ-T103.HO 0 0 1 1 17 IREJ-T111.HO 0 0 1 1 18 IREJ-T184.HO 0 0 1 1 19 IREJ-T204.HO 0 0 1 1 20 MAL-005.HO 0 0 1 1 21 MAL-009.HO 0 0 1 1 but with thousands of lines. But I only want a subset of these rows in my final data file. I have a .txt file of each individual I want to keep. So looks like IREJ-T184.HO IREJ-T204.HO MAL-005.HO MAL-009.HO How can I use this .txt file to make a new file with only the rows that include those individuals listed in the .txt file? I want to keep all data in the row, not just the ID name. Thanks!
Asked by Savannah Hay (23 rep)
Oct 29, 2024, 10:17 PM
Last activity: Oct 29, 2024, 11:48 PM