Dinh 2011/NOTES/2011-9-29: Difference between revisions

From ZhangLabWiki
Jump to navigation Jump to search
>Dinh
mNo edit summary
>Dinh
mNo edit summary
Line 13: Line 13:
'''Wrote script to lift over snp's RS values to hg19 positions'''
'''Wrote script to lift over snp's RS values to hg19 positions'''
  [[File:liftOverRSvalues.txt]]
  [[File:liftOverRSvalues.txt]]
After using liftover, I found that there were multiple occurrences of the same SNPs in snp132.txt file.
wc -l
PennAfrican_Batch1_genotypes_hg19.tped = 1109770 SNPs
PennAfrican_Batch1_genotypes.tped = 1083730 SNPs
So I did sort -u on PennAfrican_Batch1_genotypes_hg19.tped, but got the same number of SNPs. I decided to use this file without filtering out multiple SNPs.


Divided high variance methylation matrix (77563 CpGs) to 16 groups:
Divided high variance methylation matrix (77563 CpGs) to 16 groups:
Line 65: Line 72:
  2524  cat header.txt no_75001_77573/methylMat.txt > tmp
  2524  cat header.txt no_75001_77573/methylMat.txt > tmp
  2525  mv tmp no_75001_77573/methylMat.txt
  2525  mv tmp no_75001_77573/methylMat.txt
In each folder:
../mQTL_2MB_plink.pl ../PennAfrican_Batch1_genotypes_hg19 methylMat.txt > results.txt &
[[File:mQTL_2MB_plink.txt]]

Revision as of 01:46, 4 October 2011

Penn African mQTL

./mQTL_2MB_plink.pl ../PennAfrican_Batch1_genotypes ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt > results.txt &

Divided high variance methylation matrix (77563 CpGs) to 8 groups:

2176  head -30000 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -10000 > no_20001_30000/UPenn46_hg19_methylMatrix_filtered_20001-30000.txt
2179  head -40000 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -10000 > no_30001_40000/UPenn46_hg19_methylMatrix_filtered_30001-40000.txt
2180  head -50000 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -10000 > no_40001_50000/UPenn46_hg19_methylMatrix_filtered_40001-50000.txt
2181  head -60000 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -10000 > no_50001_60000/UPenn46_hg19_methylMatrix_filtered_50001-60000.txt
2182  head -70000 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -10000 > no_60001_70000/UPenn46_hg19_methylMatrix_filtered_60001-70000.txt
2183  tail -7573 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt > no_70001_77573/UPenn46_hg19_methylMatrix_filtered_70001-77573.txt

I found out that the PennAfrican_Batch1_genotypes file has SNP positions in build 36.3 and not in build 37.1 Wrote script to lift over snp's RS values to hg19 positions

File:LiftOverRSvalues.txt

After using liftover, I found that there were multiple occurrences of the same SNPs in snp132.txt file.

wc -l 
PennAfrican_Batch1_genotypes_hg19.tped = 1109770 SNPs
PennAfrican_Batch1_genotypes.tped = 1083730 SNPs

So I did sort -u on PennAfrican_Batch1_genotypes_hg19.tped, but got the same number of SNPs. I decided to use this file without filtering out multiple SNPs.

Divided high variance methylation matrix (77563 CpGs) to 16 groups:

2472  head -5001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt > no_1_5000/methylMat.txt
2473  head -10001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -5000 > no_5001_10000/methylMat.txt
2474  head -15001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -5000 > no_10001_15000/methylMat.txt
2475  head -20001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -5000 > no_15001_20000/methylMat.txt
2476  head -25001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -5000 > no_20001_25000/methylMat.txt
2477  head -30001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -5000 > no_25001_30000/methylMat.txt
2478  head -35001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -5000 > no_30001_35000/methylMat.txt
2479  head -40001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -5000 > no_35001_40000/methylMat.txt
2480  head -45001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -5000 > no_40001_45000/methylMat.txt
2481  head -50001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -5000 > no_45001_50000/methylMat.txt
2482  head -55001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -5000 > no_50001_55000/methylMat.txt
2483  head -60001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -5000 > no_55001_60000/methylMat.txt
2484  head -65001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -5000 > no_60001_65000/methylMat.txt
2485  head -70001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -5000 > no_65001_70000/methylMat.txt
2486  head -75001 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt | tail -5000 > no_70001_75000/methylMat.txt
2487  tail -2575 ../UPenn46_hg19_Data/UPenn46_hg19_methylMatrix_filtered.txt > no_75001_77573/methylMat.txt

Added headers:

2491  cat header.txt no_1_5000/methylMat.txt > tmp
2492  mv tmp no_1_5000/methylMat.txt 
2494  cat header.txt no_5001_10000/methylMat.txt > tmp
2495  mv tmp no_5001_10000/methylMat.txt 
2497  cat header.txt no_10001_20000/methylMat.txt > tmp
2498  mv tmp no_10001_15000/methylMat.txt 
2500  cat header.txt no_15001_20000/methylMat.txt > tmp
2501  mv tmp no_15001_20000/methylMat.txt 
2502  cat header.txt no_20001_25000/methylMat.txt > tmp
2503  mv tmp no_20001_25000/methylMat.txt 
2504  cat header.txt no_25001_30000/methylMat.txt > tmp
2505  mv tmp no_25001_30000/methylMat.txt 
2506  cat header.txt no_30001_35000/methylMat.txt > tmp
2507  mv tmp no_30001_35000/methylMat.txt 
2508  cat header.txt no_35001_40000/methylMat.txt > tmp
2509  mv tmp no_35001_40000/methylMat.txt 
2510  cat header.txt no_40001_45000/methylMat.txt > tmp
2511  mv tmp no_40001_45000/methylMat.txt 
2512  cat header.txt no_45001_50000/methylMat.txt > tmp
2513  mv tmp no_45001_50000/methylMat.txt 
2514  cat header.txt no_50001_55000/methylMat.txt > tmp
2515  mv tmp no_50001_55000/methylMat.txt 
2516  cat header.txt no_55001_60000/methylMat.txt > tmp
2517  mv tmp no_55001_60000/methylMat.txt 
2518  cat header.txt no_60001_65000/methylMat.txt > tmp
2519  mv tmp no_60001_65000/methylMat.txt 
2520  cat header.txt no_65001_70000/methylMat.txt > tmp
2521  mv tmp no_65001_70000/methylMat.txt 
2522  cat header.txt no_70001_75000/methylMat.txt > tmp
2523  mv tmp no_70001_75000/methylMat.txt 
2524  cat header.txt no_75001_77573/methylMat.txt > tmp
2525  mv tmp no_75001_77573/methylMat.txt
In each folder:
../mQTL_2MB_plink.pl ../PennAfrican_Batch1_genotypes_hg19 methylMat.txt > results.txt &
File:MQTL 2MB plink.txt