Iris Li
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # GitHub Tutorial for Bioinformatics and Computational Biology ## 1. Why use GitHub? GitHub is a platform for storing, version-controlling, sharing, and documenting code. For bioinformatics and computational biology, GitHub is especially useful for: - Keeping track of analysis scripts - Recording changes to code over time - Sharing reproducible workflows - Collaborating with lab members - Documenting software, pipelines, and tutorials - Building a visible research portfolio In short: > Git tracks your code history. > GitHub lets you store and share that history online. --- ## 2. Git vs GitHub These two are related but not the same. | Tool | What it does | |---|---| | Git | A version control system on your computer | | GitHub | An online platform that hosts Git repositories | You use **Git** locally, then push your work to **GitHub**. --- ## 3. Basic vocabulary | Term | Meaning | |---|---| | Repository / repo | A project folder tracked by Git | | Commit | A saved snapshot of your changes | | Branch | A separate version of your project | | Push | Upload local commits to GitHub | | Pull | Download updates from GitHub | | Clone | Download a GitHub repo to your computer | | README | The front page documentation of a repo | | `.gitignore` | A file telling Git what not to track | --- ## 4. Install Git Check whether Git is already installed: ```bash git --version ``` --- ## 5. Set up your Git identity You only need to do this once on a computer. ```bash git config --global user.name "Your Name" git config --global user.email "your_email@example.com" ``` Check your settings: ```bash git config --global --list ``` --- ## 6. Create a new project folder Example: ```bash mkdir my_scRNAseq_project cd my_scRNAseq_project ``` Initialize Git: ```bash git init ``` Now this folder is a Git repository. --- ## 7. Recommended project structure for bioinformatics A simple structure: ```text my_scRNAseq_project/ ├── README.md ├── scripts/ │ ├── 01_qc.py │ ├── 02_clustering.py │ └── 03_marker_analysis.py ├── notebooks/ │ └── exploratory_analysis.ipynb ├── results/ │ ├── figures/ │ └── tables/ ├── data/ │ └── README.md ├── env/ │ └── environment.yml ├── docs/ │ └── notes.md └── .gitignore ``` Suggested usage: | Folder | Purpose | |---|---| | `scripts/` | Main reusable analysis scripts | | `notebooks/` | Exploratory work | | `results/` | Figures and result tables | | `data/` | Data information, not usually raw data | | `env/` | Conda or pip environment files | | `docs/` | Notes, protocol, methods explanation | --- ## 8. What should not be uploaded? In bioinformatics, avoid uploading: - Raw sequencing data - Large `.fastq`, `.bam`, `.h5ad`, `.rds`, `.loom`, `.h5` files - Private patient or clinical data - Passwords or API keys - Huge intermediate files > GitHub officially recommends keeping repositories under 1 GB, and strongly recommends staying under 5 GB for performance and maintainability. Individual files over 100 MB are blocked entirely. Instead, upload: - Scripts - Small example data - Metadata templates - Documentation - Environment files - Instructions for downloading or generating data ## 9. Create a `.gitignore` Therefore, it is important to setup .gitignore. A `.gitignore` file tells Git which files to ignore. Example `.gitignore` for bioinformatics: ```gitignore # Large data files *.fastq *.fastq.gz *.fq *.fq.gz *.bam *.sam *.cram *.vcf *.vcf.gz *.h5 *.h5ad *.rds *.loom # Large folders data/raw/ data/processed/ results/intermediate/ # Python __pycache__/ *.pyc .ipynb_checkpoints/ # R .Rhistory .RData .Rproj.user/ # Conda environments .conda/ .env/ # System files for Mac users .DS_Store # Secrets *.key *.pem .env config_private.yaml ``` Create the file: ```bash touch .gitignore ``` Then edit it using your text editor. --- ## 10. Check project status To see what has changed: ```bash git status ``` This tells you which files are: - Untracked - Modified - Staged - Ready to commit --- ## 11. Add files to Git Add one file: ```bash git add README.md ``` Add everything: ```bash git add . ``` Be careful with `git add .`. Always check first: ```bash git status ``` --- ## 12. Commit your changes A commit is a saved checkpoint. ```bash git commit -m "Initial project setup" ``` Good commit messages are short but informative. Examples: ```bash git commit -m "Add Scanpy QC script" git commit -m "Update clustering workflow" git commit -m "Fix marker gene plotting function" git commit -m "Add conda environment file" ``` Avoid vague messages like: ```bash git commit -m "update" git commit -m "stuff" git commit -m "final final version" ``` --- ## 13. Create a GitHub repository On GitHub: 1. Go to GitHub. 2. Click **New repository**. 3. Choose a repository name. 4. Choose public or private. 5. Do not initialize with README if you already have one locally. 6. Click **Create repository**. Then connect your local repo to GitHub. Example: ```bash git remote add origin https://github.com/your_username/my_scRNAseq_project.git ``` Push your code: ```bash git branch -M main git push -u origin main ``` --- ## 14. Clone an existing repository To download a GitHub repo: ```bash git clone https://github.com/username/repository_name.git ``` Then enter the folder: ```bash cd repository_name ``` --- ## 15. Pull updates from GitHub Before working, especially in a shared project: ```bash git pull ``` This downloads the latest changes from GitHub. --- ## 16. A simple daily workflow A common workflow: ```bash git status git pull # edit scripts git status git add . git commit -m "Describe what changed" git push ``` For example: ```bash git status git add scripts/01_qc.py git commit -m "Add mitochondrial filtering to QC script" git push ``` --- ## 17. Writing a useful README Every bioinformatics repo should have a clear `README.md`. A simple README structure: ```{md} # Project title ## Overview Briefly describe the project. ## Data Describe the dataset used. Do not upload private or large raw data directly unless appropriate. ## Environment Explain how to install dependencies. Example: ```{bash} conda env create -f env/environment.yml conda activate my_env ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully