{ "cells": [ { "cell_type": "markdown", "id": "64d84e81-a286-4825-8940-b122f55be68b", "metadata": { "kernel": "SoS" }, "source": [ "# Secondary simulations\n", "\n", "This notebook include data simulation of 50 traits, and complex configurations suggested in HyprColoc paper." ] }, { "cell_type": "markdown", "id": "b8ec89af-da53-456f-bbfc-58175ab5e0b5", "metadata": { "kernel": "SoS" }, "source": [ "## Goal\n", "\n", "Because we don't have 50 traits to estimate and reflect the true configurations, we used a different approach: for each causal variant,\n", "we randomly select 10-25 traits to colocalize on that variant.\n", "\n", "We also simulated 10 traits complex configuration cases described and extended from Hyprcoloc paper." ] }, { "cell_type": "markdown", "id": "d795264f-41f2-48ad-aa11-a6e019d25a9b", "metadata": { "kernel": "SoS", "tags": [] }, "source": [ "## Input\n", "\n", "`genofile`: plink file of real genotyope, `/mnt/vast/hpc/csg/FunGen_xQTL/ROSMAP/Genotype/plink_by_gene/extended_cis_before_winsorize_plink_files/*.bim`\n", "\n", "The other parameters can be found in simxQTL repo. `https://github.com/StatFunGen/simxQTL`.\n", " \n", "## Output\n", "\n", "An rds matrix, with genotype matrix X (dimension: m * n, m: number of sample, n: number of SNP ) and phenotype (trait) matrix (dimension: m * a, m : number of samples, a: number of simulated traits) \n", "\n", "Example output: " ] }, { "cell_type": "code", "execution_count": 5, "id": "3199cef0-90b6-4489-8aff-eb28f65ec34f", "metadata": { "kernel": "R", "tags": [] }, "outputs": [], "source": [ "result = readRDS(\"/home/hs3393/cb_Mar/simulation_data/simulation_551rand_complex/sample_39_h2g_0.05_10trait_cluster_5+5+1rand.rds\")" ] }, { "cell_type": "code", "execution_count": 6, "id": "9312870e-902e-4293-83a6-cfe9c341633a", "metadata": { "kernel": "R", "tags": [] }, "outputs": [ { "data": { "text/html": [ "