This project is aimed at improving a part of HAlign2.0, which could align multiple nucleotide sequences fast and accurately.
HAlign is a cross-platform program that performs multiple sequence alignment based on the center star strategy. Here, we present two major updates of HAlign 3 which help to improve the time efficiency and the alignment quality. 1) The left-child right-sibling is replaced by K-ary tree to build the suffix tree to reach a higher identical substring searching efficiency at the cost of only a few extra space; 2) a global substring selection algorithm combining directed acyclic graphs with dynamic programming is adopted to screen out the unsatisfactory identical substrings. These improvements make HAlign 3 the only program which can align 1 million SARS-CoV-2 sequences fast and accurately.
1.Intall WSL for Windows. Click here for Instructional Video for installation, or here (Copyright belongs to the original work)
2.Download and install Anaconda. Anaconda versions for different systems from here. Installation of anaconda (Instructional Video for command line installation) or here (Copyright belongs to the original work).
3.Install HAlign 3
#1 Create a environment for halign conda create -n halign_evn -c conda-forge openjdk=11
#2 Activate halign environment everytime when using halign program.conda activate halign_env
#3 Install halignconda install -c malab halign
#4 Test haignhalign -v
#Exit halignconda deactivate halign_env
halign [optionl] <infile>
positional argument:infile nucleotide sequences in fasta formatoptional arguments:-o <filename> target file-t <integer> multi-thread, with a default setting of half of the cores available-c <integer> centre sequence index (0-based), with a default setting of the longest sequence index-s <filename> output alignments without sequence identifiers, i.e. in plain txt format but with sequence order retained-h produce help message and exit-v produce version message and exit
1.Download testdata.
mt_genome.fasta: 672 human mitochondrial genomes (Tanaka et al. 2004)
mt_genome.fasta
halign -o
1.Download and install JDK 11 for different systems from here.
2.Download HAlign3 from relseases.
java -jar halign-stmsa.jar [optional] <infile>
positional argument:infile nucleotide sequences in fasta formatoptional arguments:-o <filename> target file-t <integer> multi-thread, with a default setting of half of the cores available-c <integer> centre sequence index (0-based), with a default setting of the longest sequence index-s <filename> output alignments without sequence identifiers, i.e. in plain txt format but with sequence order retained-h produce help message and exit-v produce version message and exit
pairwise-alignment scoring rules adjusted
optimizations
refactoring and a new feature added
SuffixTree.java rewritten to improve the performance
initialisation
Fast variations calling from a FASTA/MAF file of genome-scale multiple sequence alignments
https://img.shields.io/docker/pulls/sangerpathogens/malaria-lftp
The precisive study of whole genome for every single individuals and cells has been made possible by the rapid development of sequencing technology. The demand for variation calling among individual whole genomes for prokaryotic and eukaryotic population studies would be sharply increased. Current tools are either time-consuming or less accurate and failed to handle eukaryotic genome-scale multiple sequence alignments. We present MSAvc, a C++ based program, which can efficiently extract variations including substitution, indel and replacement from FASTA and MAF files of multiple genome-scale sequence alignments. MSAvc allows users to set reference sequence for a ccurate variation extraction and filter variations based on position, alternate allele count and variation type. MSAvc is able to accurately extract variations from FASTA alignment of 3 million SARS-CoV-2 sequences and MAF alignment of 21 human whole genomes. It can be easily installed via Debian, Homebrew, Conda and Docker on MacOS, Linux, and Windows (32 and 64 bits) systems. MSAvc is open source code under the GNU General Public License version 3.
There are a few ways to install MSAvc. The simpliest way is using apt (Debian/Ubuntu) or Conda. If you encounter an issue when installing MASvc or encounter a bug please report it here.
If you have a recent version of Ubuntu or Debian then you can install it using apt.
apt-get install snp-sites#1 Download installerwget https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh
#2 Change the access permissionchmod +x Anaconda3-2021.05-Linux-x86_64.sh
#3 Run installer./Anaconda3-2021.05-Linux-x86_64.sh
#4 Close bash and open a new shellconda config --set auto_activate_base falsecd gitcdmkdirmakecurlbash
#5 Add channelsconda -hconda config --show channelsconda config --add channels conda-forgeconda config --add channels biocondaxxxxxxxxxx#6 Creating an environmentconda env listconda create -n bioinformatics
#7 Install MSAvc in the environment of bioinformaticsconda activate bioinformaticsconda install -c bioconda msavcmsacv -hconda deactivateconda remove --name moose --allThis is a difficult method and is only suitable for someone with advanced unix skills. No support is provided with this method, since you have advanced unix skills. Please consider using Conda instead. First install a standard development environment (e.g. gcc, automake, autoconf, libtool). Download the software from GitHub.
xxxxxxxxxxautoreconf -i -f./configuremakesudo make install
This is a difficult method and is only suitable for someone with advanced unix skills. No support is provided with this method, since you have advanced unix skills. Please consider using Conda instead. First install a standard development environment (e.g. gcc, automa\ ke, autoconf, libtool).
xxxxxxxxxxtar xzvf snp-sites-x.y.z.tar.gzcd snp-sites-x.y.z./configuremakesudo make install
First, install Ubuntu on Windows 10, click here to access the instruction. here
Second,
xxxxxxxxxxautoreconf -i./configuremakemake check
This requires libcheck (the check package in Ubuntu) to be installed.
Bioconda produce a Docker container so you can use the software out of the box. Install Docker and then pull the container from Bioconda https://quay.io/repository/biocontainers/snp-sites
###
xxxxxxxxxxThis program extracts small variation including substitution, indel and replacement from a multi FASTA/MAF alignment file, then outputs the SNP sites in VCF formats.usage: msavc -i <inputfile> -o <outputfile> [options]
| Option | Function |
|---|---|
| -i, --in | Specify the muti-FASTA/MAF input file |
| -o, --out | Specify the output VCF file name |
| -r, --reference | Specify the reference genome during extracting variation (default=the first sequence of the input file) |
| -g, --genotype-matrix | Output genotype matrix (default=false) |
| -n, --nomerge-sub | Don't merge the SUB variations with the same "POS" and "REF" into one row (default=false) |
| -b, --filter-begin | The filtration of POS column by specifying an integer such as "-b 24" in terms of reference genome, meaning only keep variations with POS>=24 (default=0) |
| -e, --filter-end | The filtration of POS column by specifying an integer such as "--filter-end 1000" in terms of reference genome, meaning only keep variations with POS<1000 (default=18446744073709551615) |
| -c, --filter-ac | The filtration of AC tag in INFO column by specifying an integer such as "-c 100", meaning only output variations with AC>=100 (default=0) |
| -t, --filter-vt | The filtration of VT tag in INFO column by specifying one of sub/ins/del/rep (lowercase) flag such as "-t sub", meaning only output the substitution variations (default=false) |
| -l, --filter-vl | The filtration of VLEN tag in INFO column by specifying an integer such as "-l 25", meaning only output the variations with VLEN>=25bp (default=0) |
| -s, --sub-block | Output MSA sub-block into FASTA file after the filtration of POS column, for instance "-b 24 -e 100 -s", meaning produce a sub MSA block, the slice interval is 24=<POS<100 in terms of reference (default=false) |
| -h, --help | Help message |
| -v, --version | Version |
| Input file of single or continuous substitutions: |
|---|
| >sequence1 (as reference) |
| TCTATCTTCGCTGCTTACGGTTTCGTCC |
| >sequence2 |
| CCTCCCTTCGCTGCTTACGGTTTCGTGT |
| >sequence3 |
| CCTGGCTTCGCTGCTTACGGTTTCGTGT |
the output is:
| #CHROM | POS | ID | REF | ALT | QUAL | FILTER | INFOR | FORMAT | sequence1 | sequence2 | sequence3 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| sequence1 | 1 | . | T | C | . | . | AC=2;VT=SUB;VLEN=1 | GT | 0 | 1 | 1 |
| sequence1 | 4 | . | AT | CC,GG | . | . | AC=1,1;VT=SUB;VLEN=2 | GT | 0 | 1 | 2 |
| sequence1 | 27 | . | CC | GT | . | . | AC=2;VT=SUB;VLEN=2 | GT | 0 | 1 | 1 |
| Input file of single or continuous insertions: |
|---|
| >sequence1 (as reference) |
| --TCTATCTTCGCTGC---TTACGGTTTCGTCC--- |
| >sequence2 |
| TTTCTATCTTCGCTGCAAATTACGGTTTCGTCCATT |
| >sequence3 |
| TTTCTATCTTCGCTGC---TTACGGTTTCGTCCATT |
the output is:
| #CHROM | POS | ID | REF | ALT | QUAL | FILTER | INFOR | FORMAT | sequence1 | sequence2 | sequence3 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| sequence1 | 0 | . | . | TT | . | . | AC=2;VT=INS;VLEN=2 | GT | 0 | 1 | 1 |
| sequence1 | 14 | . | C | CAAA | . | . | AC=1;VT=INS;VLEN=3 | GT | 0 | 1 | 0 |
| sequence1 | 28 | . | C | CATT | . | . | AC=2;VT=INS;VLEN=3 | GT | 0 | 1 | 1 |
| Input file of single or continuous deletions: |
|---|
| >sequence1 (as reference) |
| TCTATCTTCGCTGCTTACGGTTTCGTCC |
| >sequence2 |
| --TATCTTCGCTG-TTACGGTTTCG--- |
| >sequence3 |
| --TATCTTCGCTGCTTACGGTTTCG--- |
the output is:
| #CHROM | POS | ID | REF | ALT | QUAL | FILTER | INFOR | FORMAT | sequence1 | sequence2 | sequence3 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| sequence1 | 1 | . | TC | . | . | . | AC=2;VT=DEL;VLEN=2 | GT | 0 | 1 | 1 |
| sequence1 | 13 | . | GC | G | . | . | AC=1;VT=DEL;VLEN=1 | GT | 0 | 1 | 0 |
| sequence1 | 25 | . | GTCC | G | . | . | AC=2;VT=DEL;VLEN=3 | GT | 0 | 1 | 1 |
| Input file of mixed situations of SUB/INS/DEL: |
|---|
| >sequence1 (as reference) |
| ---TCTATCTTCGCTGC---TTACGGTTTCGTCC--- |
| >sequence2 |
| TTTAATATCTTCGCTGCAAAAAACGGTTTCGA----- |
| >sequence3 |
| ------TTCTTCGCTA----TTACGGTTTCGTGTATT |
| >sequence4 |
| ------TTCTTCGCTGCAAAAAACGGTTTCGA----- |
the output is:
| #CHROM | POS | ID | REF | ALT | QUAL | FILTER | INFOR | FORMAT | sequence1 | sequence2 | sequence3 | sequence4 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| sequence1 | 1 | . | TC | TTTAA | . | . | AC=1;VT=REP;VLEN=5 | GT | 0 | 1 | 0 | 0 |
| sequence1 | 1 | . | TC | TTTAA | . | . | AC=1;VT=REP;VLEN=5 | GT | 0 | 1 | 0 | 0 |
| sequence1 | 1 | . | TC | TTTAA | . | . | AC=1;VT=REP;VLEN=5 | GT | 0 | 1 | 0 | 0 |
| sequence1 | 1 | . | TC | TTTAA | . | . | AC=1;VT=REP;VLEN=5 | GT | 0 | 1 | 0 | 0 |
| sequence1 | 1 | . | TC | TTTAA | . | . | AC=1;VT=REP;VLEN=5 | GT | 0 | 1 | 0 | 0 |
| sequence1 | 1 | . | TC | TTTAA | . | . | AC=1;VT=REP;VLEN=5 | GT | 0 | 1 | 0 | 0 |
xxxxxxxxxxmsacv -fasta input_FASTA_filename -o output_filename.vcfmsacv -fasta input_FASTA_filename -gt -derep -subcompress -o output_filename.vcfmsacv -fasta input_FASTA_filename -filPOS 24:296 -filAC 100 -filVT SUB -o output_filename.vcfmsacv -maf input_MAF_filename -o output_filename.vcfmsacv -maf input_MAF_filename -gt -derep -subcompress -o output_filename.vcfmsacv -maf input_MAF_filename -filPOS 24:296 -filAC 100 -filVT SUB -o output_filename.vcf
| Documentary of fixed VCF columns | ||
| 1 | #CHROM | The name of user assigned reference genome |
| 2 | POS | The position of the first base in reference allele according to the given reference genome |
| 3 | ID | “.” meaning missing value |
| 4 | REF | Reference allele |
| 5 | ALT | Alternate Allele |
| 6 | QUAL | “.” meaning missing value |
| 7 | FILTER | “.” meaning missing value |
| 8 | INFO | AC: Alternate Allele Count |
| VT: the type of variation (SUB, INS, DEL and REP) | ||
| VLEN: Difference in length between REF and ALT alleles | ||
| 9 | FORMAT | GT: genotype |
| 10 | Reference name | The genotypes of reference genome which will always be “0” |
| 11 | Sequences name* | Given one variation, the genotype of sequences is assigned according the order of ALT value (if it matches the first alternate allele, the genotype of sequence will be assigned as “1” and so on) |
| *The order of other sequences is in the same order of FASTA/MAF file after removing the chosen reference. | ||
MSAvc is free software, licensed under GPLv3.
MSAcv is supported by ZOU's Lab. If you have any questions and suggestions, please feel free to contact us on the issues page. You are also welcomed to send a copy to Furong.TANG@hotmail.com to make sure we could answer you ASAP!
If you use this software please cite:
MSAvc: variation calling for genome-scale multiple sequence alignments, Furong TANG1, Jiannan CHAO1, Fenglong Yang, Lei Xu2 and Quan Zou2, ?????(?), (2021)