cobra:安装与使用

mkdir COBRA
cd COBRA
git clone https://github.com/linxingchen/cobra.git
cd cobra
python setup.py install
python cobra.py -h
#修改下cobra.py
from Bio.SeqUtils import GC 改成 from Bio.SeqUtils import gc_fraction
#依赖项
wget https://github.com/wwood/CoverM/releases/download/v0.6.1/coverm-x86_64-unknown-linux-musl-0.6.1.tar.gz
tar -xzvf coverm-x86_64-unknown-linux-musl-0.6.1.tar.gz
(完整路径)/coverm
for i in *_metaSPAdes_contigs.fa
do
	num=${i%%_metaSPAdes_contigs.fa}
	cd ${work_path}
	${software_path}/bwa-mem2/bwa-mem2 index ${i}
	${software_path}/bwa-mem2/bwa-mem2 mem -t 180 ${i} ${fp_path}/${num}_clean_1.fastq ${fp_path}/${num}_clean_2.fastq > ${num}_aligen.sam
	samtools view -Sb -@180 ${num}_aligen.sam > ${num}_aligen.bam
	samtools sort -@180 ${num}_aligen.bam -o ${num}_aligen_sort.bam
	${software_path}/CoverM/coverm/coverm contig -b ${num}_aligen_sort.bam -p bwa-mem -t 180 --output-file ${num}_CoverM.txt
	sed -i '1d' ${num}_CoverM.txt
	${software_path}/COBRA/cobra/cobra.py -q ${i} -f ${i} -a metaspades -mink 21 -maxk 55 -m ${num}_aligen_sort.bam -c ${num}_CoverM.txt -o ${num}_COBRA -t 180
	rm *_metaSPAdes_contigs.fa.*
	rm *.sam
	rm *.bam
	rm *_CoverM.txt
done

 

你可能感兴趣的:(数据分析)