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

5255

被折叠的 条评论
为什么被折叠?



