How to combine txt file to convert in Plink format
0
0
Entering edit mode
7.1 years ago
bha ▴ 80

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 • 3.2k views
ADD COMMENT
0
Entering edit mode

please post expected output.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Hello bha!

It appears that your post has been cross-posted to another site: https://stackoverflow.com/questions/47225587/

This is typically not recommended as it runs the risk of annoying people in both communities.

ADD REPLY

Login before adding your answer.

Traffic: 1672 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