This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to combine txt file to convert in Plink format

My 26 data files (.txt) (imputed genotypes for each chromosome) look like:

CHR SNP1 SNP2 SNP3
1   3   1   2   3 
1   3   0   2   1
1   0   0   1   0
1   0   3   3   1
1   1   1   0   2

CHR SNP1 SNP2 SNP3
2   1   1   2   2 
2   0   3   1   1
2   0   0   1   0
2   0   3   3   2
2   3   2   0   1

How I can convert them in plink format (.map and .ped)?

r snp

please post expected output.

ID SNP1 SNP2 SNP3

17 3 1 2 3

25 3 0 2 1

29 0 0 1 0

99 0 3 3 1

81 1 1 0 2

similarly other 25 files for chromosome 2,3,.....26.

Hi bha, I have edited your post to make it more legible. When you're posting code or output from a command or file, make use of the 'Code Sample' button (the one with 101 010). Highlight the text and then click the button.

0 answers

No answers yet.

Log in to answer this question.