asylvz / SVarp

Phased structural variant discovery in pangenomes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SVarp

Pangenome-based structural variant discovery

The aim of SVarp is to discover haplotype resolved SVs on top of a pangenome graph reference using long sequencing reads. It outputs local assemblies of SV alleles, termed svtigs.

Please open an issue for your questions or feel free to send me an e-mail (arda.soylev@hhu.de)

Quick Start

git clone https://github.com/asylvz/SVarp.git
cd svarp
make
build/svarp -a xxx.gaf -g xxx.gfa --fasta xxx.fasta.gz --phase read_tags.tsv -i SAMPLE_NAME -o OUTPUT_FOLDER

Requirements

SVarp is developed and tested using Linux Ubuntu operating system

  • You need the FASTA of the reads bgzipped (i.e., bgzip NA12878.fasta)
  • GAF file needs to be in unstable coordinate system. (https://github.com/lh3/gfatools/blob/master/doc/rGFA.md)
  • Pangenome ref. needs to be in GFA format. We tested SVarp with HPRC Minigraph pangenome (https://zenodo.org/record/6983934)
    • GAF alignments must be generated using the same GFA file that you use as input
  • For phased variants, tags need to be generated in ".tsv" format using whatshap haplotag (https://whatshap.readthedocs.io/)
    • E.g., whatshap haplotag NA12878.vcf.gz NA12878.bam -o NA12878_phase --reference ref_genome.fasta --output-haplotag-list tags.tsv

Dependencies

wget https://github.com/samtools/htslib/releases/download/1.17/htslib-1.17.tar.bz2
mkdir htslib && tar -xvf htslib-1.17.tar.bz2 -C htslib --strip-components=1
cd htslib && autoconf -i && ./configure --disable-lzma --disable-bz2 --disable-libcurl && make
(htslib folder needs to reside inside SVarp's main folder)
wget https://github.com/smarco/WFA2-lib/archive/refs/tags/v2.3.4.tar.gz --strip-components=1
mkdir wfa && tar -xzf v2.3.4.tar.gz -C wfa
cd wfa && make clean all
(wfa folder needs to reside inside SVarp's main folder)

All parameters

Required arguments:
--gaf (-a)                  : Alignment file in GAF format
--graph (-g)                : Pangenome file in GFA format
--fasta (-f)                : Fasta sequence file


Optional arguments:
--sample (-i)               : Sample name.
--out (-o)                  : Output folder.
--debug                     : Output multiple log files for debugging purpose.
--skip-untagged             : Output only phased variants (~30% faster).
--dist_threshold (-d)       : Distance threshold to merge SV breakpoints (default=100)
--out (-o)                  : Output folder path
--phase (-p)                : WhatsHap haplotag file in .tsv (https://whatshap.readthedocs.io/en/latest/guide.html#whatshap-haplotag)
--reads(-r)                 : Bgzipped FASTA file of reads for extensive mode (needed for WFA realignment)
--sample (-i)               : Sample (Individual) name
--support (-s)              : Minimum support for a cluster to be assembled (default=5 for diploid samples)
--threads(-t)               : Number of threads for assembly and realignment (default:32)
--help                      : Print this help menu

Citation

Soylev, A., Ebler, J., Pani, S., Rausch, T., Korbel, J., & Marschall, T. (2024). SVarp: pangenome-based structural variant discovery. bioRxiv, 2024-02.

About

Phased structural variant discovery in pangenomes

License:MIT License


Languages

Language:C++ 98.4%Language:Makefile 1.4%Language:C 0.3%