Genomic Informatics for Beginners #2
This is a summary of the lecture content for the ourse ‘Shotgun Sequencing – Principle and Experiments’ 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.
Lets try some updated Hello World script using variables
vi HelloWorld_today.sh
#!/usr/bin/sh
echo "Hello teacher!"
echo "The current time is $(date -R)."
The variable ($) symbol, hashtag (#) symbol in the script
vi greet.sh
#!/usr/bin/bash
echo "What is your name? "
read name
echo "Hello $name."
Lets try another greeting using ‘whoami’
#!/usr/bin/bash
# This script greets the user by name
name=$(whoami)
echo "Hello, $name! How are you today?"
Python
Work with python
$ python3
Python 3.9.13 (main, Aug 25 2022, 23:26:10)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
The ‘Hello world!’
>>> print ("Hello World!")
Hello World!
control-D to quit
More practice on editing/running scripts
vi helloworld.py
print("Hello, world!")
run the python script
$ python3 greet.py
Hello, world!
Try this:
name = input("What is your name? ")
print("Hello, " + name + "! Nice to meet you.")
X + Y = ?
Variable types – integers, floating-point numbers, strings
Conda
an open source package management system and environment management system
conda create environment
conda activate
conda install
conda activate
Assembly of shotgun sequencing data
unicycler (another post)
SFTP – file transport
> sftp username@ip.address
pwd
ls
cd
mkdir
lls
lcd
lmkdir
get
put
mget
mput
rm
rmdir
bye
Handling archive files
tar-cvc [archive file] [file | directories]
tar -cvf allgenomes.tar *.gb
tar -tvf allgenomes.tar *.gb
tar -xvf allgenomes.tar *.gb
gzip, gunzip
Visualization of the assembly results (Windows)
to be continued…