Won Cheol Yim
    • 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

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

    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.
    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
    # Joel Joel.md # Ubuntu WSL2 setup ### Basic component installation by `apt-get install` `sudo apt-get --yes update` `sudo apt-get --yes upgrade` `sudo apt-get --yes dist-upgrade` `sudo apt-get --yes autoremove` `sudo apt-get --yes install build-essential checkinstall libgtk2.0-dev freeglut3-dev libfreetype6-dev libqhull-dev qhull-bin libqhull7 dvipng ghostscript texlive-latex-base poppler-utils python-gobject-2-dev python-gobject python-gi-dev libffi-dev python-numpy default-jre libmldbm-perl libcdb-file-perl libdb5.3++-dev libdb5.3++ hmmer ncbi-tools-bin blast2 cd-hit libcurl4-openssl-dev libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libgtk2.0-dev python2.7 libssh2-1-dev last-align texlive texlive-latex-extra texlive-latex-recommended gifsicle ffmpeg imagemagick uuid-dev elinks links2 python-tk mysql-server libmysqlclient-dev liblzma-dev zip binutils-multiarch bison++ byacc cmake make freebsd-buildutils samtools hdf5-tools libhdf5-serial-dev mercurial r-cran-rcpparmadillo libblas-dev liblapack-dev libgd-dev expat pandoc ttf-mscorefonts-installer python-pysam python-htseq liblzo2-dev zlib1g-dev openssh-server` ## Bashrc ![](https://hackmd.io/_uploads/Bkownuwun.png) ![](https://hackmd.io/_uploads/BJet3_D_n.png) bashrc is a shell script located in the user home that is used to customise the terminal session For example to load a module you can add the line: `module load <module>` To modify an environment variable, like PATH, add the line: `export PATH=$PATH:<path/to/dir>` to activate a Python environment is as simple as adding the line: `source <path/to/env>/bin/activate` ### Prompt `tty -s && export PS1="\[\033[38;5;164m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;231m\]@\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;2m\]\h\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;172m\]\t\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;2m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]\n \[$(tput sgr0)\]"` ## Ln for scratch https://www.unixtutorial.org/commands/ln#:~:text=ln%20command%20is%20a%20Unix,already%20existing%20files%20or%20directories. ## SCP the `scp` (secureshell copy) is a command-line utility that allows you to share files between different hosts or locations. It uses ssh for data transfer and provides the same security level - both files and passwords are encrypted. You can copy files or directory: * from you local system to a remote system * from a remote system to your local system * between two remote systems from your local system ### SCP command syntax `scp [OPTION] [user@]SRC_HOST:]file1 [user@]DEST_HOST:]file2` * `OPTION` - scp options [-c cipher|-F ssh_config|-P remote host ssh port|-l limit|...] * [user@]SRC_HOST:]file1 - source file * [user@]DEST_HOST:]file2 - destination file To be able to copy files, you must have at least read permissions on the source file and write permission on the target system NB: when copying files that share the same name and location on both systems, scp will overwrite files without warning. Examples: Copying files * copy the file "example.txt" from a remote host to the local host `scp username@remotehost.edu:example.txt /some/local/directory` * copy the file "example.txt" from the local host to a remote host `scp example.txt username@remotehost.edu:/some/remote/directory` * Copy the files "example_1.txt" and "example_2.txt" from the local host to your home directory on the remote host `scp example_1.txt example_2.txt ihinne@pronghorn.rc.unr.edu:~` * Copy the file "example.txt" from remote host "remotehost_1.edu" to remote host "remotehost_2.edu" `scp username@remotehost_1.edu:remote/directory/example.txt username@remotehost_2.edu:/remote/directory` Copying directories * Copy the directory "example_a" from the local host to a remote host's directory "example_b" `scp -r example_a ihinne@remotehost.edu:/some/remote/directory/example_b ` * Copy an entire directory from one host to another `scp -r /local/directory username@remotehost.edu:/remote/directory` syncing files via rsync Rsync provides many options for passing arguments to augment it's functionality. In the examples below we will use: * -a flag: Stands for "archive" and syncs recursively and preserves symbolic links, special and device files, modification times, group, owner, and permissions. * -z flag: Compresses files during transfer. * -P flag: Combines the flags --progress and --partial. The first of these gives you a progress bar for the transfers and the second allows you to resume interrupted transfers: The following command is a "push" operation because it pushes (syncs) a local directory to a remote system. `rsync -azP ~/some/local/source/directory username@remotehost:/some/remote/destination/directory` Conversely, a "pull" operation is used to sync a remote directory to the local system. `rsync -azP username@remote_host:/some/remote/destination/directory ~/some/local/directory` ## CHMOD File and Directory Permissions `-rw-r--r-- 1 exampleuser examplegroup 4096 Apr 4 04:20 example.txt` The file's mode represents the file's permissions and some extra information. There are five parts to the mode. part 1: - (file or directory) part 2: rw- (user permissions) part 3: r-- (group permissions) part 4: r-- (other permissions) part 5: (special attributes) The first character of the mode (part 1) is the file type. It can be a regular file or a directory. Each file and directory has three user based permission groups which break down into three sets: `user` part 2, `group` part 3, and `other` part 4. part 1: A dash (-) in this position, as in the example, denotes a regular file, meaning that there is nothing special about the file. This is by far the most common kind of file. Directories are also common and are indicated by a d in the file type slot. part 2: `user (u)` - The Owner permissions apply only the owner of the file or directory, they will not impact the actions of other users. part 3: `group (g)` - The Group permissions apply only to the group that has been assigned to the file or directory, they will not effect the actions of other users. part 4: `other (o)` - The All Users permissions apply to all other users on the system, this is the permission group that you want to watch the most. part 5: `Directory Set Group ID` - There are two special bits in the permissions field of directories. `s` - Set group ID `t` - Save text attribute (sticky bit) - The user may delete or modify only those files in the directory that they own or have write permission for. Each permission set can contain four basic representations: `r` : the file is readable. Refers to a user's capability to read the contents of the file. `w` : the file is writable. Refers to a user's capability to write or modify a file or directory. `x` : the file is executable. Refers to a user's capability to execute a file or view the contents of a directory. `s` : Some executable files have an s in the user permissions listing instead of an x. This indicates that the executable is setuid, meaning that when you execute the program, it runs as though the file owner is the user instead of you. Many programs use this setuid bit to run as root in order to get the privileges they need to change system files. - : null value (nothing). Modifying Permissions `chmod` : Changes the file mode bits of each given file according to mode, which can be either a symbolic representation of changes to make, or an octal number representing the bit pattern for the new mode bits. `chown` : Changes the user and/or group ownership of each given file. `chgrp` : Change the group of a file or directory. chmod - change mode To change permissions, use the chmod command. The chmod (change mode) command protects files and directories from unauthorized users on the same system, by setting access permissions. Syntax `chmod options permissions file name` `chmod [OPTION]... MODE[,MODE]... FILE...` `chmod [OPTION]... OCTAL-MODE FILE...` `chmod [OPTION]... --reference=RFILE FILE...` Some examples: Private file for you `chmod 600 myfile` `chmod u=rw myfile` Everyone can read; you can write `chmod 644 myfile` `chmod u=rw,g=rw,o=rw myfile` Private directory for you `chmod 700 mydir` Everyone can read; you can write `chmod 755 mydir` `chmod u=rwx,g=r,o=r mydir` * 4 stands for "read", * 2 stands for "write", * 1 stands for "execute", and * 0 stands for "no permission" So 7 is the combination of permissions 4+2+1 (read, write, and execute), 5 is 4+0+1 (read, no write, and execute), and 4 is 4+0+0 (read, no write, and no execute). set the ownership of myfile to mrrobot `chown mrrobot myfile` set the ownership of the directory and all files in mydirectory to mrrobot `chown -R mrrobot mydirectory` set the group ownership of myfile to mrrobot `chgrp mrrobot myfile` set the group ownership of the directory and all files in mydirectory to mrrobot `chgrp -R mrrobot mydirectory` ## VIM VI ## Sublimetext move line - `ctrl + shift + arrow` duplicate - `ctrl + shift + d` delete line - `ctrl + shift + k` indent line - `ctrl + [ or ]` select text -> edit tab -> Line -> Reindent paste and indent - `ctrl + shift + v` ## HPC ![](https://hackmd.io/_uploads/SJiljQ-62.png) ## Sorghum project. ### Weblogo3 ![](https://hackmd.io/_uploads/rJNScfbTn.png) 1. get sequences from Pronghorn /data/gpfs/assoc/pgl/data/SDLIM/RING_working/sbi_domain_class.fasta 2. Seperate sequences based on class RING-C2 RING-G RING-H2 RING-HC RING-ST RING-v 3. Align sequences by Muscle ``` muscle3.8.31_i86linux32 -in domain_only_seperate3.fasta -out domain_only_seperate4.fasta -maxiters 1 -diags ``` 4. Draw the WebLogo https://weblogo.threeplusone.com/manual.html#CLI ### Circos ![](https://hackmd.io/_uploads/B11rczZa2.png) RING-C2 RING-G RING-H2 RING-HC RING-ST RING-v High to low #e41a1c #377eb8 #4daf4a #984ea3 #ff7f00 #ffff33 https://colorbrewer2.org/#type=qualitative&scheme=Set1&n=6 ### JGI https://data.jgi.doe.gov/refine-download/phytozome?organism=Sbicolor&expanded=454 Sorghum bicolor v3.1.1 Sbicolor_454_v3.0.1.fa.gz - genome file Sbicolor_454_v3.1.1.gene.gff3.gz - gene coordinate file 1. Chromosome number - egrep ">" Sbicolor_454_v3.0.1.fa - Scafflod, unanchored etc 2. Chromosome size - samtools faidx 3. Gene location in Sbicolor_454_v3.1.1.gene.gff3.gz gff3 https://useast.ensembl.org/info/website/upload/gff3.html ShinyCircos https://venyao.xyz/shinycircos/ please go to help. ### Results - Weblogo 1. Sequences were obtained via pronghorn: `/data/gpfs/assoc/pgl/data/SDLIM/RING_working/sbi_domain_class.fasta` 2. Sequences were organized base on the 6 different classes: a)RING-C2 b)RING-G c)RING-H2 d)RING-HC e)RING-ST f)RING-v 3. Sequences were algiend via muscle: a)`muscle -in Sobic_C2_class - out aligned_C2.Fasta` b)`muscle -in Sobic_G_class - out aligned_G.Fasta` c)`muscle -in Sobic_H2_class - out aligned_H2.Fasta` d)`muscle -in Sobic_HC_class - out aligned_HC.Fasta` e)`muscle -in Sobic_ST_class - out aligned_ST.Fasta` f)`muscle -in Sobic_V_class - out aligned_V.Fasta` 4.Result Weblogo All the Weblogo images has a dimension size of 1920 x 500 pixels a)Weblogo C2 ![](https://hackmd.io/_uploads/H1I2sEpp2.png) b)Weblogo G ![](https://hackmd.io/_uploads/B10lhEpa3.png) c)Weblogo H2 ![](https://hackmd.io/_uploads/B1nb2Naah.png) d)Weblogo HC ![](https://hackmd.io/_uploads/BJVGhVaT2.png) e)Weblogo ST ![](https://hackmd.io/_uploads/ryhfnNpp2.png) f)Weblogo V ![](https://hackmd.io/_uploads/rkOQnEppn.png) ### Results - Circos 1. The highest Gene number corresponds with these colors (in hexadecimals) a)RING-C2 : #984ea3 b)RING-G : #ff7f00 c)RING-H2 : #e41a1c d)RING-HC : #377eb8 e)RING-ST : #ffff33 f)RING-v : #4daf4a 2. Sorbic bicolor genome and genes were download: https://data.jgi.doe.gov/refine-download/phytozome?organism=Sbicolor&expanded=454 a)Under this url, File were located under: -> Sorhum bicolor v3.1.1 -> Sbicolor_454_v3.0.1.fa.gz (The genome file containing Chromosome 1 - 10 along with super chromosome) -> Sbicolor_454_v3.1.1.gene.gff3.gz (Contains the gene/mRNA/CDS/etc information about the Chromosomes) 3. Chromosome size were obtained using Sbicolor_454_v3.0.1.fa.gz as the input file and using the`samtools faidx` function to get the size. -Note: The Super chromosome ID was removed 4. Chromosome number, gene, starting and ending, and the ID were organized from Sbicolor_454_v3.1.1.gene.gff3.gz file. 5. 2 .csv files were created in order to meet the format of ShinyCircos a)Chromosome size: Sbicolor_454_v3.0.1.fa.gz > .csv format = chr, start, end > Ex) Chr01, 1, 80884392 b)Chromosome information: Sbicolor_454_v3.1.1.gene.gff3.gz > .csv format = chr, start, end, label > Ex) Chr01, 1951, 2616, Sobic.001G000100.v3.2 ## Scratch location in Pronghorn your scratch folder location We used to use the location as `~/scratch` by using ln command `/data/gpfs/assoc/pgl/joel` https://www.geeksforgeeks.org/ln-command-in-linux-with-examples ![](https://hackmd.io/_uploads/ryQ1eIvyT.png) ![](https://hackmd.io/_uploads/rJtzeUD16.png) https://stackoverflow.com/questions/72798310/adding-extra-track-to-outside-of-circos-plot-circlize-chorddiagram ```ruby library(circlize) links <- data.frame(from = c("A", "B", "C", "B", "C"), to = c("D", "E", "F", "D", "E"), value = c(1, 1, 1, 1, 1)) categories <- data.frame(from = c("D", "E", "F", "D", "E"), to = c("X", "X", "Y", "Y", "Y"), value = c(1, 1, 1, 1, 1)) chordDiagram(links) ``` ![](https://hackmd.io/_uploads/SJHOgLPkT.png)

    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

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    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