|
|
沙发

楼主 |
发表于 2009-10-28 16:43:29
|
只看该作者
Re: 真诚求助:hapmap下载的文件导入到sas中的问题
[code:2g2ikd6z]data snps haplos;
infile 'd:\temp091028.txt' truncover lrecl=400;
input text $1-400;
if substr(text,1,4)='- rs' then
do;
text=scan(text,1,"- :");
output snps;
end;
else if substr(text,1,4)='- NA' then
do;
text=scan(text,1,"- _:")||'->'||scan(text,1,"- _:")
||tranwrd(scan(text,2,"- _:"),'c',' HAPLO')
||scan(text,3,"- _:");
output haplos;
end;
run;
data _null_;
set snps;
file 'd:\snps.txt';
put text;
run;
data _null_;
set haplos;
file 'd:\haplos.txt' lrecl=400;
put text;
run;[/code:2g2ikd6z] |
|