Shannon EK Joslin
    • 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
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • 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
    • Engagement control
    • 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
Engagement control 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
Engagement control Commenting, Suggest edit, Emoji Reply
  • 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
    # DIBSI Notes for Tiger's Room: Day 1-2 [I'm a link to a markdown cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) - **Day 3** HackMD page: https://hackmd.io/CwDgZgpg7AJgTHAtBAxgVgIaOARhAZkRDQh0TQDYZwwoUAGCtfIA - **Day 4** HackMD page: https://hackmd.io/MwdgrCBGAMCmCcBaEATAxgM0QFniaiAHMAIwBMiwhGY2aa2h8AhmUA== - **Day 8** HackMD page: https://hackmd.io/MwMwDARgTBAmCGBaAjANgKwE5EBZn3UXgFN0IUSAOTYCYKVYqIA= - **Day 10** HackMD page: https://hackmd.io/MYNgrMCcDsBMAMBaYAjeAORAWAZgQz0TyxViPmklgGYQBTAE2tCA?view - **Day 11** HackMD page: https://hackmd.io/OwicEZQIwYwWgMwDMoDY4BYCm50A48s84dwE8ktUBDGLGIA= - **Day 12** HackMD page: https://hackmd.io/GwYwhgHAjA7AJgIwLRQKxWEgLBGyEKrICmqAnAgMxkAM8MUxQA==?both ## Roadmap of our process 1. Sequence super awesome biological DNA/RNA for fun and amazing science! 2. Raw data = `.fastq` output 3. Quality assessment of the reads with **FastQC** 4. Trim off the adaptors and low quality reads with **trimmomatic** 5. Alignment of sequences with **BWA/Bowtie** 6. Aligned Data **SAM/BAM** **If your goals is to do RNAseq** - Transcriptome assembly! - Differential Expression! - Variant Calling! **If you have ChipSEQ** ## Day 1 ### Running command-line BLAST *If you want extra explanation on this part of the tutorials, write here!* **it is so easy to add notes to this thing!!!** ### Running large and long command line jobs - using shmlast! * `&&` allows you to execute commands after one another * ubuntu comes with an older version of python. We want a new one, so we install a newer one (python 3.5) * `~` is a shortcut for your home directory (the directory you end up in when you connect to the server) * `curl` is a command to download things from the internet. The `-O` option redirects the downloaded data into a file instead of printing it to your screen! (can also use `wget`) * `less` is a command to read text files * `nohup` can be used to run commands that take a long time. It avoids to lose your work if you get disconnect from the server / the internet #### To get you caught up on the schmalst example * `apt get`'s `-y` parameter allows you to skip entering 'yes' ```shell # Install the necessary programs sudo apt-get -y update && \ sudo apt-get install -y python3.5-dev python3.5-venv make \ libc6-dev g++ zlib1g-dev last-align parallel python3.5 -m venv ~/py3 . ~/py3/bin/activate pip install -U pip pip install shmlast>=1.2 ``` ```shell # Download data curl -O ftp://ftp.ncbi.nih.gov/refseq/M_musculus/mRNA_Prot/mouse.1.rna.fna.gz # loop thru cow prot 1-8 # The -O option re-names the file in the destination folder the same for i in 1 2 3 4 5 6 7 8 do curl -O ftp://ftp.ncbi.nih.gov/refseq/B_taurus/mRNA_Prot/cow.$i.protein.faa.gz done gunzip -c cow.*.faa.gz > cow.faa ``` ```shell # Run shmlast! shmlast crbl -q mouse.1.rna.fna.gz -d cow.faa --n_threads=6 ``` #### A note on virtual environments Creating a python environment is good for packages and dependencies. If you have a pipeline that runs best with particular versions of programs- make a python environment and install all the particular versions of programs. Then, when you leave this environment, the intalled programs are contained. That way you do not have to install over your commonly used programs. > **Tip:** Use `deactivate` to exit a virtual environment! #### A note on loops "Loops" are a construct to execute the same command - or a set of commands - on a list of files or variables. Let's decompose our `curl` loop together: ```shell for i in 1 2 3 4 5 6 7 8 do curl -O ftp://ftp.ncbi.nih.gov/refseq/B_taurus/mRNA_Prot/cow.$i.protein.faa.gz done ``` ```shell for i in 1 2 3 4 5 6 7 8 do ``` means that `for` each of the numbers `1` to `8`, we will do something (i.e. executing a command). For each *iteration* of the loop, `i`, our variable, will take the value 1, 2, ... and 8. ```shell curl -O ftp://ftp.ncbi.nih.gov/refseq/B_taurus/mRNA_Prot/cow.$i.protein.faa.gz ``` will download data (with the `curl` command we've used earlier). Since `i` will take values 1 to 8, it means we'll download the files: * cow.1.protein.faa.gz * cow.2.protein.faa.gz * ... * cow.8.protein.faa.gz ```shell done ``` tells our loop construct is `done` for htop sudo apt - get install -y htop ## RStudio Server Several panels - each corresponding to different views of our environment. Run the command: `getwd()`. It shows the path to working directory (similar to the UNIX command `pwd`). > **Tip:** If your Institutional cluster/data center doesn't provide RStudio - but has R installed, use the infrastructure to do the heavy lifting, and install RStudio on your machine for the visuals/graphs. > If we have a variable data frame in R (in other words, a place containing structured information), we can do the following: `dim(df)`: gives the dimensions of the variable (how many rows and columns) `str(df)`: gives an overview of the structure. Each column is denoted with a `$`. `df$column`: it will print out all the data from that one column (in this case, named `column`). ### Notes from R lesson The data carpentry lessons on R can be found [here](http://www.datacarpentry.org/R-ecology-lesson/01-intro-to-r.html). The lessons are written in a self teaching structure so you can go over them while in the course or anytime you need a refresher. - functions - dplyr - challenges - etc. ## Day 2 (Wed, June 28) ### Unix lesson with Elijah Some helpful commands in the shell - `pwd`: print working directory - `ls -a` : will show you *all* of the contents in the current directory - `-l`: output in the long format . - `.`: current directory - `..`: Up a directory - `mkdir`: makes a new directory - `cd`: change directory - <path> e.i. `cd /usr/Desktop/` - `-`: previous directory - `~`: home directory > **Pro Tip:** Often when you make a directory, you next enter it. It is possible to make the directory and enter in one line: `mkdir <dir_name> && cd $_`. $ indicates that you are referring to a variable and $_ variable is the last word typed, so in our example <dir_name>. - `touch test.txt`: creates an empty file named *text.txt*. touch can also be used to refresh the last time a file has been accessed which my prevent a file from being deleted by system admins that delete data on a timed basis - `rm <filename>`: removes the filename. For ever! No turning back... - -r: recursive, used for folders (on some systems the folder must be empty) - -f: force > **Tip:** A good idea to make sure you have the right file is to `ls <filename>` first, to make sure you have the right one, and then run the actual deletion `rm <filename>`. > - `cp`: copy #### How to look at a file? - `cat` displays to the screen - `less` opens in a scrollable format - `more` the same as less, but with less functionality - `head` look at first 10 lines of a file - -num: display first num of lines ex. `head -3` displays the first 3 lines - `tail` look at last 10 lines of a file - -num: display last num of lines ex. `head -3` displays the last 3 lines `>` will write/overwrite the a file. It will take the output from a command to and direct it to a file. `>>` will append the output to a file. - `sort -n`: do a numerical sort - `grep -v saturn planets.txt > goodbye.saturn.txt` : look for *saturn* in the *planets.txt* file - `-i`: ignore case - `-v`: invert match `wc`: default counts the lines, words, bytes in a file or from standard input > **Pro Tip:** Often when you make a directory, you next enter it. It is possible to make the directory and enter in one line: `mkdir <dir_name> && cd $_`. $ indicates that you are referring to a variable and $_ variable is the last word typed, so in our example <dir_name>. > > To remove all spaces from files in current directory:`for f in *\ *; do mv "$f" "${f// /_}"; done` > ### Website with cool command-line trick for selecting and reformating data: [Grad Hustle](http://likit.github.io/category/linuxunix.html). ### Trimming and quality scores with Tristan * `md5sum` * command to verify if data that was downloaded was corrupted during the transfer * `md5sum <file1> <file2>` * `clear` * erase contents of the terminal shell * `chmod` = change modification * command to modify file permissions * read only = 444 * user | group | everyone * 4 | 4 | 4 = read only for all * if read and write = 6 * if read and write and executable = 7 * 777 = all users have read, write and executable permission for the file ## Will Trimble's Super Awesome Squencing Talk Find Videos here: http://www.mcs.anl.gov/~trimble/flowcell/ ## FastQC output **What is fastQC?** We use FastQC to assess the overall quality of raw sequencing data, and determine the parameters that are important specifically to metagenomes! **Overrepresented sequences:** If there is adapter content in your samples, it will show up here! `k-mer`: a sequence of bases (usually 7 in FastQC - so essentially a 7-mer) The quality of the reads for the first 10-15 bases, is usually lower, but this is not necessarily due to the actual quality of the read, but more of a technical decision from the Sequencer Manufacturer. ## Trimmomatic! **What is trimmomatic you ask?** When DNA sequencing takes place, errors are inevitable. No sequencing method is perfect and some are drastically different than others in regard to sequence length and quality. We're going to trim the poor quality tail end sections of our Illumina reads. Although in general Illumina reads are very high quality, this degradation at the end of the sequencing run is typical of the Illumina sequencing platforms. > **HINT** Using `which <command>` will show you if the software is installed, and where it's actually located. > Types of files: >- **SAM files**: Sequence alignment map >- **BAM files**: binary alignment map >

    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 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