[med-svn] [Git][med-team/mafft][upstream] New upstream version 7.471

Michael R. Crusoe gitlab at salsa.debian.org
Wed Jul 8 15:05:46 BST 2020



Michael R. Crusoe pushed to branch upstream at Debian Med / mafft


Commits:
5f66d725 by Michael R. Crusoe at 2020-07-08T15:48:51+02:00
New upstream version 7.471
- - - - -


6 changed files:

- core/addsingle.c
- core/disttbfast.c
- core/mafft.tmpl
- core/makedirectionlist.c
- core/mltaln.h
- readme


Changes:

=====================================
core/addsingle.c
=====================================
@@ -2878,6 +2878,30 @@ static void smoothing1( int njob, int nadd, int lenfull, char **seq, Blocktoreal
 //	for( i=0; i<lenfull+1; i++ ) fprintf( stderr, "i=%d, nnewres=%d, start=%d, end=%d\n", i, realign[i].nnewres, realign[i].start, realign[i].end );
 }
 	
+static double ratioambiguouscolumn_simple( char **s, int n, int l )
+{
+	int i, j;
+	int nunambiguous;
+	int nambiguous;
+	if( dorp == 'd' )
+		nunambiguous = 4;
+	else
+		nunambiguous = 6;
+
+	nambiguous = 0;
+	for( i=0; i<l; i++ )
+	{
+		for( j=0; j<n; j++ )
+			if( amino_grp[(int)s[j][i]] < nunambiguous )
+				break;
+		if( j == n )
+			nambiguous += 1;
+	}
+
+	reporterr( "nambiguous = %d / %d, ratio=%f\n", nambiguous, l, (double)nambiguous / l );
+	return( (double)nambiguous / l );
+}
+
 int main( int argc, char *argv[] )
 {
 	static int  *nlen;	
@@ -3270,6 +3294,17 @@ int main( int argc, char *argv[] )
 	commongappick( norg, seq );
 	lenfull = strlen( seq[0] );
 
+	if( ratioambiguouscolumn_simple( seq, norg, lenfull ) > 0.03 )
+	{
+		fprintf( stderr, "################################################################################\n" );
+		fprintf( stderr, "# \n" );
+		fprintf( stderr, "# The reference MSA has >3%% ambiguous columns.\n" );
+		fprintf( stderr, "# Please prepare a better reference.\n" );
+		fprintf( stderr, "# \n" );
+		fprintf( stderr, "################################################################################\n" );
+		exit( 1 );
+	}
+
 	if( keeplength && mapout )
 	{
 		addbk = (char **)calloc( nadd+1, sizeof( char * ) );
@@ -3701,6 +3736,9 @@ int main( int argc, char *argv[] )
 
 
 
+	if( commonIP ) FreeIntMtx( commonIP );
+	commonIP = NULL;
+	A__align( NULL, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, -1, -1, NULL, NULL, NULL, 0.0, 0.0 );
 	FreeIntMtx( newgaplist_o );
 	FreeIntVec( newgaplist_compact );
 	FreeIntVec( posmap );


=====================================
core/disttbfast.c
=====================================
@@ -8,7 +8,7 @@
 #define SCOREOUT 0
 #define SKIP 1
 
-#define ITERATIVECYCLE 1 
+#define ITERATIVECYCLE 2
 
 #define END_OF_VEC -1
 
@@ -2408,7 +2408,7 @@ static int dooneiteration( int *nlen, char **aseq, int nadd, char *mergeoralign,
 {
 	int l, ll, len1, len2, i, j;
 	int clus1, clus2;
-	double pscore, tscore;
+	double pscore;
 	char *indication1 = NULL, *indication2 = NULL;
 	double *effarr1 = NULL;
 	double *effarr2 = NULL;
@@ -2422,7 +2422,9 @@ static int dooneiteration( int *nlen, char **aseq, int nadd, char *mergeoralign,
 	int **localmem = NULL;
 	double **cpmxchild0, **cpmxchild1;
 	double orieff1, orieff2;
+	double oscore, nscore;
 	ExtAnch *pairanch;
+	char **oseq1, **oseq2;
 #if SKIP
 	int **skiptable1 = NULL, **skiptable2 = NULL;
 #endif
@@ -2470,7 +2472,6 @@ static int dooneiteration( int *nlen, char **aseq, int nadd, char *mergeoralign,
 
 //	writePre( njob, name, nlen, aseq, 0 );
 
-	tscore = 0.0;
 	for( ll=0; ll<njob*ITERATIVECYCLE; ll++ )
 	{
 		l = ll % njob;
@@ -2516,8 +2517,14 @@ static int dooneiteration( int *nlen, char **aseq, int nadd, char *mergeoralign,
 //		clus2 = fastconjuction_noweight( topol[l][1], aseq, mseq2, effarr2,  indication2 );
 #endif
 
-		newgapstr = "-";
+		intergroup_score( mseq1, mseq2, effarr1, effarr2, clus1, clus2, strlen( mseq1[0] ), &oscore );
 
+		oseq1 = AllocateCharMtx( 1, len1+1 );
+		oseq2 = AllocateCharMtx( njob-1, len2+1 );
+		for( i=0; i<clus1; i++ ) strcpy( oseq1[i], mseq1[i] );
+		for( i=0; i<clus2; i++ ) strcpy( oseq2[i], mseq2[i] );
+
+		newgapstr = "-";
 		commongappick( clus2, mseq2 );
 		commongappick( clus1, mseq1 );
 
@@ -2633,10 +2640,18 @@ static int dooneiteration( int *nlen, char **aseq, int nadd, char *mergeoralign,
 					ErrorExit( "ERROR IN SOURCE FILE" );
 			}
 		}
+		intergroup_score( mseq1, mseq2, effarr1, effarr2, clus1, clus2, strlen( mseq1[0] ), &nscore );
 #if SCOREOUT
 		reporterr(       "score = %10.2f\n", pscore );
 #endif
-		tscore += pscore;
+		if( nscore < oscore )
+		{
+			for( i=0; i<clus1; i++ ) strcpy( mseq1[i], oseq1[i] );
+			for( i=0; i<clus2; i++ ) strcpy( mseq2[i], oseq2[i] );
+		}
+		FreeCharMtx( oseq1 );
+		FreeCharMtx( oseq2 );
+
 		nlen[m1] = 0.5 * ( nlen[m1] + nlen[m2] );
 
 //		writePre( njob, name, nlen, aseq, 0 );
@@ -2667,9 +2682,6 @@ static int dooneiteration( int *nlen, char **aseq, int nadd, char *mergeoralign,
 
 	}
 
-#if SCOREOUT
-	reporterr(       "totalscore = %10.2f\n\n", tscore );
-#endif
 	Falign( NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, 0, NULL );
 	Falign_udpari_long( NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL );
 	Falign_givenanchors( NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL );


=====================================
core/mafft.tmpl
=====================================
@@ -1,7 +1,7 @@
 #! /bin/bash 
 er=0;
 myself=`dirname "$0"`/`basename "$0"`; export myself
-version="v7.467 (2020/May/14)"; export version
+version="v7.471 (2020/Jul/3)"; export version
 LANG=C; export LANG
 os=`uname`
 progname=`basename "$0"`
@@ -1077,11 +1077,19 @@ function removetmpfile() { # for MPI
 			cat "$anchorfile"     | tr "\r" "\n" | grep -v "^$" > "$TMPFILE/_externalanchors"
 
 			SAVEIFS=$IFS
-			IFS='\n'
-			filelist="$1\n$addfile\n$scorematrix\n$mergetable\n$treeinfile\n$seedtablefile\n$laraparams\n$pdblist\n$ownlist"
+# Fixed a bug: 'n' was misinterpreted as delimiter, 2020/Jun/19
+			IFS=$'\n'
+			filelist="$1
+$addfile
+$scorematrix
+$mergetable
+$treeinfile
+$seedtablefile
+$laraparams
+$pdblist
+$ownlist"
 			for f in $filelist; do
-				# $f="" demo mudani file ga hashiru.
-				file "$f" 2>/dev/null | grep "UTF-[13][62]" >& /dev/null && printf "$f: UTF-16 or UTF-32? Convert this file to ASCII\n\n" 1>&2 && exit 1;
+				file "$f" 2>/dev/null | grep -e 'UTF-16' -e 'UTF-32' >& /dev/null && printf "$f: UTF-16 or UTF-32? Convert this file to ASCII\n\n" 1>&2 && exit 1;
 			done
 			IFS=$SAVEIFS
 
@@ -1095,7 +1103,7 @@ function removetmpfile() { # for MPI
 				shift
 				if [ -r "$1" ]; then
 					cat "$1" | tr "\r" "\n" >  "$TMPFILE/seed$#"
-					file "$1" | grep "UTF-[13][62]" >& /dev/null && printf "$1: UTF-16 or UTF-32?  Convert this file to ASCII\n\n" 1>&2 && exit 1;
+					file "$1" | grep -e 'UTF-16' -e 'UTF-32' >& /dev/null && printf "$1: UTF-16 or UTF-32?  Convert this file to ASCII\n\n" 1>&2 && exit 1;
 				else
 					echo "$0": Cannot open "$1". 1>&2
 					echo "" 1>&2


=====================================
core/makedirectionlist.c
=====================================
@@ -8,7 +8,7 @@
 
 #define END_OF_VEC -1
 
-int nadd;
+//int nadd;
 double thresholdtorev;
 int dodp;
 int addfragment;


=====================================
core/mltaln.h
=====================================
@@ -36,7 +36,7 @@
 
 
 
-#define VERSION "7.467"
+#define VERSION "7.471"
 #define SHOWVERSION reporterr( "%s (%s) Version " VERSION "\nalg=%c, model=%s, amax=%3.1f\n%d thread(s)\n\n", progName( argv[0] ), (dorp=='d')?"nuc":((nblosum==-2)?"text":"aa"), alg, modelname, specificityconsideration, nthread )
 
 #define FFT_THRESHOLD  80


=====================================
readme
=====================================
@@ -1,6 +1,6 @@
 -----------------------------------------------------------------------
   MAFFT: a multiple sequence alignment program
-  version 7.467, 2020/May/14
+  version 7.471, 2020/Jul/3
 
   http://mafft.cbrc.jp/alignment/software/
   katoh at ifrec.osaka-u.ac.jp



View it on GitLab: https://salsa.debian.org/med-team/mafft/-/commit/5f66d7255cb705102ae70cc916191899eddfbba7

-- 
View it on GitLab: https://salsa.debian.org/med-team/mafft/-/commit/5f66d7255cb705102ae70cc916191899eddfbba7
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200708/dc79a065/attachment-0001.html>


More information about the debian-med-commit mailing list