Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into dev/link-check-dan
Browse files Browse the repository at this point in the history
  • Loading branch information
mr8lu committed Nov 25, 2024
2 parents 23c6f66 + 252acea commit 7f14b3b
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 1,169 deletions.
207 changes: 24 additions & 183 deletions notebooks/GWAS/GWAS_coat_color.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@
"cell_type": "code",
"execution_count": null,
"id": "8ec900bd",
"metadata": {
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"%%bash\n",
Expand All @@ -75,11 +71,7 @@
"cell_type": "code",
"execution_count": null,
"id": "4d43ae73",
"metadata": {
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"%%bash\n",
Expand All @@ -101,11 +93,7 @@
"cell_type": "code",
"execution_count": null,
"id": "b3ba3eef",
"metadata": {
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"%%bash\n",
Expand All @@ -117,14 +105,7 @@
"cell_type": "code",
"execution_count": null,
"id": "ae20d01c",
"metadata": {
"gather": {
"logged": 1686580882939
},
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"#add to your path\n",
Expand All @@ -136,11 +117,7 @@
"cell_type": "code",
"execution_count": null,
"id": "b219074a",
"metadata": {
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"! mamba install -y -c bioconda plink vcftools"
Expand All @@ -158,14 +135,7 @@
"cell_type": "code",
"execution_count": null,
"id": "e91c7a01",
"metadata": {
"gather": {
"logged": 1686579597925
},
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"cd GWAS"
Expand All @@ -175,14 +145,7 @@
"cell_type": "code",
"execution_count": null,
"id": "9b770f7f",
"metadata": {
"gather": {
"logged": 1686579600325
},
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"ls"
Expand All @@ -192,11 +155,7 @@
"cell_type": "code",
"execution_count": null,
"id": "6570875d",
"metadata": {
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"! vcftools --gzvcf pruned_coatColor_maf_geno.vcf.gz --plink --out coatColor"
Expand All @@ -215,14 +174,7 @@
"cell_type": "code",
"execution_count": null,
"id": "6c868a67",
"metadata": {
"gather": {
"logged": 1686581972147
},
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"#unzip vcf\n",
Expand All @@ -233,14 +185,7 @@
"cell_type": "code",
"execution_count": null,
"id": "8e11f991",
"metadata": {
"gather": {
"logged": 1686581979545
},
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"#create list of minor alleles\n",
Expand All @@ -251,11 +196,7 @@
"cell_type": "code",
"execution_count": null,
"id": "8cff47e3",
"metadata": {
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"! head minor_alleles"
Expand All @@ -273,14 +214,7 @@
"cell_type": "code",
"execution_count": null,
"id": "dafa14a6",
"metadata": {
"gather": {
"logged": 1686582023237
},
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"#calculate missingness per locus\n",
Expand All @@ -291,14 +225,7 @@
"cell_type": "code",
"execution_count": null,
"id": "5cf5f51b",
"metadata": {
"gather": {
"logged": 1686582030150
},
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"#take a look at lmiss, which is the per locus rates of missingness\n",
Expand All @@ -309,14 +236,7 @@
"cell_type": "code",
"execution_count": null,
"id": "915bb263",
"metadata": {
"gather": {
"logged": 1686582034753
},
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"#peek at imiss which is the individual rates of missingness\n",
Expand All @@ -335,11 +255,7 @@
"cell_type": "code",
"execution_count": null,
"id": "3b8f2d7f",
"metadata": {
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"! plink --file coatColor --allow-no-sex --dog --make-bed --noweb --out coatColor.binary"
Expand All @@ -357,11 +273,7 @@
"cell_type": "code",
"execution_count": null,
"id": "f926ef9b",
"metadata": {
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"! plink --bfile coatColor.binary --make-pheno coatColor.pheno \"yellow\" --assoc --reference-allele minor_alleles --allow-no-sex --adjust --dog --noweb --out coatColor"
Expand All @@ -380,11 +292,7 @@
"cell_type": "code",
"execution_count": null,
"id": "b94e1e2a",
"metadata": {
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"%%bash\n",
Expand Down Expand Up @@ -413,14 +321,7 @@
"cell_type": "code",
"execution_count": null,
"id": "60feed89",
"metadata": {
"gather": {
"logged": 1686582094642
},
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"#make a new library and install qqman their\n",
Expand All @@ -441,14 +342,7 @@
"cell_type": "code",
"execution_count": null,
"id": "a7e8cd2b",
"metadata": {
"gather": {
"logged": 1686584355516
},
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"#make sure you are still CD in GWAS, when you change kernel it may reset to home\n",
Expand All @@ -459,14 +353,7 @@
"cell_type": "code",
"execution_count": null,
"id": "7946a3a7",
"metadata": {
"gather": {
"logged": 1686584356532
},
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"require(qqman, lib = Sys.getenv(\"R_LIBS_USER\"))"
Expand All @@ -476,14 +363,7 @@
"cell_type": "code",
"execution_count": null,
"id": "0d28ef2c",
"metadata": {
"gather": {
"logged": 1686584364339
},
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"data=read.table(\"coatColor.assoc\", header=TRUE)"
Expand All @@ -493,14 +373,7 @@
"cell_type": "code",
"execution_count": null,
"id": "8e5207be",
"metadata": {
"gather": {
"logged": 1686584368241
},
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"data=data[!is.na(data$P),]"
Expand All @@ -510,14 +383,7 @@
"cell_type": "code",
"execution_count": null,
"id": "6330b1e0",
"metadata": {
"gather": {
"logged": 1686584371278
},
"vscode": {
"languageId": "r"
}
},
"metadata": {},
"outputs": [],
"source": [
"manhattan(data, p = \"P\", col = c(\"blue4\", \"orange3\"),\n",
Expand Down Expand Up @@ -561,32 +427,7 @@
"source": []
}
],
"metadata": {
"kernel_info": {
"name": "ir"
},
"kernelspec": {
"display_name": "R",
"language": "R",
"name": "ir"
},
"language_info": {
"codemirror_mode": "r",
"file_extension": ".r",
"mimetype": "text/x-r-source",
"name": "R",
"pygments_lexer": "r",
"version": "4.3.2"
},
"microsoft": {
"ms_spell_check": {
"ms_spell_check_language": "en"
}
},
"nteract": {
"version": "[email protected]"
}
},
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit 7f14b3b

Please sign in to comment.