[Show all top banners]

beta
Replies to this thread:

More by beta
What people are reading
Subscribers
:: Subscribe
Back to: Computer/IT Refresh page to view new replies
 Request help for SAS programmer
[VIEWED 6080 TIMES]
SAVE! for ease of future access.
Posted on 01-03-14 1:15 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I have a bunch of text files to restructure for analysis in PLINK. Any SAS programmers in Sajha who can help to resolve this. To make this simple I have copied first 4 rows from 3 files and showed in the last 3 rows that the file I want to create. Please let me know if somebody is willing t help on this problem. I can e-mail the files. Thanks!!!!!

 

Filename: FileReport1.txt

#Source file: FinalReport1.csv

 

#Column header: SNP_id allele1_Forward allele2_Forward GenCall_score intensity1 intensity2

200006 T C 0.8190 1.253 1.110

200052 T T 0.9526 0.021 0.928

Filename: FileReport42.txt

#Source file: FinalReport42.csv

#Column header: SNP_id allele1_Forward allele2_Forward GenCall_score intensity1 intensity2

200006 T C 0.8190 1.049 1.004

200052 T T 0.9526 0.019 0.928

Filename: FileReport53.txt

#Source file: FinalReport53.csv

#Column header: SNP_id allele1_Forward allele2_Forward GenCall_score intensity1 intensity2

200006 C C 0.8190 0.043 1.637

200052 A T 0.9526 0.690 0.691

 

Restructured data into a file like below:

SNP_id A1_1 A2_1 A1_42 A2_42 A1_53 A2_53

200006 T C T C C C

200052 T T T T A T


 
Posted on 01-03-14 3:10 PM     [Snapshot: 53]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Import the table from the CSV or txt file and create the following three tables.
test1 a,
     test42b,
     test53 c

and then join it.

Hope this one works.
PROC SQL;

create table test as

select

 a.SNP_id
,a.allele1_Forward as a1_1
,a.allele2_Forward as a2_1
,b.allele1_Forward as a1_42
,b.allele2_Forward as a2_42
,c.allele1_Forward as a1_53
,c.allele2_Forward as a2_53

from test1 a,
     test42b,
     test53 c

where a.snp_id=b.snp_id and b.snp_id=c.snp_id;
quit;

proc print data=test;
run;


 
Posted on 01-03-14 3:25 PM     [Snapshot: 60]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

You can use PROC SQL
or rename each variables in the dataset.

For example: 
for data one (rename =allele1_Forward =A1_1  allele2_Forward= A1_42.........)
For data two (rename = allele1_Forward = A2_1 allele2_Forward = A2_43 ......)
do the same thing for data three

Then at the end, Merge 3 dataset by SNP_ID

Hope that helps.

 
Posted on 01-04-14 9:37 AM     [Snapshot: 208]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Nothing against sas, do you use R? I personnally prefer R for data manipulation and graphs
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 365 days
Recommended Popular Threads Controvertial Threads
Lets play Antakshari...........
डीभी परेन भने खुसि हुनु होस् ! अमेरिकामाधेरै का श्रीमती अर्कैसँग पोइला गएका छन् !
शीर्षक जे पनि हुन सक्छ।
What are your first memories of when Nepal Television Began?
[New post] Why Would Krishna Have To Run From The Battlefield
Sajha Poll: नेपालका सबैभन्दा आकर्षक महिला को हुन्?
ChatSansar.com Naya Nepal Chat
is Rato Bangala school cheating?
Why always Miss Nepal winner is Newari??
NRN card pros and cons?
Basnet or Basnyat ??
पुलिसनी संग - आज शनिवार - अन्तिम भाग
निगुरो थाहा छ ??
Nas and The Bokas: Coming to a Night Club near you
श्राद्द
सेक्सी कविता - पार्ट २
TPS Re-registration
What Happened to Dual Citizenship Bill
पाप न साप घोप्टो पारि थाप !!
अमेरिकामा छोरा हराएको सूचना
Nas and The Bokas: Coming to a Night Club near you
राजदरबार हत्या काण्ड बारे....
Mr. Dipak Gyawali-ji Talk is Cheap. US sends $ 200 million to Nepal every year.
Harvard Nepali Students Association Blame Israel for hamas terrorist attacks
TPS Update : Jajarkot earthquake
is Rato Bangala school cheating?
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters