HiC辅助组装基因组,juicer+3D-DNA和ALLHIC流程

1. 前言

写于20211009,现在重新整理发布于这里

2. juicebox+3D-DNA流程

安装juicer和3ddna。

建立fastq文件夹,cat分别合并 R1和R2测序文件。

建立reference文件夹,放入.fa文件,用以下命令进行预处理

mamba activate juicer
mamba install -y bwa
bwa index genome.fa

python ~/software/juicer-1.6/misc/generate_site_positions.py MboI genome genome.fa
awk 'BEGIN{OFS="\t"}{print $1, $NF}' genome_MboI.txt  > skgenome.chrom.size

mkdir fastq
ln -s /mnt/caigui/41_sk_genome_129M/37_hicpro/fastq/sample1/reads_R1.fastq.gz fastq
ln -s /mnt/caigui/41_sk_genome_129M/37_hicpro/fastq/sample1/reads_R2.fastq.gz fastq

# 整理目录如下

运行

nohup ~/software/juicer-1.6/CPU/juicer.sh \
    -g genome \
    -s MboI \
    -z /mnt/caigui/41_sk_genome_129M/39_juicer/genome.fa \
    -y /mnt/caigui/41_sk_genome_129M/39_juicer/genome_MboI.txt \
    -p /mnt/caigui/41_sk_genome_129M/39_juicer/skgenome.chrom.size \
    -D /home/caigui/software/juicer-1.6/ \
    -t 40 &> juicer.log &

juicer处理结果中的align文件夹中的inter_30.hic可以进行可视化,merged_nodups.txt 是下一步的输入文件。

3D-DNA部分

~/software/3d-dna-201008/run-asm-pipeline.sh -r 2 /mnt/caigui/41_sk_genome_129M/39_juicer/genome.fa /mnt/caigui/41_sk_genome_129M/39_juicer/aligned/merged_nodups.txt &> 3d.log

下载sk_genome.final.hic和sk_genome.final.assembly文件到本地,使用juicebox进行手动调整,输出调整后sk_genome.final.review.assembly文件。

使用调整后的assembly文件,再跑一次3Ddna

~/software/3d-dna-201008/run-asm-pipeline-post-review.sh -r sk_genome.final.review.assembly /mnt/caigui/41_sk_genome_129M/39_juicer/genome.fa /mnt/caigui/41_sk_genome_129M/39_juicer/aligned/merged_nodups.txt &> 3d.log &

输出的sk_genome_HiC.fasta为Hic辅助组装结果。

3. 也可以选择ALLHIC流程

对于简单二倍体基因,可以使用作者最新更新的ALLHiC/bin/ALLHiC_pip.sh流程进行辅助组装

使用此流程除了基础版本需要的Samtools, bedtools, matplotlib外,还需要安装Pysam, Numpy,另外还需要安装作者未提到的Bwa和Parafly

# 使用示例
ALLHiC_pip.sh -r genome.nextpolish.purged.fa -1 /mnt/caigui/33_SKDeNovo/01_data/08_allhic/rawdata/combine/reads_R1.fastq.gz -2 /mnt/caigui/33_SKDeNovo/01_data/08_allhic/rawdata/combine/reads_R2.fastq.gz -k 10 -e GATC -t 40

results matching ""

    No results matching ""