1.Setup
How to do our jobs efficiently and reproducibly

0) Get a Laptop or Desktop

1) Get a Linux OS

1a) docker or VM

1
##install and run a centos docker for the first time
2
docker pull centos
3
docker run -it --name=centos -h centos -v /Users/john/Documents/centos/:/mac centos
4
# docker run -it --name=container_name -h hostname -v /HOST_ABSOLUTE_DIR:/CONTAINER_ABSOLUTE_DIR image_name:tag
5
# simple version docker run -it centos
6
7
##add user
8
useradd john
9
passwd john
10
su john
11
12
###detach (pause) and attach
13
ctrl+p+q # detach退出: 容器不关闭,容器内部正在运行的任务不会停止. ctrl+p+q表示按住ctrl不动,先按下p,后按下q
14
docker attach container_name # attach进入
15
16
17
###exit and delete a container
18
exit #inside docker as root, then exit
19
docker rm container_name
Copied!
install basic software for centos
1
yum -y install vim
Copied!
1
yum -y install man
2
yum -y install less
3
yum -y install wget
4
5
yum -y install make
6
yum -y install gcc gcc-c++
7
yum -y install gcc-gfortran
8
9
yum -y install bzip2-devel
10
yum -y install zlib-devel
11
yum -y install zip unzip
12
13
yum -y install xz-devel.x86_64
14
yum -y install libg2c.so.0
15
yum -y install readline-devel
16
yum -y install libXt-devel
17
18
mkdir /download
19
cd /download
20
wget -c http://www.cpan.org/src/5.0/perl-5.26.1.tar.gz
21
tar -xvzf perl-5.26.1.tar.gz
22
cd /download/perl-5.26.1
23
sh Configure -de
24
make
25
make install
Copied!
You can also pull and run a ubuntu docker, then install basic software for ubuntu
docker run -it --name=ubuntu -h ubuntu -v /Users/john/Documents/unbuntu/:/mac ubuntu
1
apt-get -qq update
2
apt-get -y install vim
3
...
Copied!

1b) ssh & login

    ssh/sftp -p XXX (default: 22)
You can also using the following SFTP/FTP clients to mount the remote server to the local desktop, so you can edit the scripts with a GUI editor like Atom:
    Transmit
    Fetch (education version)

2) Learn an Editor

Learn vim and it will be your last text editor. There isn’t any better text editor that I know of. It is hard to learn, but incredible to use.I suggest you teach yourself Vim in 4 steps:
    1.
    Survive
    2.
    Feel comfortable
    3.
    Feel Better, Stronger, Faster
    4.
    Use superpowers of vim

B. Atom -- Tutorial and Tips

A hackable text editor for the 21st century

3) README and MD

Document your project using markdown language (available in wiki, gitbook, github, etc)

4) Always Backup Data Files Regularly

It's necessary to backup data regularly.

5) More Readings and Practices

      Week I.0.Setup Part I,
      Week I.1.Setup Part II
    for Beginners
《Bioinformatics Data Skills》
1) How to Learn Bioinformatics
    for Advanced Readers
《鸟哥的Linux私房菜-基础学习篇》
第25章 LINUX备份策略
25.2.2完整备份的差异备份
25.3鸟哥的备份策略
25.4灾难恢复的考虑
25.5重点回顾
《Bioinformatics Data Skills》
1) How to Learn Bioinformatics 2) Setting up and Managing a Bioinformatics Projects
4)Working with Remote Machines

Video

5a) Setup 1

@Youtube
@Bilibili

5b) Setup 2

@Youtube
@Bilibili
Last modified 3yr ago