Skip to content

Instantly share code, notes, and snippets.

@explodecomputer
Last active February 4, 2019 08:28
Show Gist options
  • Save explodecomputer/d4cf555db743991632daa73fd97ebd4b to your computer and use it in GitHub Desktop.
Save explodecomputer/d4cf555db743991632daa73fd97ebd4b to your computer and use it in GitHub Desktop.
raiss_setup
for i in {1..22}
do
plink --bfile /mnt/storage/private/mrcieu/research/mr-eve/vcf-reference-datasets/1000g_filtered/data_maf0.01_rs --chr $i --make-bed --out ld/ref/data_$i
done
for i in {1..22}
do
bcftools query -r $i -f '%ID\t%POS\t%REF\t%ALT\t%B\t%SE\n' ../data.bcf | awk 'BEGIN {print "rsID\tpos\tA0\tA1\tZ"; OFS="\t"}; { print $1, $2, $3, $4, $5/$6}' > ld/ref/z_2_$i.txt
done
import raiss
region="ld/Region_LD.csv"
ref="ld/ref"
out="ld"
raiss.LD.generate_genome_matrices(region, ref, out, suffix="data")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment