{"id":1144,"date":"2023-05-03T08:38:21","date_gmt":"2023-05-03T08:38:21","guid":{"rendered":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/?p=1144"},"modified":"2024-06-04T13:36:47","modified_gmt":"2024-06-04T13:36:47","slug":"genomic-informatics-for-beginners-2","status":"publish","type":"post","link":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/?p=1144","title":{"rendered":"Genomic Informatics for Beginners #2"},"content":{"rendered":"\n<p>This is a summary of the lecture content for the ourse &#8216;Shotgun Sequencing &#8211; Principle and Experiments&#8217; in IGB, NCHU. This course module is designed to enable students with basic computer skills to utilize some bioinformatics software to perform analysis of genomic data. The second part of this course will explore more in using shell scripts and also scripts using Python.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Lets try some updated Hello World script using variables<\/h2>\n\n\n\n<p>vi HelloWorld_today.sh<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>#!\/usr\/bin\/sh<br>echo \"Hello teacher!\"<br>echo \"The current time is $(date -R).\"<\/code><\/pre>\n\n\n\n<p>The variable ($) symbol, hashtag (#) symbol in the script<\/p>\n\n\n\n<p>vi greet.sh<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>#!\/usr\/bin\/bash\necho \"What is your name? \"\nread name\necho \"Hello $name.\"<\/code><\/pre>\n\n\n\n<p>Lets try another greeting using &#8216;whoami&#8217;<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>#!\/usr\/bin\/bash\n# This script greets the user by name\nname=$(whoami)\necho \"Hello, $name! How are you today?\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Python<\/h2>\n\n\n\n<p>Work with python<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>$ python3\nPython 3.9.13 (main, Aug 25 2022, 23:26:10) \n&#91;GCC 11.2.0] :: Anaconda, Inc. on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n&gt;&gt;&gt; <\/code><\/pre>\n\n\n\n<p>The &#8216;Hello world!&#8217;<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>&gt;&gt;&gt; print (\"Hello World!\")\nHello World!<\/code><\/pre>\n\n\n\n<p>control-D to quit<br>More practice on editing\/running scripts<\/p>\n\n\n\n<p>vi helloworld.py<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>print(\"Hello, world!\")<\/code><\/pre>\n\n\n\n<p>run the python script<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>$ python3 greet.py\nHello, world!<\/code><\/pre>\n\n\n\n<p>Try this:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>name = input(\"What is your name? \")\nprint(\"Hello, \" + name + \"! Nice to meet you.\")<\/code><\/pre>\n\n\n\n<p>X + Y = ?<br>Variable types &#8211; integers, floating-point numbers, strings<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><br>Conda<\/h2>\n\n\n\n<p>an open source package management system and environment management system<br>conda create environment<br>conda activate<br>conda install<br>conda activate<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Assembly of shotgun sequencing data<\/h2>\n\n\n\n<p>unicycler (<a href=\"http:\/\/megagenome.nchu.edu.tw\/wordpress\/?p=1078\" data-type=\"URL\" data-id=\"megagenome.nchu.edu.tw\/wordpress\/?p=1078\">another post<\/a>)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SFTP &#8211; file transport<\/h2>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>&gt; sftp username@ip.address<\/code><\/pre>\n\n\n\n<p><strong>Navigating<\/strong><\/p>\n\n\n\n<p>pwd \u2013 Print the working directory on the remote server.<br>lpwd \u2013 Print the working directory on the local machine.<br>cd \u2013 Change the directory on the remote server.<br>lcd \u2013 Change the directory on the local machine.<\/p>\n\n\n\n<p><strong>Listing<\/strong><\/p>\n\n\n\n<p>ls \u2013 List files in the current directory on the remote server.<br>lls \u2013 List files in the current directory on the local machine.<\/p>\n\n\n\n<p><strong>Transfer files<\/strong><\/p>\n\n\n\n<p>get \u2013 Download a file from the remote server to the local machine.<br>put \u2013 Upload a file from the local machine to the remote server.<\/p>\n\n\n\n<p><strong>File management<\/strong><\/p>\n\n\n\n<p>rm \u2013 Remove a file on the remote server.<br>mkdir \u2013 Create a directory on the remote server.<br>rmdir \u2013 Remove a directory on the remote server.<\/p>\n\n\n\n<p><strong>Leaving SFTP<\/strong><\/p>\n\n\n\n<p>bye or exit \u2013 Close the SFTP session.<\/p>\n\n\n\n<p>tar-cvc [archive file] [file | directories]<br>tar -cvf allgenomes.tar *.gb<br>tar -tvf allgenomes.tar *.gb<br>tar -xvf allgenomes.tar *.gb<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Handling archive files<\/h2>\n\n\n\n<p>tar-cvc [archive file] [file | directories]<br>tar -cvf allgenomes.tar *.gb<br>tar -tvf allgenomes.tar *.gb<br>tar -xvf allgenomes.tar *.gb<\/p>\n\n\n\n<p>gzip, gunzip<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Visualization of the assembly results (Windows)<\/h2>\n\n\n\n<p>to be continued&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a summary of the lecture content for the ourse &#8216;Shotgun Sequencing &#8211; Principle and Experiments&#8217; in IGB, NCHU.<\/p>\n","protected":false},"author":1,"featured_media":1700,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"no_sidebar_full_width","colormag_page_sidebar_layout":"no_sidebar","footnotes":""},"categories":[5],"tags":[15,14,31,18],"class_list":["post-1144","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-bioinformatics","tag-genomics","tag-lecture-notes","tag-linux"],"magazineBlocksPostFeaturedMedia":{"thumbnail":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5-150x150.jpg","medium":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5-300x225.jpg","medium_large":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5-768x576.jpg","large":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5-1024x768.jpg","1536x1536":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5-1536x1152.jpg","2048x2048":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5.jpg","colormag-highlighted-post":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5-392x272.jpg","colormag-featured-post-medium":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5-390x205.jpg","colormag-featured-post-small":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5-130x90.jpg","colormag-featured-image":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5-800x445.jpg","colormag-default-news":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5-150x150.jpg","colormag-featured-image-large":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5-1400x600.jpg"},"magazineBlocksPostAuthor":{"name":"onion","avatar":"https:\/\/secure.gravatar.com\/avatar\/a596197721c6296d27446d1377ed931e199d7d76ae4dedbebf95195b579de271?s=96&d=mm&r=g"},"magazineBlocksPostCommentsNumber":false,"magazineBlocksPostExcerpt":"This is a summary of the lecture content for the ourse &#8216;Shotgun Sequencing &#8211; Principle and Experiments&#8217; in IGB, NCHU.","magazineBlocksPostCategories":["blog"],"magazineBlocksPostViewCount":5,"magazineBlocksPostReadTime":3,"magazine_blocks_featured_image_url":{"full":["https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5.jpg",1600,1200,false],"medium":["https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5-300x225.jpg",300,225,true],"thumbnail":["https:\/\/megagenome.nchu.edu.tw\/wordpress\/wp-content\/uploads\/2024\/05\/blogheader-5-150x150.jpg",150,150,true]},"magazine_blocks_author":{"display_name":"onion","author_link":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/?author=1"},"magazine_blocks_comment":0,"magazine_blocks_author_image":"https:\/\/secure.gravatar.com\/avatar\/a596197721c6296d27446d1377ed931e199d7d76ae4dedbebf95195b579de271?s=96&d=mm&r=g","magazine_blocks_category":"<a href=\"#\" class=\"category-link category-link-5\">blog<\/a>","_links":{"self":[{"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1144"}],"version-history":[{"count":22,"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1144\/revisions"}],"predecessor-version":[{"id":1764,"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1144\/revisions\/1764"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/1700"}],"wp:attachment":[{"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/megagenome.nchu.edu.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}