We use the list of vertices stored in the .opi file (OSCA binary format)
wd="path/to/working/directory"
cd $wd
mkdir -p ${wd}/01_vertexSelection
${wd}/qsubshcom " for iter in {1..100} |;
do |;
for NNN in 10 100 1000 |;
do |;
shuf -n \${NNN} "${wd}"/00_BodFiles/AllVertices.fwhm0.fsaverage.UKB10K.QCed.STD.opi | awk '{ print \$2 }' > "${wd}"/01_vertexSelection/NVertices\${NNN}_Niter\${iter} |;
done |;
done |;
done " 1 4G DrawVertices_all 10:00:00 " "
wd="path/to/working/directory"
cd $wd
mkdir -p ${wd}/02_phenotypesSimul
${wd}/qsubshcom "
for iter in {1..100} |;
do |;
NNN=10 |;
"${wd}"/osca_17062019 --simu-qt --simu-rsq 0.2 --befile "${rd}"/BodFiles/AllVertices.fwhm0.fsaverage.UKB15K --simu-causal-loci "${wd}"/01_vertexSelection/NVertices\${NNN}_Niter\${iter} --out "${wd}"/02_phenotypesSimul/NVertices\${NNN}_Niter\${iter} |;
NNN=100 |;
"${wd}"/osca_17062019 --simu-qt --simu-rsq 0.5 --befile "${wd}"/BodFiles/AllVertices.fwhm0.fsaverage.UKB15K --simu-causal-loci "${wd}"/01_vertexSelection/NVertices\${NNN}_Niter\${iter} --out "${wd}"/02_phenotypesSimul/NVertices\${NNN}_Niter\${iter} |;
NNN=1000 |;
"${wd}"/osca_17062019 --simu-qt --simu-rsq 0.4 --befile "${wd}"/BodFiles/AllVertices.fwhm0.fsaverage.UKB15K --simu-causal-loci "${wd}"/01_vertexSelection/NVertices\${NNN}_Niter\${iter} --out "${wd}"/02_phenotypesSimul/NVertices\${NNN}_Niter\${iter} |;
done |;
done |; " 1 4G SimulPheno 10:00:00 " "
= "path/to/working/directory"
wd setwd(wd)
for (iter in 1:100) {
= read.table("02_phenoytpesSimul/NVertices10_area_Niter1.phen")
phen $V3 = rnorm(n = length(phen$V1), mean = 0, sd = 1)
phenwrite.table(phen, paste0("02_phenoytpesSimul/NVertices",
0, "_Niter", iter, ".phen"), col.names = F, row.names = F,
quote = F)
}
A work by by [Baptiste Couvy-Duchesne] - 13 June 2022