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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Nov 28 14:23:33 CET 2022


Author: simonpenel
Date: 2022-11-28 14:23:33 +0100 (Mon, 28 Nov 2022)
New Revision: 2150

Modified:
   pkg/DESCRIPTION
   pkg/src/util.c
Log:
Removing invalid UTF-8 in util.c

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2022-11-28 09:20:34 UTC (rev 2149)
+++ pkg/DESCRIPTION	2022-11-28 13:23:33 UTC (rev 2150)
@@ -1,6 +1,6 @@
 Encoding: UTF-8
 Package: seqinr
-Version: 4.2-20
+Version: 4.2-21
 Date: 2022-11-28
 Title: Biological Sequences Retrieval and Analysis
 Authors at R: c(person("Delphine", "Charif", role = "aut"),
@@ -13,7 +13,7 @@
              person("Guy", "Perrière", role = "ctb"))
 Author: Delphine Charif [aut], Olivier Clerc [ctb], Carolin Frank [ctb], Jean R. Lobry [aut, cph], Anamaria Necşulea [ctb], Leonor Palmeira [ctb], Simon Penel [cre], Guy Perrière [ctb]
 Maintainer: Simon Penel <simon.penel at univ-lyon1.fr>
-BugReports: https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/seqinr-forum 
+BugReports: https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/seqinr-forum
 Imports: ade4,segmented
 Depends: R (>= 2.10.0)
 Description: Exploratory data analysis and data visualization

Modified: pkg/src/util.c
===================================================================
--- pkg/src/util.c	2022-11-28 09:20:34 UTC (rev 2149)
+++ pkg/src/util.c	2022-11-28 13:23:33 UTC (rev 2150)
@@ -19,16 +19,16 @@
   char *string;
   int lseq, i;
   char mot[2] = {'\0', '\0'};
-    
+
   SEXP chaine;
 
   string = (char *) CHAR(STRING_ELT(seq, 0));
-  
+
   lseq = strlen(string);
-  
+
   PROTECT(chaine = NEW_CHARACTER(lseq));
 
-  for(i = 0 ; i < lseq ; i++){  
+  for(i = 0 ; i < lseq ; i++){
     mot[0] = string[i];
     SET_STRING_ELT(chaine, i, mkChar(mot));
     }
@@ -37,9 +37,9 @@
   return(chaine);
 }
 
- 
+
 /*#####################################################*/
-/*# Tester si une séquence est protéique ou nucléique #*/
+/*# Tester si une sequence est proteique ou nucleique #*/
 /*#####################################################*/
 
 
@@ -53,20 +53,20 @@
   char *seq;
   static char dna[]="ACGTU";
   int total=0, length=0;
-  
-  seq = (char *) CHAR(STRING_ELT(sequence,0)); 
 
+  seq = (char *) CHAR(STRING_ELT(sequence,0));
+
   while(*seq != 0) {
     if(*seq != '-') {
       if( strchr(dna, toupper(*seq)) != NULL ) total++;
-      length++; 
+      length++;
     }
     seq++;
   }
-  
+
    PROTECT(res=NEW_NUMERIC(1));
    REAL(res)[0]=(float)(total) / length ;
-   
+
    UNPROTECT(1);
    return ( res );
 }



More information about the Seqinr-commits mailing list