[Seqinr-commits] r2155 - in pkg: . src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Mar 15 11:38:18 CET 2023


Author: simonpenel
Date: 2023-03-15 11:38:18 +0100 (Wed, 15 Mar 2023)
New Revision: 2155

Modified:
   pkg/DESCRIPTION
   pkg/src/alignment.c
Log:
Option gap in now working for dan sequences in dist.alignment



Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2023-03-15 09:50:22 UTC (rev 2154)
+++ pkg/DESCRIPTION	2023-03-15 10:38:18 UTC (rev 2155)
@@ -1,6 +1,6 @@
 Encoding: UTF-8
 Package: seqinr
-Version: 4.2-24
+Version: 4.2-25
 Date: 2023-03-15
 Title: Biological Sequences Retrieval and Analysis
 Authors at R: c(person("Delphine", "Charif", role = "aut"),

Modified: pkg/src/alignment.c
===================================================================
--- pkg/src/alignment.c	2023-03-15 09:50:22 UTC (rev 2154)
+++ pkg/src/alignment.c	2023-03-15 10:38:18 UTC (rev 2155)
@@ -352,6 +352,22 @@
 			        ndiff[i][j]++;
 		        }
 		      }
+
+          if (gap_option == 1) {
+            if (seq[i][k] == '-'  && seq[j][k] != '-' && seq[j][k] != 'N' && seq[j][k] != 'X')
+              {
+              nbases++;
+              ndiff[j][i]++;
+              ndiff[i][j]++;
+              }
+            if (seq[j][k] == '-'  && seq[i][k] != '-' && seq[i][k] != 'N' && seq[i][k] != 'X')
+              {
+              nbases++;
+              ndiff[j][i]++;
+              ndiff[i][j]++;
+              }
+
+          }
 	      }
 	      else if(mat_number == 1 && seq_type == 0){
 		      /********************************************/



More information about the Seqinr-commits mailing list