Skip to content

Commit

Permalink
Kalign version 3.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoLassmann committed Apr 16, 2021
1 parent 4c3ca01 commit 1d0bfe3
Show file tree
Hide file tree
Showing 11 changed files with 180 additions and 152 deletions.
22 changes: 22 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
2021-04-16 Timo Lassmann <timo.lassmann@telethonkids.org.au>

* version 3.3.1 - Bug Fix
The previous version kalign checked the top 50 sequences in inputs to determine
whether the sequences are aligned or not. If the first 50 sequences are not aligned,
but following sequences contain gaps (or other characters!) kalign can crash. In this
version (3.3.1) kalign checks all sequences, thereby avoiding this issue.
To alert users to the situation described above and to warn users about the presence of
odd characters, kalign now produces a warning message like this:

[Date Time] : LOG : Start io tests.
[Date Time] : LOG : reading: dev/data/a2m.good.1
[Date Time] : LOG : Detected protein sequences.
[Date Time] : WARNING : -------------------------------------------- (rwalign.c line 505)
[Date Time] : WARNING : The input sequences contain gap characters: (rwalign.c line 506)
[Date Time] : WARNING : "-" : 36 found (rwalign.c line 510)
[Date Time] : WARNING : BUT the sequences do not seem to be aligned! (rwalign.c line 514)
[Date Time] : WARNING : (rwalign.c line 515)
[Date Time] : WARNING : Kalign will remove the gap characters and (rwalign.c line 516)
[Date Time] : WARNING : align the sequences. (rwalign.c line 517)
[Date Time] : WARNING : -------------------------------------------- (rwalign.c line 518)

2020-11-06 Timo Lassmann <timo.lassmann@telethonkids.org.au>

* version 3.3 - Threading and more
Expand Down
136 changes: 97 additions & 39 deletions README
Original file line number Diff line number Diff line change
@@ -1,48 +1,106 @@
-----------------------------------------------------------------------
Kalign version 2.03, Copyright (C) 2006 Timo Lassmann

http://msa.cgb.ki.se/
timolassmann@gmail.com

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

A copy of this license is in the COPYING file.
Kalign - a multiple sequence alignment program

Copyright 2006, 2019, 2020, 2021 Timo Lassmann

This file is part of kalign.

Kalign is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

-----------------------------------------------------------------------
Installation:

% ./configure
% make
Kalign is a fast multiple sequence alignment program for biological sequences.

1) Installation

1.1) Release Tarball

Download tarball from [releases](https://github.com/TimoLassmann/kalign/releases). Then:

tar -zxvf kalign-<version>.tar.gz
cd kalign-<version>
./autogen.sh
./configure
make
make check
make install


1.2) Homebrew

brew install brewsci/bio/kalign

1.3) Developer version

git clone https://github.com/TimoLassmann/kalign.git
cd kalign
./autogen.sh
./configure
make
make check
make install


1.4) on macOS, install [brew](https://brew.sh/) then:

brew install libtool
brew install automake
git clone https://github.com/TimoLassmann/kalign.git
cd kalign
./autogen.sh
./configure
make
make check
make install


2) Usage

Usage: kalign -i <seq file> -o <out aln>

Options:

--format : Output format. [Fasta]
--reformat : Reformat existing alignment. [NA]
--version : Print version and exit

Kalign expects the input to be a set of unaligned sequences in fasta format or aligned sequences in aligned fasta, MSF or clustal format. Kalign automatically detects whether the input sequences are protein, RNA or DNA.

Since version 3.2.0 kalign supports passing sequence in via stdin and support alignment of sequences from multiple files.

3) Examples

Passing sequences via stdin:

cat input.fa | kalign -f fasta > out.afa

Combining multiple input files:

kalign seqsA.fa seqsB.fa seqsC.fa -f fasta > combined.afa

Align sequences and output the alignment in MSF format:

kalign -i BB11001.tfa -f msf -o out.msf

and as root:
Align sequences and output the alignment in clustal format:

% make install
kalign -i BB11001.tfa -f clu -o out.clu

Re-align sequences in an existing alignment:

Usage:
kalign -i BB11001.msf -o out.afa

kalign [Options] infile.fasta outfile.fasta

or:

kalign [Options] -i infile.fasta -o outfile.fasta

or:

kalign [Options] < infile.fasta > outfile.fasta
Reformat existing alignment:

Options:

type: kalign -h

kalign -i BB11001.msf -r afa -o out.afa
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT(kalign, 3.3)
AC_INIT(kalign, 3.3.1)

#AC_CONFIG_AUX_DIR([.])

Expand Down
1 change: 0 additions & 1 deletion dev/run_io_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ do
printf "with ERROR $status and Message:\n\n$error\n\n";
exit 1;
fi

done
2 changes: 1 addition & 1 deletion src/alignment_parameters.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int set_param_number(struct aln_param* ap,int L, int sel);

int new_aln_matrices(struct aln_param* ap);

int init_ap(struct aln_param** aln_param, struct parameters* param, int numseq,int L)
int init_ap(struct aln_param** aln_param, struct parameters* param,int L)
{
struct aln_param* ap = NULL;
int i,j;
Expand Down
2 changes: 1 addition & 1 deletion src/alignment_parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ struct aln_param{

};

extern int init_ap(struct aln_param** aln_param, struct parameters* param, int numseq,int L);
extern int init_ap(struct aln_param** aln_param, struct parameters* param,int L);
extern void free_ap(struct aln_param* ap);
#endif
1 change: 1 addition & 0 deletions src/aln_run.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,7 @@ int do_align_serial(struct msa* msa,struct aln_tasks* t,struct aln_mem* m, int t
MFREE(t->profile[b]);

t->profile[c] = tmp;

RUN(make_seq(msa,a,b,m->path));

msa->plen[c] = m->path[0];
Expand Down
8 changes: 4 additions & 4 deletions src/run_kalign.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Kalign - a multiple sequence alignment program
Copyright 2006, 2019, 2020 Timo Lassmann
Copyright 2006, 2019, 2020, 2021 Timo Lassmann
This file is part of kalign.
Expand Down Expand Up @@ -132,7 +132,7 @@ int print_kalign_header(void)
fprintf(stdout,"\n");
fprintf(stdout,"Kalign (%s)\n", PACKAGE_VERSION);
fprintf(stdout,"\n");
fprintf(stdout,"Copyright (C) 2006,2019,2020 Timo Lassmann\n");
fprintf(stdout,"Copyright (C) 2006,2019,2020,2021 Timo Lassmann\n");
fprintf(stdout,"\n");
fprintf(stdout,"This program comes with ABSOLUTELY NO WARRANTY; for details type:\n");
fprintf(stdout,"`kalign -showw'.\n");
Expand Down Expand Up @@ -520,7 +520,7 @@ int run_kalign(struct parameters* param)
}

/* allocate aln parameters */
RUN(init_ap(&ap,param,msa->numseq,msa->L ));
RUN(init_ap(&ap,param,msa->L ));

if(param->dump_internal){
double* s;
Expand Down Expand Up @@ -555,7 +555,7 @@ int run_kalign(struct parameters* param)
RUN(convert_msa_to_internal(msa, ALPHA_ambigiousPROTEIN));
}
/* allocate aln parameters */
RUN(init_ap(&ap,param,msa->numseq,msa->L ));
RUN(init_ap(&ap,param,msa->L ));

/* Start alignment stuff */
DECLARE_TIMER(t1);
Expand Down
Loading

0 comments on commit 1d0bfe3

Please sign in to comment.