Last active
August 29, 2015 14:16
-
-
Save explodecomputer/525fecb0a8371f88f25d to your computer and use it in GitHub Desktop.
simulate phenotypes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# name of binary plink filename (excluding .bed/.bim/.fam suffix) | |
plinkfile="" | |
# output filename | |
outname="" | |
# number of causal variants | |
nvar=1000 | |
# simulated h2 | |
h2=0.8 | |
# number of simulations | |
nsim=10 | |
# Get random set of SNPs | |
shuf -n ${nvar} ${plinkfile}.bim | awk '{ print $2 }' > ${outname}.selectedsnps | |
# Use gcta to simulate some phenotypes | |
gcta64 \ | |
--bfile ${plinkfile} \ | |
--simu-qt \ | |
--simu-causal-loci ${outname}.selectedsnps \ | |
--simu-hsq ${h2} \ | |
--simu-rep ${nsim} \ | |
--out ${outname} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment