Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.ipynb_checkpoints/
23 changes: 9 additions & 14 deletions Submodule 0/Submodule_0_Tutorial_1_GithubDownload.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
"--------------------------------------------"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -120,7 +115,7 @@
"\n",
"Or, perhaps you are going to use more of this module (Introduction to Github and Python for Bioinformatics). \n",
"\n",
"You should click on the link to that module from the list. It will take you to another Github Repository. Of course, the interfaces will also start with the file structure as all Github repositories look the same. These Modules typically contain a Readme.md file that explains the structure & contents of the overall tutorial module. Inside of each Module are folders (\"Submodules\") that contain the lessons in the form of Jupyter Notebooks (next lesson in this list)\n",
"You should click on the link to that module from the list. It will take you to another Github Repository. Of course, the interfaces will also start with the file structure as all Github repositories look the same. These modules typically contain a README.md file that explains the structure & contents of the overall tutorial module. Inside of each module are folders (\"Submodules\") that contain the lessons in the form of Jupyter Notebooks (next lesson in this list)\n",
"\n",
"<div class=\"alert alert-block alert-warning\"> <b>Attention:</b> Please go to that module in another tab on your browser before following the next set of directions</a>. </div>\n"
]
Expand All @@ -136,7 +131,7 @@
"<br>\n",
"So, in order to use the contents of any of the learning modules in the Sandbox, you need to copy them to a \"virtual machine\" (like moving to the hard drive of a computer running in GCP, Azure, or AWS). Github is quite prepared for this, in fact, it is one key purpose of the NIGMS using Github as a place for you to collect the materials.\n",
"<br>\n",
"There isn't a normal download button that you can see in a repository. At Github, most of the materials are code that developers want to download. Thus, you will click on the green code button to get the #option# to download or to copy.\n",
"There isn't a normal download button that you can see in a repository. At Github, most of the materials are code that developers want to download. Thus, you will click on the green code button to get the **option** to download or to copy.\n",
"<br>\n",
"![<> CODE button](./images/Code_button.png)\n",
"<br>\n",
Expand Down Expand Up @@ -179,7 +174,7 @@
"<br>\n",
"1. Click on the copy button next to the URL.\n",
"2. Go to the Azure terminal\n",
"3. type: git clone *then paste the url you copied*\n",
"3. type: `git clone` then paste the url you copied. \n",
"\n",
"<br>\n",
"The whole set of folders and proper file structure will instantly be in your notebook list.\n"
Expand All @@ -193,7 +188,7 @@
"\n",
"## Familiar, inelegant version: Downloading the contents of the repository then uploading\n",
"\n",
"There isn't a normal download button that you can see in a repository. At Github, most of the materials are code that developers want to download. Thus, you will click on the green code button to get the #option# to download or to copy.\n",
"There isn't a normal download button that you can see in a repository. At Github, most of the materials are code that developers want to download. Thus, you will click on the green code button to get the **option** to download or to copy.\n",
"<br>\n",
"![<> CODE button](./images/Code_button.png)\n",
"\n",
Expand All @@ -205,7 +200,7 @@
"\n",
"# \"Unzipping\" your folder\n",
"\n",
"The folder of materials does not download in a ready-to-use format. It is compressed (\"zipped\") so it needs to be extracted| into its full form before you upload it to use as a tutorial.\n",
"The folder of materials does not download in a ready-to-use format. It is compressed (\"zipped\") so it needs to be extracted into its full form before you upload it to use as a tutorial.\n",
"\n",
"**To unzip a file on Windows:**\n",
"\n",
Expand All @@ -217,7 +212,7 @@
"![Unzip](./images/extractAll.png)\n",
"\n",
"<br>\n",
"4. Choose the destination folder where you want to extract the folder. (it is fine to extract them in the same folder the file is already)\n",
"4. Choose the destination folder where you want to extract the folder (it is fine to extract them in the same folder the file is already).\n",
"5. Click \"Extract\" to start the unzipping process. \n",
"\n",
"<br>\n",
Expand Down Expand Up @@ -260,9 +255,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "conda_python3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "conda_python3"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -274,7 +269,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.16"
"version": "3.12.9"
}
},
"nbformat": 4,
Expand Down
31 changes: 13 additions & 18 deletions Submodule 0/Submodule_0_Tutorial_2_JupyterNotebooks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"\n",
"**What is a Jupyter Notebook?**\n",
"\n",
"It is a tool that lets you <u>write text</u> and <u>run computer code</u> (typically R or Python) all mixed into a single file, making it easy to see and understand. That is, Instead of just writing programming code in one tool and the descriptions or explanations in another file or a textbook, it blends them together sequentially.\n",
"It is a tool that lets you **write text** and **run computer code** (typically R or Python) all mixed into a single file, making it easy to see and understand. That is, Instead of just writing programming code in one tool and the descriptions or explanations in another file or a textbook, it blends them together sequentially.\n",
"<br>\n",
"Also, Jupyter lets you type that computing code into boxes (called \"cells\") and run each part separately. \n",
"<br>\n",
Expand Down Expand Up @@ -84,17 +84,19 @@
"![image.png](attachment:90fea28a-e4ae-4a89-a13a-280dbd0819fb.png)\n",
"\n",
"<br>\n",
"The top line is clearly text-based (the tool for that in Jupyter is called \"Markdown\")\n",
"The top line is text-based (the tool for that in Jupyter is called \"Markdown\")\n",
"\n",
"The next cell below is a **code cell** that has in it: \n",
"```\n",
"#this is a code cell\n",
"print(\"This is the output from a code cell\")\n",
"<br>\n",
"Finally, the bottom material is not in a cell but is the output (This is the output from a code cell)\n",
"<br>\n",
"The kind of code it is able to run is **Python**. If you look at the top right, you can see that this Jupyter Notebook is running Python 3 (Python language version 3) in the code cells. \n",
"```\n",
"Below this cell, the output redered by running the cell can be found. \n",
"\n",
"The code cells are able to run Python code. If you look at the top right, you can see that this Jupyter Notebook is running Python 3 (Python language version 3) in the code cells. \n",
"\n",
"In the above image the code in the cells has already been run (Markdown is also a kind of code that renders the text in some format, so we \"run\" that too) Take a look at the same notebook before the two cells were executed:\n",
"\n",
"![image.png](attachment:cc6d0953-136b-4038-a6fb-0992b25aec95.png)\n",
"\n"
]
Expand All @@ -107,7 +109,7 @@
"\n",
"Jupyter Notebooks are useful because:\n",
"\n",
"1. They are easy to Use – You don’t need to run an entire program at once. You can run small pieces of code step by step, see what happens, and fix mistakes as you go.\n",
"1. They are easy to use – You don’t need to run an entire program at once. You can run small pieces of code step by step, see what happens, and fix mistakes as you go.\n",
"2. You can take notes while you code – Instead of keeping your notes in a separate document, you can write explanations right next to your code to make it easier to understand later. In this module, it means that notes can be given to you to describe the code.\n",
"3. They help you to see your results clearly & immediately – If your code creates a table, chart, or graph, Jupyter Notebook will show it right inside the document.\n",
"4. It's great for learning and sharing – You can save your notebook and send it to someone else so they can see your work and try it themselves.\n",
Expand All @@ -133,7 +135,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"To <u>run</u> a single code cell in Azure:\n",
"To **run** a single code cell in Azure:\n",
"\n",
"- Click inside the cell to select it.\n",
"- Click the Run button (right-pointing triangle for 'play' in the toolbar)\n",
Expand Down Expand Up @@ -186,7 +188,7 @@
"source": [
"# Viewing a Jupyter Notebook in Azure\n",
"\n",
"To use a notebook, you'll need to OPEN a notebook. In Azure, after you've loaded in some notebooks, you need to open the folder, then double click on a notebook so it will open. IN the image below, the arrow shows where you can find the list of notebooks. Circled is the button to expand the notebook & shrink the file structure. \n",
"To use a notebook, you'll need to OPEN a notebook. In Azure, after you've loaded in some notebooks, you need to open the folder, then double click on a notebook so it will open. In the image below, the arrow shows where you can find the list of notebooks. Circled is the button to expand the notebook & shrink the file structure. \n",
"\n",
"![opening_notebook.png](./images/opening_notebook.png)"
]
Expand Down Expand Up @@ -220,7 +222,7 @@
"\n",
"# Adding code or markdown boxes\n",
"\n",
"You can create a code box or a text (Markdown) box very easily.\n",
"You can create a code box or a text (markdown) box very easily.\n",
"<br>\n",
"In Azure, to add another box hover over the space above the left side of a current box, and the following options will appear:\n",
"\n",
Expand All @@ -247,13 +249,6 @@
"## Clean up\n",
" In the main tutorials, you'll be reminded here to \"shut down your compute instance.\" Check out the Azure tutorial for more explaination."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -272,7 +267,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.12.9"
}
},
"nbformat": 4,
Expand Down
17 changes: 7 additions & 10 deletions Submodule 0/Submodule_0_Tutorial_3_AzureML.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"metadata": {},
"source": [
"## Overview\n",
"This tutorial is intended to get you started on Azure ML with a \"compute instance.\"\n",
"This tutorial is intended to get you started on Azure ML with a **compute instance.**\n",
"\n",
"The process is not (novice) user-friendly *the first time.* You will have to set up a few things (accounts, subscriptions, workspaces) but these will be your defaults after the first time. It will thus be really easy to go back to or to use AzureML for other cloud computing modules provided at the NIGMS Sandbox. \n",
"\n",
Expand Down Expand Up @@ -94,7 +94,7 @@
"Cost Details:\n",
"- Azure will provide the first $200 worth of charges, which is an enormous amount of computing if you are just learning and running notebooks\n",
"- The cost is low (~ 15cents/hour for the smallest virtual computer)\n",
"- You will need a credit card, so they could charge you for use of computingafter the trial period has expired.\n",
"- You will need a credit card, so they could charge you for use of computing after the trial period has expired.\n",
"\n",
"### To create the subscription\n",
"To create an Azure Machine Learning (AzureML) subscription where you can run the Jupyter Notebook tutorials, you need to first create a regular Azure subscription if you don't already have one. \n",
Expand All @@ -117,9 +117,7 @@
"|**Student (Azure for Students)**| **Free $100 credit (no credit card needed) +free services**|**Verified students (with .edu email)**|\n",
"|NIH Subscription|For CloudLab|See below|\n",
"\n",
"4. Provide a credit card for billing that subscription, if applicable\n",
"\n",
"-------------------------------------------------------------------------------------"
"4. Provide a credit card for billing that subscription, if applicable.\n"
]
},
{
Expand Down Expand Up @@ -148,7 +146,7 @@
"source": [
"# Step 3: Create a workspace\n",
"\n",
"AzureML requires that you do all of your cloud computing in a \"workspace. They imagine that you might have several distinct projects. You *can* run all of your NIH tutorials in a single workspace.\n",
"AzureML requires that you do all of your cloud computing in a workspace. They imagine that you might have several distinct projects. You *can* run all of your NIH tutorials in a single workspace.\n",
"\n",
"To create your workspace, select this button from the home screen of a different part of Azure: [Azure ML](https://ml.azure.com/)\n",
"\n",
Expand Down Expand Up @@ -200,7 +198,7 @@
"source": [
"## Step 4: Open a Jupyter notebook\n",
"\n",
"In Azure, after you've loaded in some notebooks, you need to open the folder, then double click on a notebook so it will open. IN the image below, the arrow shows where you can find the list of notebooks. Circled is the button to expand the notebook & shrink the file structure. \n",
"In Azure, after you've loaded in some notebooks, you need to open the folder, then double click on a notebook so it will open. In the image below, the arrow shows where you can find the list of notebooks. Circled is the button to expand the notebook & shrink the file structure. \n",
"\n",
"![opening_notebook.png](./images/opening_notebook.png)\n",
"\n",
Expand Down Expand Up @@ -277,8 +275,7 @@
"metadata": {},
"source": [
"## Clean up\n",
"<div class=\"alert alert-block alert-warning\"> <b>Attention:</b> To avoid unnecessary charges, please STOP your compute instance if you started one</a>. </div>\n",
"(you did not NEED a compute instance to run anything on this page)"
"<div class=\"alert alert-block alert-warning\"> <b>Attention:</b> To avoid unnecessary charges, please STOP your compute instance if you started one</a>. </div>\n"
]
}
],
Expand All @@ -298,7 +295,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.12.9"
}
},
"nbformat": 4,
Expand Down
14 changes: 11 additions & 3 deletions Submodule 0/Submodule_0_Tutorial_3b_AzureML_CloudLab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"source": [
"# Step 2: Using Azure\n",
"\n",
"You should be able to return to the [AzureML module](Submodule_0_Tutoral_3_AzureML.ipynb), starting at step 3, to make a workspace and use your <u>NIH subscription.</u> The latter is what is paying for your cloud *computing* so you must have a subsription to select. \n"
"You should be able to return to the [AzureML module](Submodule_0_Tutoral_3_AzureML.ipynb), starting at step 3, to make a workspace and use your NIH subscription. The latter is what is paying for your cloud computing so you must have a subsription to select. \n"
]
},
{
Expand All @@ -57,8 +57,16 @@
"metadata": {},
"source": [
"# Conclusion\n",
"This mini-tutorial was designed to direct you to the NIH CloudLab information. You do not have to use CloudLab; you can use pay-as-you-go on Azure and other Cloud Computing platforms. Regardless of what tool you use, be sure to **always turn off the computer (\"compute instance\")** when you leave. Even tens-of-cents an hour can add up if you forget it's running."
"This mini-tutorial was designed to direct you to the NIH CloudLab information. You do not have to use CloudLab; you can use pay-as-you-go on Azure and other cloud Ccmputing platforms. Regardless of what tool you use, be sure to **always turn off the computer (\"compute instance\")** when you leave. Even tens-of-cents an hour can add up if you forget it's running."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c3a43538-9d16-47b0-9bbb-855675d125cb",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -77,7 +85,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.12.9"
}
},
"nbformat": 4,
Expand Down
17 changes: 7 additions & 10 deletions Submodule 0/Submodule_0_Tutorial_4_GitHub4You.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ By the end of this lesson, you will be able to:
## Prerequisites
None

-------------------------------------------

# FAIR Data principles

You may already have seen that the NIH requires researchers to share their data in ways that make it FAIR to maximize its value. Ensuring data is well-documented, openly available, and in standardized formats not only enhances transparency and collaboration but also aligns with NIH’s commitment to advancing scientific discovery.
Expand Down Expand Up @@ -119,9 +117,9 @@ Before you can start using GitHub for your materials, you need to create an acco
To get started, you need to sign up for a free GitHub account. This will give you access to your own profile, repositories, and collaboration tools. Follow the steps below to create your GitHub account.

- Go to GitHub's website
- Click on Sign up in the top-right corner.
- Click on 'Sign up' in the top-right corner.
- Enter your email address, username, and password.
- Click Create an account and follow the instructions.
- Click 'Create an account' and follow the instructions.
- GitHub will send a verification email. Click the link in the email to verify your account.

<p align="center">
Expand Down Expand Up @@ -156,12 +154,11 @@ A repository (A "repo") is like a folder where you store your research data and

### Instructions
1. Open GitHub Desktop and click “File” → “New Repository”.

![NewRepository](./images/github_new_repository.png)
2. Give your repository a name (e.g., "Climate_Data_Study_2024").
3. Choose a location **on your computer** where the repository will be stored.
4. Select Private (if you are using it for your lab group). You can name "collaborators" later (students, postdocs, etc)
5. Check “Initialize this repository with a README” (important for documenting your dataset). This is the appropriate spot to include summary information about this particular repository's purpose
4. Select 'Private' (if you are using it for your lab group). You can name **collaborators** later (students, postdocs, etc).
5. Check “Initialize this repository with a README” (important for documenting your dataset). This is the appropriate spot to include summary information about this particular repository's purpose.
6. Click Create Repository.

<p align="center">
Expand Down Expand Up @@ -201,8 +198,8 @@ Once your repository is set up, you can start adding data files like Excel, CSV,

![CommitMessage](./images/commit_msg.png)

5. Click the bottom "Commit to _____" button (this saves the version to your local repository).
6. Click Push to Origin (this uploads your data to GitHub.com).
5. Click the bottom 'Commit to _____' button (this saves the version to your local repository).
6. Click 'Push to Origin' (this uploads your data to GitHub.com).
![PushImage](./images/push_origin.png)


Expand All @@ -227,7 +224,7 @@ Using GitHub Desktop, you can track protocol changes alongside your datasets.
2. Edit or add a new protocol document (e.g., data_collection_protocol_v2.docx).
3. Open GitHub Desktop, and you’ll see the updated file.
4. Write a commit message (e.g., "Updated protocol to include new sensor calibration process") as above for data
5. Click Commit to main, then Push to Origin.
5. Click 'Commit' to main, then 'Push to Origin'.

Now, every protocol update is documented and timestamped, ensuring full transparency.

Expand Down
Loading
Loading