Skip to content

Commit

Permalink
Large update from decemberdevelopbranch
Browse files Browse the repository at this point in the history
  • Loading branch information
AidaasinAyda committed Jan 2, 2025
1 parent befad1d commit 57b960c
Show file tree
Hide file tree
Showing 32 changed files with 3,007 additions and 5 deletions.
Binary file added .RData
Binary file not shown.
318 changes: 318 additions & 0 deletions Untitled.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,318 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"id": "84b4ac0a-9204-457d-b8df-4f5a474f200a",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "63bbb566-842c-4353-88be-481e31a757ac",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Participant_Id</th>\n",
" <th>SubjectID</th>\n",
" <th>Age_at_scan_m_T0X</th>\n",
" <th>Age_at_scan_y_T0X</th>\n",
" <th>gender_BRICK</th>\n",
" <th>brick_genotype</th>\n",
" <th>severe_genotype</th>\n",
" <th>permission_data_sharing_for_other_studies</th>\n",
" <th>Left.Lateral.Ventricle</th>\n",
" <th>Left.Inf.Lat.Vent</th>\n",
" <th>...</th>\n",
" <th>SupraTentorialVol</th>\n",
" <th>SupraTentorialVolNotVent</th>\n",
" <th>SupraTentorialVolNotVentVox</th>\n",
" <th>MaskVol</th>\n",
" <th>BrainSegVol.to.eTIV</th>\n",
" <th>MaskVol.to.eTIV</th>\n",
" <th>lhSurfaceHoles</th>\n",
" <th>rhSurfaceHoles</th>\n",
" <th>SurfaceHoles</th>\n",
" <th>EstimatedTotalIntraCranialVol</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>BRICK_001</td>\n",
" <td>SC1</td>\n",
" <td>195</td>\n",
" <td>16.250000</td>\n",
" <td>2</td>\n",
" <td>HbSS</td>\n",
" <td>1</td>\n",
" <td>1.0</td>\n",
" <td>3003.6</td>\n",
" <td>236.3</td>\n",
" <td>...</td>\n",
" <td>973068.851571</td>\n",
" <td>966743.851571</td>\n",
" <td>965106</td>\n",
" <td>1492366</td>\n",
" <td>0.759430</td>\n",
" <td>1.017757</td>\n",
" <td>67</td>\n",
" <td>101</td>\n",
" <td>168</td>\n",
" <td>1.466329e+06</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>BRICK_002</td>\n",
" <td>SC2</td>\n",
" <td>182</td>\n",
" <td>15.166667</td>\n",
" <td>1</td>\n",
" <td>HbSC</td>\n",
" <td>0</td>\n",
" <td>1.0</td>\n",
" <td>3423.4</td>\n",
" <td>203.2</td>\n",
" <td>...</td>\n",
" <td>902444.163465</td>\n",
" <td>895740.163465</td>\n",
" <td>893925</td>\n",
" <td>1320302</td>\n",
" <td>0.765122</td>\n",
" <td>0.984858</td>\n",
" <td>68</td>\n",
" <td>53</td>\n",
" <td>121</td>\n",
" <td>1.340601e+06</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>BRICK_003</td>\n",
" <td>SC3</td>\n",
" <td>164</td>\n",
" <td>13.666667</td>\n",
" <td>2</td>\n",
" <td>HbSS</td>\n",
" <td>1</td>\n",
" <td>1.0</td>\n",
" <td>4516.6</td>\n",
" <td>1085.6</td>\n",
" <td>...</td>\n",
" <td>974929.218729</td>\n",
" <td>964157.218729</td>\n",
" <td>962589</td>\n",
" <td>1597120</td>\n",
" <td>0.720286</td>\n",
" <td>1.038266</td>\n",
" <td>214</td>\n",
" <td>166</td>\n",
" <td>380</td>\n",
" <td>1.538257e+06</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>3 rows × 74 columns</p>\n",
"</div>"
],
"text/plain": [
" Participant_Id SubjectID Age_at_scan_m_T0X Age_at_scan_y_T0X \\\n",
"0 BRICK_001 SC1 195 16.250000 \n",
"1 BRICK_002 SC2 182 15.166667 \n",
"2 BRICK_003 SC3 164 13.666667 \n",
"\n",
" gender_BRICK brick_genotype severe_genotype \\\n",
"0 2 HbSS 1 \n",
"1 1 HbSC 0 \n",
"2 2 HbSS 1 \n",
"\n",
" permission_data_sharing_for_other_studies Left.Lateral.Ventricle \\\n",
"0 1.0 3003.6 \n",
"1 1.0 3423.4 \n",
"2 1.0 4516.6 \n",
"\n",
" Left.Inf.Lat.Vent ... SupraTentorialVol SupraTentorialVolNotVent \\\n",
"0 236.3 ... 973068.851571 966743.851571 \n",
"1 203.2 ... 902444.163465 895740.163465 \n",
"2 1085.6 ... 974929.218729 964157.218729 \n",
"\n",
" SupraTentorialVolNotVentVox MaskVol BrainSegVol.to.eTIV MaskVol.to.eTIV \\\n",
"0 965106 1492366 0.759430 1.017757 \n",
"1 893925 1320302 0.765122 0.984858 \n",
"2 962589 1597120 0.720286 1.038266 \n",
"\n",
" lhSurfaceHoles rhSurfaceHoles SurfaceHoles EstimatedTotalIntraCranialVol \n",
"0 67 101 168 1.466329e+06 \n",
"1 68 53 121 1.340601e+06 \n",
"2 214 166 380 1.538257e+06 \n",
"\n",
"[3 rows x 74 columns]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"filestring = \"Z:/Aida_experiment/combined_BRICK_marjolein_with_genotype.csv\"\n",
"table1 = pd.read_csv(filestring)\n",
"table1.head(3) \n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "2630228b-65fc-4dbc-8ecf-a593aa699cdc",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"20"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"severe_genotypetable = table1[table1.severe_genotype == 1]\n",
"light_genotypetable = table1[table1.severe_genotype == 0]\n",
"len(light_genotypetable)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "baa3cd55-41e4-45bb-91ca-9c80989983c2",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"59"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(table1)\n"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "59dd3487-2fee-4fe7-b3ae-8f4caa412959",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"26"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"gender_BRICK_male = table1[table1.gender_BRICK == 1]\n",
"gender_BRICK_female = table1[table1.gender_BRICK == 2]\n",
"len(gender_BRICK_female)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "31e1f7a1-38f8-4837-bad6-2b3a916d8f85",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"6"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"light_genotypetable_females = light_genotypetable[light_genotypetable.gender_BRICK == 2]\n",
"len(light_genotypetable_females)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2524356c-f568-48d2-8dd2-9e134e4e0f07",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.10"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
1 change: 1 addition & 0 deletions brickstudy.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: 9d080296-f666-4221-8635-91dbeff9dc33

RestoreWorkspace: Default
SaveWorkspace: Default
Expand Down
Loading

0 comments on commit 57b960c

Please sign in to comment.