Changes

From Genome Analysis Wiki
Jump to navigationJump to search
10 bytes removed ,  15:09, 30 April 2010
no edit summary
Line 97: Line 97:     
Q: How do I get reference files for an region of interest? <br>
 
Q: How do I get reference files for an region of interest? <br>
A: For HapMapII format, download http://www.sph.umich.edu/csg/ylwtx/HapMapForMach.tgz
+
A: For HapMapII format, download http://www.sph.umich.edu/csg/ylwtx/HapMapForMach.tgz <br>
  For MACH format, you can do the following:
+
For MACH format, you can do the following:
 
First, find the first and last SNP in the region you are interested in. Say "rsFIRST" and "rsLAST", defined according to position.
 
First, find the first and last SNP in the region you are interested in. Say "rsFIRST" and "rsLAST", defined according to position.
    
Then:  
 
Then:  
        @ first = `grep -n rsFIRST orig.snps | cut -f1 -d ':'`
+
  @ first = `grep -n rsFIRST orig.snps | cut -f1 -d ':'`
        @ last = `grep -n rsLAST orig.snps | cut -f1 -d ':'`
+
  @ last = `grep -n rsLAST orig.snps | cut -f1 -d ':'`
    
Finally (assuming the third field contains the actual haplotypes, where alleles are separated by nothing):
 
Finally (assuming the third field contains the actual haplotypes, where alleles are separated by nothing):
   −
awk '{print $3}' orig.hap | cut -c${first}-${last} > region.hap
+
  awk '{print $3}' orig.hap | cut -c${first}-${last} > region.hap
    
== Examples ==
 
== Examples ==
212

edits

Navigation menu