2020年7月28日 星期二

GWAS 分析工具-plink 安裝摘要

# install PLINK 1.07
# http://zzz.bwh.harvard.edu//plink/download.shtml#download

src=http://zzz.bwh.harvard.edu//plink/dist/plink-1.07-x86_64.zip
target=/opt/PLINK1.07

[ $(which busybox) ]&& { for i in wget unzip;do [ -f "/usr/local/bin/${i}" ] || ln -s $(which busybox) /usr/local/bin/${i}; done; };
for i in unzip wget;do [ $(which ${i}) ]&& : || { echo check ${i}: not found ${i}! &&exit 1; } ;done;
[ -d "$target" ]&&mv ${target} ${target}.$(date +%Y-%m-%d-%H-%M);
mkdir -p $target;cd $target;
echo $target >readme.txt;echo $src >>readme.txt
wget -q -O- $src | unzip -;
mv ${target}/plink-1.07-x86_64/* ${target}/
chmod a+x ${target}/plink;
rmdir ${target}/plink-1.07-x86_64;


# install PLINK 1.90beta
# https://www.cog-genomics.org/plink/1.9/

src=http://s3.amazonaws.com/plink1-assets/dev/plink_linux_x86_64.zip
target=/opt/PLINK1.90beta

[ $(which busybox) ]&& { for i in wget unzip;do [ -f "/usr/local/bin/${i}" ] || ln -s $(which busybox) /usr/local/bin/${i}; done; };
for i in unzip wget;do [ $(which ${i}) ]&& : || { echo check ${i}: not found ${i}! &&exit 1; } ;done;
[ -d "$target" ]&&mv ${target} ${target}.$(date +%Y-%m-%d-%H-%M);
mkdir -p $target;cd $target;
echo $target >readme.txt;echo $src >>readme.txt
wget -q -O- $src | unzip -;
chmod a+x plink prettify;cd -;
for i in plink prettify;do [ -f "/usr/local/bin/${i}" ]&&mv /usr/local/bin/${i} /usr/local/bin/${i}.$(date +%Y-%m-%d-%H-%M);   ln -s ${target}/${i} /usr/local/bin/${i};done;

沒有留言: