Skip to content

Instantly share code, notes, and snippets.

@kantale kantale/scripts.md
Last active Jul 20, 2019

Embed
What would you like to do?
Useful scripts for installing tools

hapgen2 2.1.2

Install

wget https://mathgen.stats.ox.ac.uk/genetics_software/hapgen/download/builds/macosx_intel/v2.1.2/hapgen2_macosx_intel.tar.gz
tar zxvf hapgen2_macosx_intel.tar.gz

validate

./hapgen2

if [ $? -eq 0 ] ; then
   exit 0
else
   exit 1
fi

variables

[{ "name" : "exec",
   "value" : "./hapgen2",
   "description": "executable"}
]

hapmap2

Installation

wget https://mathgen.stats.ox.ac.uk/wtccc-software/HM3.tgz
tar zxvf HM3.tgz

Validation

command="./$md5checkdir__1__2__exec HM3/ 35f3dc6a51f47ade371e932ce275cc23"
eval $command

if [ $? -eq 0 ] ; then
        exit 0
else
        exit 1
fi

Variables

install_path = HM3/

plink 1.07

wget http://zzz.bwh.harvard.edu/plink/dist/plink-1.07-x86_64.zip 
unzip plink-1.07-x86_64.zip


cd plink-1.07-x86_64
./plink --noweb --file test
wget http://zzz.bwh.harvard.edu/plink/dist/plink-1.07-mac-intel.zip
unzip plink-1.07-x86_64.zip

cd plink-1.07-mac-intel
./plink --noweb --file test

${output__result__extract_chromosome_from_ped__2}=${input__ped_map__extract_chromosome_from_ped__2}_chr_${input__chromosome__extract_chromosome_from_ped__2}
${plink__1_07__4__path} \
   --noweb \
   --file ${input__ped_map__extract_chromosome_from_ped__2} \
   --chr ${input__chromosome__extract_chromosome_from_ped__2} \
   --recode \
   --out ${output__result__extract_chromosome_from_ped__2}
  
# Insert the BASH commands for this step

${input__chromosome__extract_chromosome_from_ped__3}="1"
${input__ped_map__extract_chromosome_from_ped__3}=${hapmap3__broad__1__path}

step__extract__extract_chromosome_from_ped__3

${output__hapmap3_chr1__hapmap2_chromosome_1__2}=${output__result__extract_chromosome_from_ped__3}

hapmap 3

wget https://www.broadinstitute.org/files/shared/mpg/hapmap3/hapmap3_r1_b36_fwd_consensus.qc.poly.recode.map.bz2
bunzip2 hapmap3_r1_b36_fwd_consensus.qc.poly.recode.map.bz2 
wget https://www.broadinstitute.org/files/shared/mpg/hapmap3/hapmap3_r1_b36_fwd_consensus.qc.poly.recode.ped.bz2
bunzip2 hapmap3_r1_b36_fwd_consensus.qc.poly.recode.ped.bz2
md5 -q hapmap3_r1_b36_fwd_consensus.qc.poly.recode.map | grep "688bbbc2a10ee8dbb3524f1121d045d1"
if [ $? -ne 0 ] ; then
  exit 1
fi

md5 -q hapmap3_r1_b36_fwd_consensus.qc.poly.recode.ped | grep "1a2bce84f9fb3157875e049fe1830d85"
if [ $? -ne 0 ] ; then
  exit 1
fi

exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.