/projects/ps-jcvi2/schork-lab/tools/plink-1.07-x86_64/plink --noweb /projects/ps-jcvi2/schork-lab/tools/admixture_linux-1.3.0/admixture
/projects/ps-yeolab/biom262_2016/data
export PATH="/projects/ps-jcvi2/schork-lab/tools/plink-1.07-x86_64:$PATH"
export PATH="/projects/ps-yeolab/biom262_2016/tools/admixture:$PATH"
%%bash
wget "http://pngu.mgh.harvard.edu/~purcell/plink/dist/plink-1.07-x86_64.zip"
--2016-02-23 15:19:09-- http://pngu.mgh.harvard.edu/~purcell/plink/dist/plink-1.07-x86_64.zip Resolving pngu.mgh.harvard.edu... 155.52.206.11 Connecting to pngu.mgh.harvard.edu|155.52.206.11|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 3971138 (3.8M) [application/zip] Saving to: ‘plink-1.07-x86_64.zip’ 0K .......... .......... .......... .......... .......... 1% 110K 35s 50K .......... .......... .......... .......... .......... 2% 521K 21s 100K .......... .......... .......... .......... .......... 3% 522K 16s 150K .......... .......... .......... .......... .......... 5% 558K 14s 200K .......... .......... .......... .......... .......... 6% 512K 12s 250K .......... .......... .......... .......... .......... 7% 28.1M 10s 300K .......... .......... .......... .......... .......... 9% 510K 9s 350K .......... .......... .......... .......... .......... 10% 8.26M 8s 400K .......... .......... .......... .......... .......... 11% 527K 8s 450K .......... .......... .......... .......... .......... 12% 6.15M 7s 500K .......... .......... .......... .......... .......... 14% 33.8M 6s 550K .......... .......... .......... .......... .......... 15% 526K 6s 600K .......... .......... .......... .......... .......... 16% 8.27M 6s 650K .......... .......... .......... .......... .......... 18% 9.21M 5s 700K .......... .......... .......... .......... .......... 19% 530K 5s 750K .......... .......... .......... .......... .......... 20% 624K 5s 800K .......... .......... .......... .......... .......... 21% 3.74M 5s 850K .......... .......... .......... .......... .......... 23% 618K 5s 900K .......... .......... .......... .......... .......... 24% 3.04M 4s 950K .......... .......... .......... .......... .......... 25% 11.5M 4s 1000K .......... .......... .......... .......... .......... 27% 653K 4s 1050K .......... .......... .......... .......... .......... 28% 2.73M 4s 1100K .......... .......... .......... .......... .......... 29% 10.8M 4s 1150K .......... .......... .......... .......... .......... 30% 675K 4s 1200K .......... .......... .......... .......... .......... 32% 2.32M 3s 1250K .......... .......... .......... .......... .......... 33% 13.9M 3s 1300K .......... .......... .......... .......... .......... 34% 10.3M 3s 1350K .......... .......... .......... .......... .......... 36% 601K 3s 1400K .......... .......... .......... .......... .......... 37% 4.03M 3s 1450K .......... .......... .......... .......... .......... 38% 12.5M 3s 1500K .......... .......... .......... .......... .......... 39% 11.4M 3s 1550K .......... .......... .......... .......... .......... 41% 535K 3s 1600K .......... .......... .......... .......... .......... 42% 12.5M 2s 1650K .......... .......... .......... .......... .......... 43% 553K 2s 1700K .......... .......... .......... .......... .......... 45% 12.4M 2s 1750K .......... .......... .......... .......... .......... 46% 10.7M 2s 1800K .......... .......... .......... .......... .......... 47% 10.1M 2s 1850K .......... .......... .......... .......... .......... 48% 11.6M 2s 1900K .......... .......... .......... .......... .......... 50% 551K 2s 1950K .......... .......... .......... .......... .......... 51% 12.0M 2s 2000K .......... .......... .......... .......... .......... 52% 10.4M 2s 2050K .......... .......... .......... .......... .......... 54% 603K 2s 2100K .......... .......... .......... .......... .......... 55% 4.48M 2s 2150K .......... .......... .......... .......... .......... 56% 9.36M 2s 2200K .......... .......... .......... .......... .......... 58% 11.3M 2s 2250K .......... .......... .......... .......... .......... 59% 679K 2s 2300K .......... .......... .......... .......... .......... 60% 9.51M 1s 2350K .......... .......... .......... .......... .......... 61% 2.42M 1s 2400K .......... .......... .......... .......... .......... 63% 13.7M 1s 2450K .......... .......... .......... .......... .......... 64% 10.2M 1s 2500K .......... .......... .......... .......... .......... 65% 11.7M 1s 2550K .......... .......... .......... .......... .......... 67% 781K 1s 2600K .......... .......... .......... .......... .......... 68% 1.59M 1s 2650K .......... .......... .......... .......... .......... 69% 10.1M 1s 2700K .......... .......... .......... .......... .......... 70% 8.53M 1s 2750K .......... .......... .......... .......... .......... 72% 566K 1s 2800K .......... .......... .......... .......... .......... 73% 12.0M 1s 2850K .......... .......... .......... .......... .......... 74% 10.5M 1s 2900K .......... .......... .......... .......... .......... 76% 13.2M 1s 2950K .......... .......... .......... .......... .......... 77% 550K 1s 3000K .......... .......... .......... .......... .......... 78% 11.8M 1s 3050K .......... .......... .......... .......... .......... 79% 11.7M 1s 3100K .......... .......... .......... .......... .......... 81% 9.25M 1s 3150K .......... .......... .......... .......... .......... 82% 13.2M 1s 3200K .......... .......... .......... .......... .......... 83% 523K 1s 3250K .......... .......... .......... .......... .......... 85% 9.19M 0s 3300K .......... .......... .......... .......... .......... 86% 12.7M 0s 3350K .......... .......... .......... .......... .......... 87% 7.75M 0s 3400K .......... .......... .......... .......... .......... 88% 13.9M 0s 3450K .......... .......... .......... .......... .......... 90% 14.5M 0s 3500K .......... .......... .......... .......... .......... 91% 520K 0s 3550K .......... .......... .......... .......... .......... 92% 11.1M 0s 3600K .......... .......... .......... .......... .......... 94% 546K 0s 3650K .......... .......... .......... .......... .......... 95% 8.92M 0s 3700K .......... .......... .......... .......... .......... 96% 565K 0s 3750K .......... .......... .......... .......... .......... 97% 15.0M 0s 3800K .......... .......... .......... .......... .......... 99% 10.2M 0s 3850K .......... .......... ........ 100% 8.08M=3.0s 2016-02-23 15:19:12 (1.26 MB/s) - ‘plink-1.07-x86_64.zip’ saved [3971138/3971138]
%%bash
unzip -o plink-1.07-x86_64.zip
Archive: plink-1.07-x86_64.zip creating: plink-1.07-x86_64/ inflating: plink-1.07-x86_64/plink inflating: plink-1.07-x86_64/COPYING.txt inflating: plink-1.07-x86_64/test.map inflating: plink-1.07-x86_64/test.ped inflating: plink-1.07-x86_64/gPLINK.jar inflating: plink-1.07-x86_64/README.txt
%%bash
#inspect files
#extract random 0.1% of SNPs
export pwd=`pwd`
$pwd/plink-1.07-x86_64/plink --noweb --bfile hapmap3 --thin 0.00001 --recode --out hapmap3_thin
bash: line 6: /Users/apple/Desktop/BIOM262/plink-1.07-x86_64/plink: cannot execute binary file
%%bash
#extract SNPs on chr 21 and recode
export pwd=`pwd`
$pwd/plink-1.07-x86_64/plink --noweb --bfile hapmap3 --chr 21 --make-bed --out hapmap3_chr21
bash: line 3: /plink-1.07-x86_64/plink: No such file or directory
%%bash
#prune for LD
export pwd=`pwd`
$pwd/plink-1.07-x86_64/plink --noweb --file hapmap3_thin --indep-pairwise 50 5 0.1
$pwd/plink-1.07-x86_64/plink --noweb --file hapmap3_thin --extract plink.prune.in --make-bed --out hapmap3_thin_pruned
$pwd/plink-1.07-x86_64/plink --noweb --bfile hapmap3_chr21 --indep-pairwise 50 5 0.1
$pwd/plink-1.07-x86_64/plink --noweb --bfile hapmap3_chr21 --extract plink.prune.in --make-bed --out hapmap3_chr21_pruned
$pwd/plink-1.07-x86_64/plink --noweb --bfile hapmap3/hapmap3 --indep-pairwise 50 5 0.1
$pwd/plink-1.07-x86_64/plink --noweb --bfile hapmap3/hapmap3 --extract plink.prune.in --make-bed --out hapmap3_pruned
#why prune? (ask while running...)
bash: line 3: /plink-1.07-x86_64/plink: No such file or directory bash: line 4: /plink-1.07-x86_64/plink: No such file or directory bash: line 5: /plink-1.07-x86_64/plink: No such file or directory bash: line 6: /plink-1.07-x86_64/plink: No such file or directory bash: line 7: /plink-1.07-x86_64/plink: No such file or directory bash: line 8: /plink-1.07-x86_64/plink: No such file or directory
%%bash
#create IBS matrix
export pwd=`pwd`
$pwd/plink-1.07-x86_64/plink --noweb --bfile hapmap3_thin_pruned --cluster --distance-matrix --out hapmap3_thin_pruned
$pwd/plink-1.07-x86_64/plink --noweb --bfile hapmap3_chr21_pruned --cluster --distance-matrix --out hapmap3_chr21_pruned
$pwd/plink-1.07-x86_64/plink --noweb --bfile hapmap3_pruned --cluster --distance-matrix --out hapmap3_pruned
bash: line 3: /plink-1.07-x86_64/plink: No such file or directory bash: line 4: /plink-1.07-x86_64/plink: No such file or directory bash: line 5: /plink-1.07-x86_64/plink: No such file or directory