ASPP 2024 material
This commit is contained in:
commit
1f6bc07c51
90 changed files with 91689 additions and 0 deletions
BIN
exercises/tabular_join/.DS_Store
vendored
Normal file
BIN
exercises/tabular_join/.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -0,0 +1,124 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "f11a76bf",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Exercise: Add experiment information to electrophysiology data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "b6f2742b",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"\n",
|
||||
"# Set some Pandas options: maximum number of rows/columns it's going to display\n",
|
||||
"pd.set_option('display.max_rows', 1000)\n",
|
||||
"pd.set_option('display.max_columns', 100)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "2967c84e",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Load electrophysiology data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "ed626ee3",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"df = pd.read_csv('../../data/QC_passed_2024-07-04_collected.csv')\n",
|
||||
"info = pd.read_csv('../../data/op_info.csv')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "2fef4d37",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 1. Add experiment information to the electrophysiology results\n",
|
||||
"\n",
|
||||
"* Is there information for every experiment?\n",
|
||||
"* How many experiments did each patcher perform? (i.e., individual OPs, or rows in `info`)\n",
|
||||
"* How many samples did each patcher analyze? (i.e., individual rows in `df`)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "1f3f57eb",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "44031178",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 2. Remove outliers from the table\n",
|
||||
"\n",
|
||||
"1. Load the list of outliers in `outliers.csv`\n",
|
||||
"2. Use an anti-join to remove the outliers from the table\n",
|
||||
"3. How many samples (rows) are left in the data?"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "7fa953af",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "84270332",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 3. Save final result in `processed_QC_passed_2024-07-04_collected_v1.csv`\n",
|
||||
"\n",
|
||||
"1. Using the `.to_csv` method of Pandas DataFrames"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "c7bcff45",
|
||||
"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.3"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
File diff suppressed because it is too large
Load diff
135
exercises/tabular_join/outliers.csv
Normal file
135
exercises/tabular_join/outliers.csv
Normal file
|
@ -0,0 +1,135 @@
|
|||
OP,cell_ID
|
||||
OP240201,24201S2c2
|
||||
OP210323,2021_03_25_0S4_D2c6
|
||||
OP230808,23808S2c6
|
||||
OP240503,24503S1c6
|
||||
OP230109,2311S3c2
|
||||
OP211209,21d10S1_D2c7
|
||||
OP220127,22128S3c5
|
||||
OP221020,22o21S4_D2c6
|
||||
OP230808,23808S1c1
|
||||
OP210323,2021_03_25_0S4_D2c7
|
||||
OP211209,21d10S4c3
|
||||
OP240215,24215S2c5
|
||||
OP220111,22112S5_D2c7
|
||||
OP240321,24321S4c8
|
||||
OP220623,22623S2c2
|
||||
OP240221,24221S1c1
|
||||
OP230209,23209S3_D2c6
|
||||
OP240117,24117S2_D2c6
|
||||
OP240201,24201S2c5
|
||||
OP220518,22519S2c6
|
||||
OP221024,22o24S1_D2c7
|
||||
OP220426,22427S4c7
|
||||
OP230523,23523S2c1
|
||||
OP230808,23808S1_D2c6
|
||||
OP211209,21d10S5c8
|
||||
OP230817,23817S1c3
|
||||
OP221027,22o27S1c2
|
||||
OP210323,2021_03_25_0S6_D2c4
|
||||
OP211123,2021_11_24_0S3c8
|
||||
OP220217,22217S1c4
|
||||
OP220602,22602S2_D2c6
|
||||
OP210323,2021_03_24_0S5c2
|
||||
OP240215,24215S2c1
|
||||
OP230523,23523S3c4
|
||||
OP231109,23n09S1c1
|
||||
OP211123,2021_11_24_0S3c6
|
||||
OP221024,22o24S3c7
|
||||
OP230810,23810S1c8
|
||||
OP220426,22427S2c3
|
||||
OP220426,22427S4c4
|
||||
OP221024,22o24S1c7
|
||||
OP230817,23817S3c5
|
||||
OP220623,22623S3c3
|
||||
OP220111,22112S1_D2c1
|
||||
OP220217,22217S3c5
|
||||
OP220426,22427S2_D2c1
|
||||
OP231123,23n23S1c5
|
||||
OP220127,22127S3_D2c7
|
||||
OP231123,23n23S1_D2c5
|
||||
OP240201,24201S2c8
|
||||
OP211123,2021_11_24_0S3c1
|
||||
OP220308,22308S2c4
|
||||
OP220127,22129S3_D2c8
|
||||
OP211123,21n23S2c4
|
||||
OP220518,22519S2c5
|
||||
OP230808,23808S5c7
|
||||
OP220914,22915S2c8
|
||||
OP220127,22128S4c5
|
||||
OP230314,23314S2_D2c7
|
||||
OP240503,24503S3c2
|
||||
OP220120,22121S1c5
|
||||
OP221024,22o24S1c5
|
||||
OP210615,2021_06_16_0S1_D2c3
|
||||
OP221027,22o27S1c3
|
||||
OP220602,22602S3_D2c7
|
||||
OP220602,22602S1c3
|
||||
OP230314,23314S4c3
|
||||
OP240321,24321S3c1
|
||||
OP230314,23314S4c6
|
||||
OP220228,22228S2_D2c7
|
||||
OP210323,2021_03_24_0S3c1
|
||||
OP230426,23426S3c2
|
||||
OP211209,21d10S1c7
|
||||
OP220111,22111S1c8
|
||||
OP231130,23n30S1_D2c7
|
||||
OP230810,23810S3c2
|
||||
OP240503,24503S1_D2c4
|
||||
OP220120,22121S1c4
|
||||
OP220623,22623S4_D2c2
|
||||
OP220623,22623S2c6
|
||||
OP210615,2021_06_16_0S1_D2c1
|
||||
OP220518,22519S1c4
|
||||
OP220602,22602S3c2
|
||||
OP230523,23523S2c4
|
||||
OP240503,24503S1c1
|
||||
OP220217,22217S1c7
|
||||
OP230523,23523S2c2
|
||||
OP231130,23n30S2c5
|
||||
OP231130,23n30S1_D2c6
|
||||
OP240411,24411S1c5
|
||||
OP220914,22915S2c7
|
||||
OP220914,22915S3_D2c2
|
||||
OP240503,24503S2c2
|
||||
OP240417,24417S2_D2c1
|
||||
OP220602,22602S2c4
|
||||
OP220228,22228S1c6
|
||||
OP220217,22218S2_D2c7
|
||||
OP230808,23808S2c4
|
||||
OP220914,22915S2c1
|
||||
OP210323,2021_03_25_0S4_D2c4
|
||||
OP230314,23314S3c1
|
||||
OP220228,22228S2c1
|
||||
OP220120,22121S1c7
|
||||
OP230109,2311S1c1
|
||||
OP230420,23420S2c1
|
||||
OP220426,22427S2c4
|
||||
OP220111,22112S6_D2c5
|
||||
OP240503,24503S2c7
|
||||
OP240503,24503S2c8
|
||||
OP220602,22602S2c1
|
||||
OP221027,22o27S1c6
|
||||
OP230817,23817S3_D2c1
|
||||
OP231130,23n30S1_D2c5
|
||||
OP220127,22127S2_D2c7
|
||||
OP230808,23808S4c2
|
||||
OP220127,22128S2c2
|
||||
OP220602,22602S2c5
|
||||
OP230817,23817S3c2
|
||||
OP240117,24117S1c5
|
||||
OP220518,22519S4c2
|
||||
OP221020,22o21S4_D2c3
|
||||
OP230420,23420S1c7
|
||||
OP240201,24201S1c5
|
||||
OP221027,22o27S1c3
|
||||
OP230808,23808S3_D2c6
|
||||
OP220308,22308S2c2
|
||||
OP220120,22121S1c4
|
||||
OP230209,23209S3c8
|
||||
OP230209,23209S1_D2c2
|
||||
OP221027,22o27S3_D2c7
|
||||
OP201029,20o29S2c1
|
||||
OP230808,23808S2_D2c4
|
||||
OP220623,22623S3_D2c1
|
||||
OP230314,23314S1c6
|
|
124
exercises/tabular_join/tabular_join.ipynb
Normal file
124
exercises/tabular_join/tabular_join.ipynb
Normal file
|
@ -0,0 +1,124 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "f11a76bf",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Exercise: Add experiment information to electrophysiology data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "b6f2742b",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"\n",
|
||||
"# Set some Pandas options: maximum number of rows/columns it's going to display\n",
|
||||
"pd.set_option('display.max_rows', 1000)\n",
|
||||
"pd.set_option('display.max_columns', 100)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "2967c84e",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Load electrophysiology data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "ed626ee3",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"df = pd.read_csv('../../data/QC_passed_2024-07-04_collected.csv')\n",
|
||||
"info = pd.read_csv('../../data/op_info.csv')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "2fef4d37",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 1. Add experiment information to the electrophysiology results\n",
|
||||
"\n",
|
||||
"* Is there information for every experiment?\n",
|
||||
"* How many experiments did each patcher perform? (i.e., individual OPs, or rows in `info`)\n",
|
||||
"* How many samples did each patcher analyze? (i.e., individual rows in `df`)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "1f3f57eb",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "44031178",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 2. Remove outliers from the table\n",
|
||||
"\n",
|
||||
"1. Load the list of outliers in `outliers.csv`\n",
|
||||
"2. Use an anti-join to remove the outliers from the table\n",
|
||||
"3. How many samples (rows) are left in the data?"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "7fa953af",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "84270332",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 3. Save final result in `processed_QC_passed_2024-07-04_collected_v1.csv`\n",
|
||||
"\n",
|
||||
"1. Using the `.to_csv` method of Pandas DataFrames"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "c7bcff45",
|
||||
"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.3"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
1086
exercises/tabular_join/tabular_join_solution.ipynb
Normal file
1086
exercises/tabular_join/tabular_join_solution.ipynb
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue