Changes

From Genome Analysis Wiki
Jump to navigationJump to search
3 bytes removed ,  16:13, 24 May 2010
Line 138: Line 138:  
1. For HapMapII format, download haplotypes from http://www.sph.umich.edu/csg/ylwtx/HapMapForMach.tgz
 
1. For HapMapII format, download haplotypes from http://www.sph.umich.edu/csg/ylwtx/HapMapForMach.tgz
 
2. For MACH format, you can do the following:  
 
2. 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 whitespace):  
+
* Finally (assuming the third field contains the actual haplotypes, where alleles are separated by whitespace):  
 
   awk '{print $3}' orig.hap | cut -c${first}-${last} > region.hap
 
   awk '{print $3}' orig.hap | cut -c${first}-${last} > region.hap
  

Navigation menu