折腾了那么久的生信,差不多也有一些自己常用的工具了,为了能够在任何环境下都可以快速我的工具环境,我写了一个shell脚本,亲测可用。
使用方法
第一步:下载脚本, 建议在家目录了新建一个src
文件夹,在这里面存放软件
mkdir src
cd src
wget --no-check-certificate \
https://raw.github.com/xuzhougeng/zgtoolkits/master/biosetup.sh
第二步:运行脚本,必须要表明你的安装地址
bash biosetup.sh $HOME/biostar/bioenv
第三步: 泡杯咖啡,等任务结束。白天清华源下载速度会比较慢。
如何优雅的使用这些软件呢,下次介绍如何用nextflow 定义自动化分析流程。
下面是我的脚本, 存放在我的GitHub上。写的比较简单,用了几个条件语句避免文章重复下载,但是文件因为网络文件下载失败,暂时没有管。
#!/bin/bash
set -e
set -u
set -o pipefail
ENV=$1
# download miniconda and install
URL=https://nanomirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-$(uname -m).sh
PREFIX=$HOME/miniconda3
if [ ! -d $PREFIX ]
then
wget -4 $URL && bash $(basename $URL) -b -p $PREFIX && \
echo "successful installation" && \
echo "export PATH=$PREFIX/bin:"'$PATH' >> ~/.bashrc
fi
if [ ! -f biosteup.yml ]
then
wget --no-check-certificate \
https://raw.github.com/xuzhougeng/zgtoolkits/master/biosetup.yml
fi
if [ $ENV ]
then
$HOME/miniconda3/bin/conda env create -f=biosetup.yml -p $ENV
else
echo "software install path is unset"
exit 0
fi
其中有一步是从GitHub上下载我常用的软件清单到本地,然后conda就能自动解决软件包依赖关系并安装。
配置软件的书写格式YAML,如果需要新增软件只要在dependencies
增加新的一行。建议先去https://bioconda.github.io/recipes.html 查找所需软件名。
# version1.0
# email: [email protected]
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
- https://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
- defaults
dependencies:
# Workflow
- nextflow
# Fastq Download And Quality Control Methods
- sra-tools
- fastx_toolkit
- fastqc
- trimmomatic
- multiqc
# Short Reads Alignment Methods
- bwa
- bowtie
- bowtie2
- hisat2
- star
# short sequence Alignment Methods
- blast
# Long Sequence Alignment Methods
- mummer
- pymummer
- gmap
- blat
- lastz
# SAM/BAM/BED Processing tools
- samtools
- bedtools
# SNP Calling Methods
- bcftools
- freebayes
- gatk4
# VCF Processing Tools
- snpeff
# Alignment-Based Gene/Exon/Transcript Estimation Methods
- htseq
# Alignment-Free Transcript Estimation Methods
- salmon
- kallisto
掌握这些软件,基本生信就算入门了。
顺道推荐思考问题的熊的博客,http://kaopubear.top 里面存放了他的学习笔记,质量很高。