Hi
Below is the data which consist of IDs (SLEGEN1, 2 and 3) and their respective observations (ie. 4 2 2 2 1 1 1 4 4…etc for the first ID and such. The observations are arranged horizontally and continued in the next row until the end)
/* data */
SLEGEN1 4 2 2 2 1 1 4 4 3 3 1 1 1 1 1 3 2 2 3 3 2 2 4 4 1 1 4 4 1 1 2 2 2 2 1 1 4 4 2 2 2 2 1 1 2 2 2 2 4 4 1 2 4 2 3 3 4 4 1 3 4 4 2 2 4 2 2 2 0 0 3 3 4 2 4 2 3 3 4 4 2 2 4 2 1 3 4 4 4 2 1 1 4 4 3 3 2 2 1 2 2 2 3 3 2 2 1 3 4
SLEGEN2 0 0 2 2 1 1 4 4 3 3 1 1 1 3 1 3 2 2 3 3 4 2 4 2 1 1 4 4 1 1 2 2 2 2 1 1 4 4 2 2 4 2 1 1 2 2 4 2 4 2 1 2 4 2 3 3 4 4 1 3 4 2 1 2 4 4 4 2 2 2 1 3 2 2 2 2 1 3 4 3 4 2 4 4 1 3 4 4 4 2 1 3 4 3 3 3 4 4 2 2 2 2 1 3 2 2 3 3 3
SLEGEN3 4 4 2 2 1 1 4 4 0 0 1 1 1 1 1 1 2 2 1 3 4 2 4 4 3 3 4 4 3 3 2 2 4 4 1 1 4 4 4 4 2 2 1 1 2 2 2 2 4 2 1 2 4 2 3 3 4 4 3 3 2 2 1 1 4 2 4 2 1 2 3 3 4 2 4 2 3 3 4 4 2 2 4 2 1 1 4 4 4 4 1 1 3 3 3 3 4 4 2 2 2 2 1 1 2 2 3 3 3
Now I need to combined the observations such that 4 2 2 2 1 1 1 4 4..etc will become 4 2 as one observation, 2 2 as another observation. Like 1st and 2nd , 3rd and 4th , 5th and 6th ..etc.
Next is to assess the observations, for example if the observation is 4 2, give it a ‘1’. If it is 2 2, then give it a ‘2’. , 1 3 -> '1'
I managed to read in the data by the data step as follow but I still couldnt combine the observation as mentioned above.
options ps=80 ls=66 nonumber nodate;
data chr22;
infile c dlm='' lrecl=32764;
input ID $ @;
DO i=1 to 11010;
input allele @;
output;
end;
run;
Appreciate if some experts could help!
Thanks =]
J
Below is the data which consist of IDs (SLEGEN1, 2 and 3) and their respective observations (ie. 4 2 2 2 1 1 1 4 4…etc for the first ID and such. The observations are arranged horizontally and continued in the next row until the end)
/* data */
SLEGEN1 4 2 2 2 1 1 4 4 3 3 1 1 1 1 1 3 2 2 3 3 2 2 4 4 1 1 4 4 1 1 2 2 2 2 1 1 4 4 2 2 2 2 1 1 2 2 2 2 4 4 1 2 4 2 3 3 4 4 1 3 4 4 2 2 4 2 2 2 0 0 3 3 4 2 4 2 3 3 4 4 2 2 4 2 1 3 4 4 4 2 1 1 4 4 3 3 2 2 1 2 2 2 3 3 2 2 1 3 4
SLEGEN2 0 0 2 2 1 1 4 4 3 3 1 1 1 3 1 3 2 2 3 3 4 2 4 2 1 1 4 4 1 1 2 2 2 2 1 1 4 4 2 2 4 2 1 1 2 2 4 2 4 2 1 2 4 2 3 3 4 4 1 3 4 2 1 2 4 4 4 2 2 2 1 3 2 2 2 2 1 3 4 3 4 2 4 4 1 3 4 4 4 2 1 3 4 3 3 3 4 4 2 2 2 2 1 3 2 2 3 3 3
SLEGEN3 4 4 2 2 1 1 4 4 0 0 1 1 1 1 1 1 2 2 1 3 4 2 4 4 3 3 4 4 3 3 2 2 4 4 1 1 4 4 4 4 2 2 1 1 2 2 2 2 4 2 1 2 4 2 3 3 4 4 3 3 2 2 1 1 4 2 4 2 1 2 3 3 4 2 4 2 3 3 4 4 2 2 4 2 1 1 4 4 4 4 1 1 3 3 3 3 4 4 2 2 2 2 1 1 2 2 3 3 3
Now I need to combined the observations such that 4 2 2 2 1 1 1 4 4..etc will become 4 2 as one observation, 2 2 as another observation. Like 1st and 2nd , 3rd and 4th , 5th and 6th ..etc.
Next is to assess the observations, for example if the observation is 4 2, give it a ‘1’. If it is 2 2, then give it a ‘2’. , 1 3 -> '1'
I managed to read in the data by the data step as follow but I still couldnt combine the observation as mentioned above.
options ps=80 ls=66 nonumber nodate;
data chr22;
infile c dlm='' lrecl=32764;
input ID $ @;
DO i=1 to 11010;
input allele @;
output;
end;
run;
Appreciate if some experts could help!
Thanks =]
J