Skip to content

Commit

Permalink
updated pipeline.ipynb to prevent conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Akaud committed Sep 10, 2024
1 parent 5073938 commit 68b8472
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions tests/pipeline.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,38 @@
{
"metadata": {},
"cell_type": "code",
"source": "",
"id": "6f0abfb50bd211a0",
"outputs": [],
"execution_count": null
"execution_count": null,
"source": [
"from api.data.refactoring import merge_gnomad_lovd, parse_gnomad, set_gnomad_dtypes\n",
"import pandas as pd\n",
"from api import (store_database_for_eys_gene,\n",
" parse_lovd,\n",
" set_lovd_dtypes,\n",
" LOVD_PATH,\n",
" GNOMAD_PATH)\n",
"\n",
"store_database_for_eys_gene('lovd', False)\n",
"store_database_for_eys_gene('gnomad', False)\n",
"\n",
"lovd_data = parse_lovd(LOVD_PATH + \"/lovd_data.txt\")\n",
"gnomad_data = parse_gnomad(GNOMAD_PATH+'/gnomad_data.csv')\n",
"\n",
"set_lovd_dtypes(lovd_data)\n",
"set_gnomad_dtypes(gnomad_data)\n",
"\n",
"variants_on_genome = lovd_data[\"Variants_On_Genome\"].copy()\n",
"\n",
"lovd_data = pd.merge(lovd_data[\"Variants_On_Transcripts\"],\n",
" variants_on_genome[['id','VariantOnGenome/DNA','VariantOnGenome/DNA/hg38']],\n",
" on='id',\n",
" how='left')\n",
"\n",
"gnomad_data = gnomad_data.copy()\n",
"final_data = merge_gnomad_lovd(lovd_data, gnomad_data)\n",
"final_data"
],
"id": "ba435cd29d565f7d"
}
],
"metadata": {
Expand Down

0 comments on commit 68b8472

Please sign in to comment.