进行宏基因组分箱

1. 共组装

我的是赤潮时间序列样品,把12个样品分成start、peak、decline、post四个阶段,按组分别进行共组装。

megahit \
-1 ~/yuexinru/fastp/Unknown_BQ660-0030003_good_1_fastp.fq.gz,\
Unknown_BQ660-0030005_good_1_fastp.fq.gz,\
Unknown_BQ660-0030006_good_1_fastp.fq.gz \
-2 ~/yuexinru/fastp/Unknown_BQ660-0030003_good_2_fastp.fq.gz,\
Unknown_BQ660-0030005_good_2_fastp.fq.gz,\
Unknown_BQ660-0030006_good_2_fastp.fq.gz \
--presets meta-large \
--min-contig-len 2500 \
-o ~/yuexinru/megahit/peak_co-assemly/03-05-06-coassembly_megahit

1. 用bowtie2进行序列回帖

准备fastqc过滤后的单独样本的数据:

for f in $(cat SAMPLE_IDs)
do 
fastp \
-i ~/yuexinru/rawdata/Metagenome/$f_good_1.fq.gz -o ~/yuexinru/fastp/$f_good_1_fastp.fq.gz \
-I ~/yuexinru/rawdata/Metagenome/$f_good_2.fq.gz -O ~/yuexinru/fastp/$f_good_2_fastp.fq.gz \
done

创建索引文件:

bowtie2-build \
-f sample_7_final.contigs.fa \
7_Samples_coassembly_bowtie2_index

得到好几个索引文件:

这个情况很正常 ,bowtie2-build 会生成 6 个文件(*.bt2*.rev.*.bt2),它们合在一起才是一个索引数据库,后续用 -x 指定时,只需要写前缀(比如 7_Samples_coassembly_bowtie2_index),不要写具体文件名。

执行回帖:

for s in $(cat ~/yuexinru/SAMPLE_IDs)
do
    echo "Processing $s ..."
    bowtie2 -x ~/yuexinru/Co_assembly/7_Samples_coassembly_bowtie2_index/7_Samples_coassembly_bowtie2_index \
        -1 ~/yuexinru/fastp/${s}_good_1_fastp.fq.gz \
        -2 ~/yuexinru/fastp/${s}_good_2_fastp.fq.gz \
    | samtools sort -@ 8 -o ${s}.bam
    samtools index ${s}.bam
done

#发泄排序规则指定有误
for s in $(cat ~/yuexinru/SAMPLE_IDs)
do
    echo "Processing $s ..."
    bowtie2 -x ~/yuexinru/Co_assembly/7_Samples_coassembly_bowtie2_index/7_Samples_coassembly_bowtie2_index \
        -1 ~/yuexinru/fastp/${s}_good_1_fastp.fq.gz \
        -2 ~/yuexinru/fastp/${s}_good_2_fastp.fq.gz \
    | samtools sort -n -o ${s}.name_sorted.bam
done

生成覆盖度文件:

jgi_summarize_bam_contig_depths \
--minContigLength 2500 \
--outDepth 7_Samples_depth.txt \
*.bam

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值