组学

verkko(一个刚更新的基因组组装软件)可以实现T2T级别的组

2023-07-27  本文已影响0人  GenomeStudy

verkko

和hifiasm比起来,慢很多,因为它有canu部分
Verkko is a hybrid genome assembly pipeline developed for telomere-to-telomere assembly of PacBio HiFi and Oxford Nanopore reads.
Verkko uses Canu to correct remaining errors in the HiFi reads, builds a multiplex de Bruijn graph using MBG, aligns the Oxford Nanopore reads to the graph using GraphAligner, progressively resolves loops and tangles first with the HiFi reads then with the aligned Oxford Nanopore reads, and finally creates contig consensus sequences using Canu's consensus module.

安装

需要的依赖环境

推荐安装(哪个能安装上都行)

conda install -c conda-forge -c bioconda -c defaults verkko

or

conda create -n verkko -c conda-forge -c bioconda -c defaults verkko

or

git clone https://github.com/marbl/verkko.git
cd verkko/src
git submodule init && git submodule update
make -j32

测试软件

$ verkko
usage: /share/home/off/miniconda3/bin/verkko -d <output-directory> --hifi <hifi-reads ...> --nano <nanopore-reads ...>
  MANDATORY PARAMETERS:
    -d <output-directory>    Directory to use for verkko intermediate and final results.
                             Will be created if needed.
    --hifi <files ...>       List of files containing PacBio HiFi reads.
    --nano <files ...>       List of files containing Oxford Nanopore reads.

                             Input reads can be any combination of FASTA/FASTQ,
                             uncompressed or gzip/bzip2/xz compressed.  Any
                             number of files can be supplied; *.gz works.

  ALGORITHM PARAMETERS:
    --no-correction          Do not perform Canu correction on the HiFi reads.
    --no-nano                Assemble without ONT data.

    --hap-kmers h1 h2 type   Use rukki to assign paths to haplotypes.  'h1' and 'h2
                             must be Meryl databases of homopolymer-compressed parental
                             kmers.  'type' must be 'trio', 'hic' or 'strandseq'.

    --hic1 <files ...>       List of files containing left hic reads.
    --hic2 <files ...>       List of files containing right hic reads.
                             Order of left and right files should be same, no interlaced files allowed.
                             Input reads can be any combination of FASTA/FASTQ,
                             uncompressed or gzip/bzip2/xz compressed.  Any
                             number of files can be supplied; *.gz works.
    --no-rdna-tangle         Switch off option that helps to proceed large rDNA tangles which may connect multiple chromosomes.
    --uneven-depth           Disable coverage-based heuristics in homozygous nodes detection for phasing.
    --haplo-divergence       Estimation on maximum divergence between haplotypes. Should be increased for species with divergence significantly higher than in human. Default: 0.05, min 0, max 0.2

    --screen <option>        Identify common contaminants and remove from the assembly, saving 1 (circularized) exemplar.
                             For human, '--screen human' will attempt to remove rDNA, mitochondria, and EBV.
                             Arbitrary contaminants are supported by supplying a name and fasta:
                             'screen contaminant /full/path/to/contaminant.fasta'
                             Multiple screen commands are allowed and are additive.

    --paths <gaf paths>      No assembly, generate consensus given paths and an existing assembly.
                             The gaf file must be formatted as follows: 'name >utig4-1<utig4-2 HAPLOTYPE1'. One per line.
                             where utig4-1 is in fwd orientation and utig4-2 is in reverse complement. Requires '--assembly'.
    --assembly <output-dir>  Existing verkko assembly where the nodes given to --paths are defined.
                             The nodes should come from assembly.homopolymer-compressed.gfa
                             Provide -d for the output of new consensus, as well as the hifi and nano reads from previous run.

  COMPUTATIONAL PARAMETERS:
    --python <interpreter>   Path or name of a python interpreter.  Default: 'python'.
    --perl <interpreter>     Path of name of a perl interpreter.  Default: 'perl'.
    --mbg <path>             Path to MBG.             Default for all three
    --graphaligner <path>    Path to GraphAligner.    one packaged with verkko.
    --mashmap <path>         Path to mashmap.
    --winnowmap <path>       Path to winnowmap.

    --cleanup                Remove intermediate results.
    --no-cleanup             Retain intermediate results (default).

    --local                  Run on the local machine (default).
    --local-memory           Specify the upper limit on memory to use, in GB, default 64
    --local-cpus             Specify the number of CPUs to use, default 'all'

    --sge                    Enable Sun Grid Engine support.
    --slurm                  Enable Slurm support.
    --lsf                    Enable IBM Spectrum LSF support.

    --snakeopts <string>     Append snakemake options in "string" to the
                             snakemake command.  Options MUST be quoted.

    --sto-run                Set resource limits for various stages.
    --mer-run                Format: number-of-cpus memory-in-gb time-in-hours
    --ovb-run                  --cns-run 8 32 2
    --ovs-run
    --red-run
    --mbg-run
    --utg-run
    --spl-run
    --ali-run
    --pop-run
    --utp-run
    --lay-run
    --sub-run
    --par-run
    --cns-run

