宏病毒组(三)| 数据组装软件使用教程

        测序得到大量的宏基因组/宏病毒组数据后,我们均需要组装后进行物种注释及基因注释。目前主流的组装软件有megahit、metaspades等。其中,MEGAHIT是超快的宏基因组序列组装工具,成为行业的主流组装软件。其主要的优点如下:

1)尤其适合组装超大规模数据;

2)与SPAdes和IDBA-UD相比,计算时间和内存消耗方面存在巨大的优势,在同类软件评估中,MEGAHIT通常有着最少的计算时间,同时也拥有最低的嵌合体比例(错误率);

3)软件安装方便,参数简单,可通过调整k-mer范围和步长控制分析质量和计算时间的不同要求;

4)尤其在对土壤等复杂环境样本组装、大量样本混合组装方面优势明显。

        接下来,小编为大家带来Megahit软件超详细安装及应用教程,快来围观吧。

1 megahit的安装

        megahit的安装相对比较简单,可以通过以下三种方式,大家可以根据自己的实际情况选择。软件的github链接为 https://github.com/voutcn/megahit

1)Conda安装:

       下载对应的文件包,运行以下命令:

a  conda install -c bioconda megahit

2)直接下载二进制文件:

       命令如下:

a  wget https://github.com/voutcn/megahit/releases/download/v1.2.9/MEGAHIT-1.2.9-Linux-x86_64-static.tar.gz
b  tar zvxf MEGAHIT-1.2.9-Linux-x86_64-static.tar.gz
c  cd MEGAHIT-1.2.9-Linux-x86_64-static/bin/
d  ./megahit --test  # run on a toy dataset
e  ./megahit -1 MY_PE_READ_1.fq.gz -2 MY_PE_READ_2.fq.gz -o MY_OUTPUT_DIR 

​​​​​3)源码编译安装

       为了保证成功安装,需要安装了以下软件:zlib, cmake >= 2.8, g++ >= 4.8.4, 运行的时候需要使用gzip和bzip2两个软件,用于压缩和解压。

      命令如下:

a  git clone https://github.com/voutcn/megahit.git
b  cd megahit
c  git submodule update --init
d  mkdir build && cd build
e  cmake .. -DCMAKE_BUILD_TYPE=Release  # add -DCMAKE_INSTALL_PREFIX=MY_PREF      IX if needed
f  make -j4
g  make simple_test  # will test MEGAHIT with a toy dataset
h  # make install if needed

2 基本使用方法

a  megahit -1 pe_1.fq -2 pe_2.fq -o out  # 1 paired-end library
b  megahit --12 interleaved.fq -o out # one paired & interleaved paired-end library
c  megahit -1 a1.fq,b1.fq,c1.fq -2 a2.fq,b2.fq,c2.fq -r se1.fq,se2.fq -o out # 3 paired-end libraries        +2 SE libraries
d  megahit_core contig2fastg 119 out/intermediate_contigs/k119.contig.fa > k119.fastg # get              FASTG from the intermediate contigs of k=119

        组装结果文件名为final.contigs.fa

3 参数说明 

a  #必须输入参数 
b  -1 #read1的序列文件 
c  -2 #read2的序列文件 
d  --12 交错的双端PE序列 
e  -r # 单端SE的序列文件

f   #基本参数: 
g  --min -countminimum multiplicity for filtering (k_min+1)-mers [2] #过滤的最小重合bp数 
h  --k-listcomma-separated list of kmer size #设定固定的kmer迭代列表。逗号分隔,必须为奇数 

i   #另一种kmer迭代列表设置方式 --k-minminimum kmer size (<= 255), must be odd number [21] #设置最小的kmer size,应小于255,必须为奇数 --k-maxmaximum kmer size (<= 255), must be odd number [141] #设置最大的kmer size,应小于255,必须为奇数 --k-stepincrement of kmer size of each iteration (<= 28), must be even number [12] #间隔大小,应小于等于28,必须为偶数

j   #高级参数 --no-mercy do not add mercy kmers --bubble-levelintensity of bubble merging (0-2), 0 to disable [2] #bubble融合强度 --merge-levelmerge complex bubbles of length <= l*kmer_size and similarity >= s [20,0.95] # 合并长度<= l*kmer_size和相似度>= s的复杂bubble --prune-levelstrength of low depth pruning (0-3) [2] # 低深度区域的修剪强度 --prune-depthremove unitigs with avg kmer depth less than this value [2]# 如果kmer平均深度低于该值则移除该unitigs --disconnect-ratiodisconnect unitigs if its depth is less than this ratio times #如果深度小于这个比率乘以其深度则断开unitigs --low-local-ratioremove unitigs if its depth is less than this ratio times # 如果深度小于这个比率乘以相邻unitigs的平均深度则移除unitigs --max-tip-lenremove tips less than this value [2*k] #移除小于该值的tips --cleaning-roundsnumber of rounds for graph cleanning [5] # --no-local disable local assembly #禁止局部组装 

k  #硬件参数 -m/--memorymax memory in byte to be used in SdBG construction # 设定内存大小,单位为byte,如果小于1则为机器最大内存的比例 -t/--num-cpu-threadsnumber of CPU threads #线程数 

l   #输出参数 -o/--out-diroutput directory [./megahit_out] #输出目录 --out-prefixoutput prefix (the contig file will be OUT_DIR/OUT_PREFIX.contigs.fa) #输出结果文件的前缀 --min-contig-lenminimum length of contigs to output [200] #设定输出contig最小值 --keep-tmp-files keep all temporary files #保留所有中间文件 --tmp-dirset temp directory # 设定临时目录

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值