1. 리눅스 시스템 업데이트
sudo apt-get update && sudo apt-get upgrade -y
- 설치 된 모든 패키지를 업데이트 함
2. 필요한 리눅스 라이브러리 설치 및 자바 설치
sudo apt-get install -y curl unzip build-essential ncurses-dev
sudo apt-get install -y byacc zlib1g-dev python-dev git cmake
sudo apt-get install -y default-jdk ant
- 우분투에서는 위 세가지는 거의 필수적.
3. 터미널 셋업
3.1 터미널 구성을 어떻게 시작할 것인가
- 몇 줄이면 충분하다. 터미널을 열고 아래 코드를 한번만 실행시키면 됨
curl http://data.biostarhandbook.com/install/bash_profile.txt >> ~/.bash_profile
curl http://data.biostarhandbook.com/install/bashrc.txt >> ~/.bashrc
- 이 명령어는 “shell”이라 부르는 것을 업데이트 해주며, 일관되게 동작시킴.
- 위 설정이 곧바로 적용되는 것은 아니니 재시작 또는 아래 코드를 입력
source ~/.bash_profile
4. 아나콘다 설치
4.1 아나콘다 심플버전 미니콘다 설치
- 미니콘다 설치
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
- 그러면 파이썬부터 깔리고, library들이 깔린뒤
- 터미널을 끄고 다시 새로 실행시킨뒤
conda
를 입력하면
4.2 콘다로 파이썬 3.6 버전 가상환경 구축
bioinfo
라는 이름으로 파이썬 3.6버전으로 설치
conda create -y --name bioinfo python=3.6
- 가상환경 활성화
conda activate bioinfo 또는 source activate bioinfo
biostar handbook에서는 source activate 를 추천하지만 나는
conda activate
를 사용하였음 참고링크
4.3 Bioconda를 conda channel에 등록
Bioconda is a channle for distributing bioinformatics software that can be enabled in the Conda package manager. This operation only needs to be done once — from. bioconda handbook
- 요약 : 콘다 패키지 형태로 bioconda가 배포되니까 아래 명령어로 바이오콘다 채널을 콘다에 등록해 주세요. 한번만 하면 되요.
conda config --add channels r
conda config --add channels conda-forge
conda config --add channels bioconda
5. 툴 셋업
- biostar handbook에서 사용되는 툴을 아래와 같이 설치 할 수 있다. 꼭 가상환경을 먼저 활성화 시킬 것. (준수한 카페 와이파이로 ~15분정도 소요)
conda activate bioinfocurl http://data.biostarhandbook.com/install/conda.txt | xargs conda install -y
- 중간에 인터넷 연결이 불안정한 경우 아래와 같은 에러가 뜰 수 있다. 침착하게
curl
이하 명령어를 똑같이 입력해주자.
- 툴을 최신버전으로 유지하려면
curl http://data.biostarhandbook.com/install/conda.txt | xargs conda upgrade
6. R, R studio 설치
- R이 필수는 아닌 듯 하나, 많은 경우 R을 이용하여 bioinformatics를 진행하므로 설치 해두는 걸 권장함.
Only some of the later chapters use R but the doctor.py checks for the right version of it. We recommend to have the R programming available. Since you are already installing programs why not get this done as well. Installing R is fairly straigthforward, download and doubleclick the installer from
https://www.r-project.org/
그러나 안내 자체는 거의 부실하므로 아래 포스트를 참고함.
6.1 R base 설치
sudo echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/" | sudo tee -a /etc/apt/sources.listgpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9gpg -a --export E084DAB9 | sudo apt-key add -sudo apt-get updatesudo apt-get install r-base r-base-dev
6.2 R studio 설치
아래사이트 접속 후 https://www.rstudio.com/products/rstudio/download2/#download
더블클릭으로 실행 후
7. 설치환경 검사하기
We have created a script that verifies that your settings are correct. Throughout the book, if any one of our instructions causes an error, your first choice will be to see what the doctor says :-) In our experience when the “doctor” is happy all of our examples work. — biostar handbook
7.1 doctor.py 다운로드 및 실행
- 다운로드
mkdir -p ~/bincurl http://data.biostarhandbook.com/install/doctor.py > ~/bin/doctor.pychmod +x ~/bin/doctor.py
- 실행
~/bin/doctor.py
- 결과
# Doctor! Doctor! Give me the news.
# Checking 13 symptoms...
# Optional program not found: global-align.sh
# Optional program not found: local-align.sh
# You are doing well!
7.2 doctor.py로 진단 및 해결
- 진단
doctor.py --fixme
- 해결
doctor.py --fixme | bash
참고문헌
Biostar-handbook-September-2018.pdf — The Biostar Handbook
(바이오스타에서 $25 에 유료 구입)