ADVANCED MODULE PARAMETERS (expert users):
HiFi read correction:
    --correct-k-mer-size
    --correct-mer-threshold
    --correct-mer-filter
    --correct-min-read-length
    --correct-min-overlap-length
    --correct-hash-bits
MBG:
    --base-k
    --max-k
    --window
    --threads
    --unitig-abundance
    --hifi-coverage

ONT splitting:
    --split-bases
    --split-reads
    --min-ont-length

GraphAligner:
    --seed-min-length
    --seed-max-length
    --align-bandwidth
    --score-fraction
    --min-identity
    --min-score
    --end-clipping
    --incompatible-cutoff
    --max-trace

note

ou can pass through snakemake options to restrict CPU/memory/cluster resources by adding the --snakeopts option to verkko. For example, --snakeopts "--dry-run" will print what jobs will run while --snakeopts "--cores 1000" would restrict grid runs to at most 1000 cores across all submited jobs.

Run:

General mode

verkko -d <work-directory> --hifi <hifi-read-files> [--nano <ont-read-files>]

run in Hi-C mode

verkko -d asm \
  --hifi hifi/*.fastq.gz \
  --nano ont/*.fastq.gz \
  --hic1 hic/*R1*fastq.gz  \
  --hic2 hic/*R2*fastq.gz

直接上手自己的数据

数据准备

hifi=/share/home/off/Work/Genome_assembly/01.HiFi/all.hifi/all.hifi.fastq.gz
hic1=/share/home/off/Work/Genome_assembly/02.HiC/BMK_DATA_20230407145841_1/Data/Unknown_BH142-01H0001_good_1.fq.gz
hic2=/share/home/off/Work/Genome_assembly/02.HiC/BMK_DATA_20230407145841_1/Data/Unknown_BH142-01H0001_good_2.fq.gz
name=sre

step 1

verkko -d 02.verkko.${name} --hifi ${hifi} --hic1 ${hic1} --hic2 ${hic2} --threads 40 2>02.verkko1.sh.o

or step 2

#--no-correction跳过canu过滤reads
verkko -d 02.verkko2.${name} --no-correction --hifi ${hifi} --hic1 ${hic1} --hic2 ${hic2} --threads 40 2>02.verkko2.sh.o

报错处理(当然是我自己遇到的报错)

1.Error condition

Not running final consensus since no rukki paths provided!

First, you should check your mashmap library files with which mashmap and mashmap --version; then if you get an Error, you can use conda install mashmap=3.0.6 to reinstall the latest version of the library files. Checking again with mashmap --version will result in

$ mashmap --version 
3.0.6

Then,you need to add rukki as a path to your .bashrc.
Where is rukki located? You can find it in ~/miniconda3/lib/verkko/bin/.

2.Error condition

mportError: cannot import name 'gcd' from 'fractions' (/share/home/off/miniconda3/lib/python3.10/fractions.py)

You can use pip to upgrade networkx

pip install networkx==3.1.0

结果信息(我先跑的跳过canu处理的,得到的结果也就是跳过的结果)

1-buildGraph/
2-processGraph/
5-untip/
6-layoutContigs/
7-consensus/
8-hicPipeline/
assembly.disconnected.fasta
assembly.fasta#组装结果文件
assembly.haplotype1.fasta#组装一型文件
assembly.haplotype2.fasta#组装一型文件
assembly.homopolymer-compressed.layout
assembly.homopolymer-compressed.noseq.gfa
assembly.paths.tsv
assembly.unassigned.fasta
emptyfile
snakemake.sh*
 verkko.yml

参考资料

https://github.com/marbl/verkko

上一篇 下一篇

猜你喜欢

热点阅读