[med-svn] [Git][med-team/suitename][master] 10 commits: Use git mode in watch file to get latest code

Andreas Tille gitlab at salsa.debian.org
Fri Nov 6 13:43:34 GMT 2020



Andreas Tille pushed to branch master at Debian Med / suitename


Commits:
d0d4bbfe by Andreas Tille at 2020-11-06T14:39:51+01:00
Use git mode in watch file to get latest code

- - - - -
dd932622 by Andreas Tille at 2020-11-06T14:40:04+01:00
New upstream version 0.3.070919+git20180613.ebb1325
- - - - -
831627bb by Andreas Tille at 2020-11-06T14:40:05+01:00
Update upstream source from tag 'upstream/0.3.070919+git20180613.ebb1325'

Update to upstream version '0.3.070919+git20180613.ebb1325'
with Debian dir fd8e0d973ab53392d76c2493f1870ef829bd5398
- - - - -
b2737353 by Andreas Tille at 2020-11-06T14:41:25+01:00
routine-update: Standards-Version: 4.5.0

- - - - -
c8a9dce9 by Andreas Tille at 2020-11-06T14:41:25+01:00
routine-update: debhelper-compat 13

- - - - -
a560d180 by Andreas Tille at 2020-11-06T14:41:27+01:00
routine-update: Secure URI in copyright format

- - - - -
7c9238d6 by Andreas Tille at 2020-11-06T14:41:27+01:00
routine-update: Add salsa-ci file

- - - - -
f10f8dbb by Andreas Tille at 2020-11-06T14:41:27+01:00
routine-update: Rules-Requires-Root: no

- - - - -
9657ccde by Andreas Tille at 2020-11-06T14:41:46+01:00
Set upstream metadata fields: Bug-Database, Bug-Submit.

Changes-By: lintian-brush
Fixes: lintian: upstream-metadata-missing-bug-tracking
See-also: https://lintian.debian.org/tags/upstream-metadata-missing-bug-tracking.html

- - - - -
c9a5fe6c by Andreas Tille at 2020-11-06T14:42:22+01:00
routine-update: Ready to upload to unstable

- - - - -


18 changed files:

- − 0.3.070525
- Makefile.macOSX
- + SConscript
- + command_line/suitename.py
- debian/changelog
- − debian/compat
- debian/control
- debian/copyright
- + debian/salsa-ci.yml
- debian/upstream/metadata
- debian/watch
- suitename.c
- suitename.h
- suiteninit.c
- suiteninit.h
- suiteninpt.c
- suitenout.c
- suitenutil.c


Changes:

=====================================
0.3.070525 deleted
=====================================
@@ -1 +0,0 @@
-suitename.0.2.070524


=====================================
Makefile.macOSX
=====================================
@@ -1,12 +1,12 @@
 # suitename
 
 ifeq ($(MAKECMDGOALS),debug)
-	CFLAGS = -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc
+	CFLAGS = -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -arch x86_64
 else
-	CFLAGS = -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc
+	CFLAGS = -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -arch x86_64
 endif
 
-LIBS = -lm -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc
+LIBS = -lm -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -arch x86_64
 
 # ---------------------------------------------------------------------
 PROG_FLGS   =  


=====================================
SConscript
=====================================
@@ -0,0 +1,20 @@
+import libtbx.load_env
+
+Import("env_base", "env_etc")
+
+env = env_base.Clone(LIBS=env_etc.libm)
+if (libtbx.manual_date_stamp < 20090819):
+  # XXX backward compatibility 2009-08-19
+  env.Replace(CCFLAGS=env_etc.ccflags_base)
+if (env_etc.compiler != "win32_cl"):
+  env.Replace(LINK=env_base["CC"])
+
+exe = env.Program(
+  target=["#suitename/exe/suitename"],
+  source=[
+    "suitename.c",
+    "suiteninit.c",
+    "suiteninpt.c",
+    "suitenout.c",
+    "suitenscrt.c",
+    "suitenutil.c"])


=====================================
command_line/suitename.py
=====================================
@@ -0,0 +1,19 @@
+# LIBTBX_SET_DISPATCHER_NAME phenix.suitename
+# LIBTBX_SET_DISPATCHER_NAME molprobity.suitename
+
+import libtbx.load_env
+from libtbx.utils import Usage
+import os, sys, subprocess
+
+def run(args):
+  exe = libtbx.env.under_build("suitename/exe/suitename")
+  if (os.name == "nt"):
+    exe += ".exe"
+  if (not os.path.isfile(exe)):
+    from libtbx.str_utils import show_string
+    from libtbx.utils import Sorry
+    raise Sorry("Missing phenix.suitename executable: %s" % show_string(exe))
+  subprocess.call([exe] + args)
+
+if (__name__ == "__main__"):
+  run(sys.argv[1:])


=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+suitename (0.3.070919+git20180613.ebb1325-1) unstable; urgency=medium
+
+  * Use git mode in watch file to get latest code
+  * Standards-Version: 4.5.0 (routine-update)
+  * debhelper-compat 13 (routine-update)
+  * Secure URI in copyright format (routine-update)
+  * Add salsa-ci file (routine-update)
+  * Rules-Requires-Root: no (routine-update)
+  * Set upstream metadata fields: Bug-Database, Bug-Submit.
+
+ -- Andreas Tille <tille at debian.org>  Fri, 06 Nov 2020 14:41:47 +0100
+
 suitename (0.3.070628-2) unstable; urgency=medium
 
   * debhelper 11


=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-11


=====================================
debian/control
=====================================
@@ -4,11 +4,12 @@ Uploaders: Andreas Tille <tille at debian.org>,
            Michael Prisant <michael.prisant at gmail.com>
 Section: science
 Priority: optional
-Build-Depends: debhelper (>= 11~)
-Standards-Version: 4.1.4
+Build-Depends: debhelper-compat (= 13)
+Standards-Version: 4.5.0
 Vcs-Browser: https://salsa.debian.org/med-team/suitename
 Vcs-Git: https://salsa.debian.org/med-team/suitename.git
 Homepage: http://kinemage.biochem.duke.edu/software/suitename.php
+Rules-Requires-Root: no
 
 Package: suitename
 Architecture: any


=====================================
debian/copyright
=====================================
@@ -1,4 +1,4 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: suitename
 Source: https://github.com/rlabduke/suitename/
 


=====================================
debian/salsa-ci.yml
=====================================
@@ -0,0 +1,4 @@
+---
+include:
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml


=====================================
debian/upstream/metadata
=====================================
@@ -1,3 +1,5 @@
+Bug-Database: https://github.com/rlabduke/suitename/issues
+Bug-Submit: https://github.com/rlabduke/suitename/issues/new
 Reference:
  Author: >
   Jane S. Richardson and Bohdan Schneider and Laura W. Murray and


=====================================
debian/watch
=====================================
@@ -1,6 +1,9 @@
-version=3
+version=4
 
-http://kinemage.biochem.duke.edu/software/suitename.php .*/downloads/software/suitename/suitename.([\d.]+)\.src\.tgz
+opts="mode=git,pretty=0.3.070919+git%cd.%h" \
+    https://github.com/rlabduke/suitename.git HEAD
+
+# http://kinemage.biochem.duke.edu/software/suitename.php .*/downloads/software/suitename/suitename.([\d.]+)\.src\.tgz
 
 # if there would be release tags ...
 # https://github.com/rlabduke/suitename/releases .*/archive/#PREFIX#(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz)


=====================================
suitename.c
=====================================
@@ -21,11 +21,17 @@
 #include "suitenout.h"
 
 /*0.2.070524 preserve chi-1 and chi, so could preserve eta, theta */
-/*0.2.070525 general read dangle record for, e.g.,  eta, theta */
-/*0.2.070628 triage reports zeta-1, epsilon-1, delta-1,... Ltriage codes */
-
+/*0.3.070525 general read dangle record for, e.g.,  eta, theta */
+/*0.3.070628 triage reports zeta-1, epsilon-1, delta-1,... Ltriage codes */
+/*0.3.070803 notes: rearranged suitenhead.h/janesviews ...  */
+/*                  put something in to say what veiws mean */
+/*  what are masters e and d ???? */
+/*0.3.070919 3g wannabe (tRNA TpseudoUC loop) */
+/*0.3.110606 range of delta updated by S.J. */
+/* 01/07/2014 S.J. updated so that it can take input with alternate conformations, *nd by default will calculate the suite for altA*/
+/* 09/18/2014 S.J. updated so that suitename will ignore DNA residues*/
 /****main()*******************************************************************/
-main(int argc, char** argv)
+int main(int argc, char** argv)
 {
    int  LOK=1,ibin=0,jclst=0;
    char sour[32];
@@ -39,11 +45,11 @@ main(int argc, char** argv)
    ptmaster[0] = '\0';  /*default is no point master*/
 
 
-   sprintf(version,"suitename.0.3.070628 ");  /*  VERSION  */
+   sprintf(version,"suitename.0.4.130509 ");  /*  VERSION  */
 
    /* default values before parsecommandline */
    Ltest = 0; /*compile in... */
-   Ltestout = 0; /*commandline -test */ 
+   Ltestout = 0; /*commandline -test */
    fpin = stdin;
    fpout = stdout;
 
@@ -58,14 +64,20 @@ main(int argc, char** argv)
    Lsuitesin=0;
    Lresiduesin=1;
    NptIDfields=6;  /*for dangle residue input*/
+   altIDfield=0; /* by default, no altID field - S.J. 01/07/2014*/ 
+   altID[0]='\0'; altID[1]='\0';
    Nanglefields=9; /*for 9D kinemage edited suite input*/
    Lnewfile=0;
    Lhelpout=0;
+   LNptIDfields=0; /* initializing the four variables to check correct usage of altIDfield - S.J. 01/07/2014*/
+   LaltIDfield=0;
+   Luseincorrect=0; 
+   LaltID=0;
    Lchangesout=0;
    NameStr[0] = '\0';
    Lgeneralsatw = 0; /*flag for special general case satellite widths 070328*/
    Lwannabe = 1;/* -wannabe input flag 070429, default 070525, else -nowannabe*/
-   
+
    Lsequence = 1; /*output 1 letter Base code sequence part of string 070409*/
    Loverlap = 0;  /*overlap string lines, e.g. 1-20, 11-30, 21-40, ... 070409*/
    Loneline = 0;  /*string output all as oneline 070409*/
@@ -74,8 +86,10 @@ main(int argc, char** argv)
    {
      LOK = parsecommandline(&argc, argv);
    }
+
    if(LOK)
-   {/*command OK*/
+   {
+      /*command OK*/
      inittextblock(&mainscratch); /*__open scratch "tapes" */
      /*--rewind scratch "tapes", inplicit with inittextblock() */
      /*--allocation of space automatic when attempting write*/
@@ -83,7 +97,7 @@ main(int argc, char** argv)
      newresidueptr = (residuestruct*)malloc(sizeof(struct residuestruct));
      oldresidueptr = (residuestruct*)malloc(sizeof(struct residuestruct));
      suiteptr      = (suitestruct*)malloc(sizeof(struct suitestruct));
-     if(   newresidueptr != NULL 
+     if(   newresidueptr != NULL
          && oldresidueptr != NULL
          && suiteptr != NULL
         )  {LOK=1;}
@@ -92,11 +106,11 @@ main(int argc, char** argv)
      if(LOK)
      {/*storage allocated*/
        LOK = initializations(); /*070325*/
-       if(LOK) 
+       if(LOK)
        {/*LOK to work*/
 
          clearnewresidue(); /*only at beginning so first-1 handled correctly*/
-/*sudo pre-Algorithm: accummulate suites or suites from residues */ 
+/*sudo pre-Algorithm: accummulate suites or suites from residues */
          while(!LatEOF) /*allow EOF on end of last line, see Lhitend */
          {/*loop over all residues in the file*/
 /*
@@ -117,12 +131,12 @@ fprintf(stderr,"\n");
             if(Lsuitesin) {LOK = getsuite();}
             else {LOK = getresidue(); Lresiduesin = 1;}
             if(LOK)
-            { 
-               if(Lresiduesin) {LOK = loadsuite();}    
+            {
+               if(Lresiduesin) {LOK = loadsuite();}
                if(LOK)
                {
                   LOK = confirmsuite();
-                  if(!LOK) 
+                  if(!LOK)
                   {
                      ibin = 13; /*angles not fully specified*/
                      jclst = 0; /*cluster not assigned in dummy bin*/
@@ -140,9 +154,9 @@ fprintf(stderr,"\n");
 
                      if(ibin > 0){membership(ibin);}
 
-                  }   
+                  }
                }/*loaded suite*/
-            }/*got a residue (or a suite from a kinemage)*/    
+            }/*got a residue (or a suite from a kinemage)*/
          }/*loop over all residues in the file*/
 
          writeoutput();  /*has logicals for what output possible*/
@@ -157,7 +171,7 @@ fprintf(stderr,"\n");
          initializations();
          L33out = L32out = L23out = L22out = 1;
          for(i=1; i<=12; i++)
-         { 
+         {
             binout[i]=1;
             /*for(j=1; j<ddgmax; j++)*/
             j=0; /*zeroth cluster of a bin holds its outliers*/
@@ -207,7 +221,7 @@ fprintf(stderr,"\n");
      fprintf(stderr,"alphamin    %.0f, alphamax   %.0f\n",alphamin,alphamax);
      fprintf(stderr,"betamin     %.0f, betamax    %.0f\n",betamin,betamax);
      fprintf(stderr,"zetamin     %.0f, zetamax    %.0f\n",zetamin,zetamax);
-     fprintf(stderr,"cluster half-widths, & special satellite widths"); 
+     fprintf(stderr,"cluster half-widths, & special satellite widths");
      fprintf(stderr,"    version: %s\n",clusterhalfwidthsversion);
      fprintf(stderr,"deltamw  %.0f\n",deltamw);
      fprintf(stderr,"epsilonw %.0f, epsilonsatw %.0f\n",epsilonw,epsilonsatw);
@@ -235,12 +249,17 @@ fprintf(stderr,"\n");
             }
          }
       }
+      else if (Luseincorrect) /* if both the point field and alt field are not specified, then exit - S.J. 01/07/2014*/
+      {
+	fprintf(stderr,"Please specify both -altIDfield and -pointIDfields\n");
+        usageout();
+      }
       else /*Lhelpout*/
       {
          usageout();
       }
    }
-   exit(0);
+   return(0);
 }
 /*___main()__________________________________________________________________*/
 
@@ -274,7 +293,7 @@ int  evaluatesuite(void)
        /*sudo THEN s_bini = e_triage AND !OK */
 
       if(suiteptr->epsilon < epsilonmin || suiteptr->epsilon > epsilonmax)
-      { sprintf(sour," e out  "); LOK = 0; 
+      { sprintf(sour," e out  "); LOK = 0;
         Ltriage = EPSILONM; sprintf(ptmaster,"'E'");}
    }
    if(LOK) /*------ filter on delta minus 1 -----------------------*/
@@ -290,7 +309,7 @@ int  evaluatesuite(void)
       else if(suiteptr->deltam >= delta2min && suiteptr->deltam <= delta2max)
       { puckerdm = 2; LOK = 1; }
       else
-      { puckerdm = 0; sprintf(sour," bad deltam "); LOK = 0; 
+      { puckerdm = 0; sprintf(sour," bad deltam "); LOK = 0;
         Ltriage = DELTAM; sprintf(ptmaster,"'D'");}
    }
    if(LOK) /*------ filter on delta        -----------------------*/
@@ -306,7 +325,7 @@ int  evaluatesuite(void)
       else if(suiteptr->delta  >= delta2min && suiteptr->delta  <= delta2max)
       { puckerd = 2; LOK = 1; }
       else
-      { puckerd = 0; sprintf(sour," bad delta "); LOK = 0; 
+      { puckerd = 0; sprintf(sour," bad delta "); LOK = 0;
         Ltriage = DELTA; sprintf(ptmaster,"'D'");}
       if(LOK)
       {/*both deltas in range*/
@@ -441,7 +460,7 @@ int  evaluatesuite(void)
    {/*culled by single angle triage*/
 
     /*sudo ELSE {s_bini already set to be some kind of triage} */
- 
+
       Ltriageout = 1;
       binout[0] = 1;
       ibin = 0;
@@ -464,7 +483,7 @@ void membership(int ibin)
    float penmindist = 999;
    float pi = 3.14159;
    float suiteness=0;
-   char sour[96],sourness[32]; /*070311 accum report*/
+   char sour[96],sourness[64]; /*070311 accum report*/
    int  Ldominant=0;
    int  LOK = 0;
    float sattodom[8], domtosat[8],sattopt[8],domtopt[8];
@@ -482,7 +501,7 @@ void membership(int ibin)
    clearmatches();
 
    matchcnt = 0;
-   i = ibin; 
+   i = ibin;
 
    /*sudo */
    /*sudo program body: cluster membership in assigned s_bini */
@@ -505,8 +524,8 @@ void membership(int ibin)
 
    while(bin[i].clst[j].LOK) /*070428*/
    {/*loop over all observed clusters in this ith bin*/
-      if(   !Lwannabe 
-         && strcmp(bin[i].clst[j].status,"wannabe")==0) {j++;continue;}/*match*/ 
+      if(   !Lwannabe
+         && strcmp(bin[i].clst[j].status,"wannabe")==0) {j++;continue;}/*match*/
       /*empty bin dummy cluster at 0,0,0,0,0,0,0 is out of angle range*/
       /*but safer to explicity skip*/
       /*if(i==3 || i==9){continue;}  not needed  070428*/
@@ -521,13 +540,13 @@ void membership(int ibin)
       {
          closestd = distance;
          closestj = j;
-      } 
+      }
 
       if(distance >= 0) /* store all distances, needed for diagnostics */
       {
-        matches[i][j] = distance;  
+        matches[i][j] = distance;
         /*sudo IF 0 <= d < 1 THEN */
-        if(distance < 1) /* suite could be a member of this cluster */ 
+        if(distance < 1) /* suite could be a member of this cluster */
         {   /*APPEND to list of clusters of which suite could be a member*/
             /*sudo APPEND cj to s_list_ci */
             /*sudo FLAG when possible_cluster is a dominant_cluster */
@@ -554,12 +573,12 @@ void membership(int ibin)
 
    /*now find the next closest cluster (for debugging purposes)*/
    nextclosed = 999; /*next closest cluster*/
-   
+
    j = 1; /*start with index 1 for first observed clst in this bin  070428*/
    while(bin[i].clst[j].LOK) /*070428*/
    {/*loop over all clusters in this ith bin*/
       if(   !Lwannabe
-         && strcmp(bin[i].clst[j].status,"wannabe")==0) {j++;continue;}/*match*/ 
+         && strcmp(bin[i].clst[j].status,"wannabe")==0) {j++;continue;}/*match*/
       if(matches[i][j] < nextclosed && j != closestj)
       {
          nextclosed = matches[i][j];
@@ -571,7 +590,7 @@ void membership(int ibin)
    /*end logic: find all clusters that match this conformation_______________*/
 
    /*now assign suite to a particular cluster*/
-   Lassigned = 0; 
+   Lassigned = 0;
 
    /*sudo */
    /*sudo IF      |s_list_ci| == 1 THEN */
@@ -606,15 +625,15 @@ void membership(int ibin)
 
          /*sudo ASSIGN domj = dominant cj in s_list_ci */
          /*sudo ASSIGN thej = cj in s_list_ci minimizing d for all non-dominant cj in s_list_ci */
-      
+
          penmindist = 999;
-         
+
          j = 1;/*start with index 1 for first observed clst in this bin 070428*/
          while(bin[i].clst[j].LOK) /*070428*/
          {/*loop over all clusters in this ith bin*/
             if(   !Lwannabe
-               && strcmp(bin[i].clst[j].status,"wannabe")==0) {j++;continue;} 
-            
+               && strcmp(bin[i].clst[j].status,"wannabe")==0) {j++;continue;}
+
             if(   ( strcmp(bin[i].clst[j].domsatness,"dom")!=0 )/*i.e. NOT dom*/
                && (matches[i][j] < penmindist))
             {/*find shortest distance to non-dominant and satellite clusters*/
@@ -648,7 +667,7 @@ void membership(int ibin)
             vector7ab(sattodom, bin[i].clst[thej].ang, bin[i].clst[domj].ang);
 
             /*sudo IF si is located between the means of thej and domj THEN */
-            if(   (dotproduct(domtopt,domtosat,4) > 0) 
+            if(   (dotproduct(domtopt,domtosat,4) > 0)
                 &&(dotproduct(sattopt,sattodom,4) > 0) )
             {/*pt between dom and sat*/
 
@@ -658,7 +677,7 @@ void membership(int ibin)
                /*recalc distances to dominant cluster and to satellite cluster*/
                /*considering different weights between special cluster pairs */
                resetcoordw(dominantw, i,domj,0); /*set to dominant  widths*/
-               resetcoordw(satellitew,i,thej,Lgeneralsatw); 
+               resetcoordw(satellitew,i,thej,Lgeneralsatw);
                  /*set to satellite widths, using Lgeneralsatw  070414*/
                assignweights(i,thej,dominantw,satellitew);
                   /*special widths for this satellite: weight dom--sat pair*/
@@ -726,7 +745,7 @@ fprintf(stderr,"\n");
       /*thej = closestj; NOT viable to have outlier named by closest cluster*/
       /* some are very far from any cluster, */
       /* and even a singleton defines an extant cluster and makes a ring*/
-   } 
+   }
    /*sudo END IF ( |s_list_ci| == ? ) */
 
    sprintf(sour," %s:%s, %7.3f:%s, %7.3f: "
@@ -735,7 +754,7 @@ fprintf(stderr,"\n");
            ,bin[i].clst[nextclosej].clustername,matches[i][nextclosej]);
 
    clusterout[i][thej] = 1; /*this specific cluster has an entry*/
-   
+
    if(Lwannabe && strcmp(bin[i].clst[thej].status,"wannabe")==0)
    {
       Lwannabeout = 1; /*once set, stays set*/
@@ -772,7 +791,7 @@ fprintf(stderr,"\n");
             sprintf(commentstr," by 7Ddist"); /*070628*/
             Lcomment=1;
          }
-      } 
+      }
    }
    /*sudo ELSE "suiteness" suiti = 0 */
       /*sudo ASSIGN s_clusteri = outlier */


=====================================
suitename.h
=====================================
@@ -3,6 +3,7 @@
 #include <stdio.h>
 #include <math.h>
 #include <string.h>
+#include <ctype.h>
 
 #define MAXBINS 14  /*1--12 named bins, bin 0 triaged, bin 13 incomplete*/
 #define MAXCLST 16  /*practical, <observed, limit of clusters in a bin*/
@@ -50,7 +51,7 @@ typedef struct suitestruct {
 }suitestruct;
 EXTERN struct suitestruct* suiteptr;
 
-typedef struct residuestruct {
+typedef struct residuestruct { 
    char  ptID[10][32];
    char  basechr[2];  /*070412*/
    float alpha;
@@ -64,7 +65,7 @@ EXTERN residuestruct* residueptr;
 EXTERN residuestruct* newresidueptr;
 EXTERN residuestruct* oldresidueptr;
 
-EXTERN float matches[MAXBINS][MAXCLST]; 
+EXTERN float matches[MAXBINS][MAXCLST];
     /*incl 1--12 named bins, # defined clsters070429*/
 
 EXTERN float coordw[8];     /*general weightings*/


=====================================
suiteninit.c
=====================================
@@ -182,6 +182,7 @@ int  parsecommandline(int *argc, char** argv)
             else if(   CompArgStr(p+1,"pointIDfields", 5) 
                     || CompArgStr(p+1,"ptID",  2) )
             {
+	       LNptIDfields=1; /* flag to see if this is specified or not - S.J. 01/07/2014*/
                i = i+1; /*number of pointID fields is in the next string*/
                p = argv[i];
                j=0;
@@ -198,6 +199,32 @@ int  parsecommandline(int *argc, char** argv)
                  }
                }/*strobe out number*/
             }
+            else if(CompArgStr(p+1,"altIDfield", 10)) /* to check for altIDfield and storing it S.J. 01/07/2014*/
+            {
+	       LaltIDfield=1; 
+               i = i+1; /*altID field is in the next string*/
+               p = argv[i];
+               j=0;
+               k=0;
+               while(j<256)
+               {/*strobe out number*/
+                 if( isdigit(p[j]) ) { numstr[k] = p[j]; k++; j++; }
+                 else if(k==0) {/*no char yet*/ j++; }
+                 else
+                 {/*presume whole number is in*/
+                    numstr[k]='\0'; /*end number string*/
+                    sscanf(numstr,"%d",&altIDfield);
+                    j=999; /*end the while loop*/
+                 }
+               }/*strobe out number*/
+            }
+	    else if(CompArgStr(p+1,"altIDval",8)) /* to get the value of the altID - S.J. 01/07/2014*/
+            {
+                  LaltID=1;
+                  i = i+1;
+                  p=argv[i];
+                  altID[0]=p[0];
+            }
             else if(   CompArgStr(p+1,"angles",  5) 
                     || CompArgStr(p+1,"anglefields", 5) 
                     || CompArgStr(p+1,"nangles", 6) )
@@ -247,7 +274,8 @@ int  parsecommandline(int *argc, char** argv)
       }/*presume an input file name*/
    }/*loop over arguments*/
    /*070222 much of this not yet implemented*/
-   if( Lhelpout || Ltestout || Lchangesout || Lnewfile) {LOK = 0;}
+   if(LaltIDfield == 1 && LNptIDfields == 0) {Luseincorrect=1;} /* added to check is both altID and pointID are specified - S.J. 01/07/2014*/
+   if( Lhelpout || Ltestout || Lchangesout || Lnewfile || Luseincorrect) {LOK = 0;} /* added Luseincorrect check S.J. 01/07/2014*/
    else {LOK = 1;}
    return(LOK);
 }


=====================================
suiteninit.h
=====================================
@@ -1,7 +1,7 @@
 /*                        suiteninit.h                            */
 /* suitename.h MAXBINS 14  1--12 named bins, bin 0 triaged, bin 13 incomplete*/
 /* suitename.h MAXCLST 16  practical, <observed, limit of clusters in a bin*/
-         /*clst indexed from 1: bin 33p had 10, index to 11, as of 070428 */
+         /*clst indexed from 1: bin 33p had 10, index to 11, 070428, +1 070919*/
 #define MAXSAT  12  /*maximun number of all satellite clusters, 9 as of 070429*/
 
 #ifdef  SUITENINIT
@@ -117,6 +117,8 @@ struct bindefinition bin[MAXBINS] =
        180, 085.295, 244.085, 203.815, 065.880, 181.130, 054.680, 086.035 ,180},
            {/* 11 */ "5d", 1, "certain", "yellow     ", "ord", NULL,
        180, 079.671, 202.471, 063.064, 068.164, 143.450, 049.664, 082.757 ,180},
+           {/* 12 */ "3g", 1, "wannabe", "gray       ", "ord", NULL,
+       180, 084.000, 195.000, 146.000, 170.000, 170.000, 052.000, 084.000 ,180},
            {/*  N */ "!!", 0, "nothing", "white      ", "out", NULL,
             0,0,0,0,0,0,0,0,0 } /*trailing cluster with LOK==0*/
          }
@@ -358,8 +360,8 @@ extern float zetamin   , zetamax   ;
 #ifdef DEFINITIONS
    char  axeslimitsversion[] = "070326"; 
    float epsilonmin = 155, epsilonmax = 310; /*070130*/
-   float delta3min  =  55, delta3max  = 110;
-   float delta2min  = 120, delta2max  = 175;
+   float delta3min  =  60, delta3max  = 105; /* changed by S.J. on 06/06/2011 */
+   float delta2min  = 125, delta2max  = 165;
    float gammapmin  =  20, gammapmax  =  95; /*max 070326*/
    float gammatmin  = 140, gammatmax  = 215; /*max 070326*/
    float gammammin  = 260, gammammax  = 335; /*max 070326*/
@@ -381,11 +383,11 @@ SUITENINIT int   dominate[13], satellites[13][4];
 SUITENINIT float clusterav[13][MAXCLST][8];
 
                       /*flags*/
-SUITENINIT int   Lsuitesin,Lresiduesin,NptIDfields,Nanglefields,Lnewfile;
-SUITENINIT int   Lstringout,Lhelpout,Lchangesout,Lkinemageout;
+SUITENINIT int   Lsuitesin,Lresiduesin,NptIDfields,Nanglefields,Lnewfile,altIDfield; /* added altIDfield and altID variable - S.J. 01/07/2014*/
+SUITENINIT int   Lstringout,Lhelpout,Lchangesout,Lkinemageout,LNptIDfields,LaltIDfield,Luseincorrect,LaltID; /* added last four variables as flags to check for correct usage of altIDfield - S.J. 01/07/2014*/
 SUITENINIT int   Lreportout,Ltestout; 
 SUITENINIT int   Lchart,Lsourout,Letatheta,Ldangle; /*070521,070524,070525*/
-SUITENINIT char  NameStr[256];
+SUITENINIT char  NameStr[256],altID[2]; /* last variable added by S.J. 01/07/2014*/
 SUITENINIT int   Lsequence, Loverlap, Loneline; /*070409*/
 SUITENINIT int   Lwannabe; /*070429*/
 


=====================================
suiteninpt.c
=====================================
@@ -7,8 +7,9 @@
 
 #include "suiteninit.h"
 #include "suitenscrt.h"
+#include "suitenutil.h" 
 
-/****getresidue()*************************************************************/
+/****getresidue()*************************************************************/ 
 int  getresidue(void)
 {
    int LOK=0;
@@ -24,7 +25,7 @@ int  getresidue(void)
    {
       LOK = interpretresiduerecord();
       /* ptID: : :alpha:beta:gamma:delta:epsilon:zeta */
-      /*loads ptID[NptIDfields], angle[6] */
+      /*loads ptID[NptIDfields], angle[6] */ 
       if(LOK)
       {
          movenewtooldresidue();
@@ -63,7 +64,7 @@ int  loadsuite(void)
     int  j=0,k=0,n=0;
 
     n=0;
-    for(j=1; j<=NptIDfields; j++)
+    for(j=1; j<=NptIDfields; j++) 
     {
        for(k=0; k<32; k++)
        {
@@ -95,7 +96,7 @@ int  movenewtooldresidue(void)
     {
        strcpy(oldresidueptr->ptID[j],newresidueptr->ptID[j]);
     }
-    oldresidueptr->basechr[0],newresidueptr->basechr[0]; /*070412*/
+    //oldresidueptr->basechr[0],newresidueptr->basechr[0]; /*070412*/
     oldresidueptr->basechr[0] = '\0';
     oldresidueptr->alpha   = newresidueptr->alpha;
     oldresidueptr->beta    = newresidueptr->beta;
@@ -114,7 +115,7 @@ void printresidue(char* type)
     struct residuestruct* theresidueptr;
 
     if(strcmp(type,"old")==0) {theresidueptr = oldresidueptr;}
-    else {theresidueptr = newresidueptr;} 
+    else {theresidueptr = newresidueptr;}
     fprintf(stderr,"%s ",type);
     for(j=1; j<=NptIDfields; j++)
     {
@@ -180,7 +181,7 @@ int  loadnewresidue(void)
 /*___loadnewresidue()________________________________________________________*/
 
 /****interpretdanglerecord()**************************************************/
-int  interpretdanglerecord(void)
+int  interpretdanglerecord(void) 
 {
    int  i=0,j=0,k=0,n=0,ns=0,nan=0;
    char numstr[256];
@@ -204,12 +205,12 @@ int  interpretdanglerecord(void)
                   {
                      ptID[n][i] = texts[ns+i];
                   }
-                  if(n == NptIDfields) 
+                  if(n == NptIDfields)
                   {
                      ptID[n][k] = '\0'; /*overwrite last : character*/
                               /*so last char of last field is a Base name char*/
                       /*and this last field is the full 3char Base name*/
-                     if(strlen(ptID[n]) == 3) 
+                     if(strlen(ptID[n]) == 3)
                      { /*interpret as Base name --> 1char   070412 */
                         if     (strstr(NAListA, ptID[n])) {basechr[0] = 'A';}
                         else if(strstr(NAListG, ptID[n])) {basechr[0] = 'G';}
@@ -220,7 +221,7 @@ int  interpretdanglerecord(void)
                      }
                      else {basechr[0] = 'Z';}
                      basechr[1] = '\0';
-                  } 
+                  }
                   else {ptID[n][k+1] = '\0';} /* not overwrite : character*/
                }
                /*reset for another field*/
@@ -278,12 +279,16 @@ int  interpretresiduerecord(void)
                   {
                      ptID[n][i] = texts[ns+i];
                   }
-                  if(n == NptIDfields) 
+                  if(n == NptIDfields)
                   {
                      ptID[n][k] = '\0'; /*overwrite last : character*/
                               /*so last char of last field is a Base name char*/
                       /*and this last field is the full 3char Base name*/
-                     if(strlen(ptID[n]) == 3) 
+                      if(!strcmp(ptID[n]," DA") || !strcmp(ptID[n]," DG") || !strcmp(ptID[n]," DC") || !strcmp(ptID[n]," DT")) // SJ - 09/17/2014 to ignore DNA residues
+                      {
+                          return(0);
+                      }
+                     if(strlen(ptID[n]) == 3)
                      { /*interpret as Base name --> 1char   070412 */
                         if     (strstr(NAListA, ptID[n])) {basechr[0] = 'A';}
                         else if(strstr(NAListG, ptID[n])) {basechr[0] = 'G';}
@@ -294,7 +299,7 @@ int  interpretresiduerecord(void)
                      }
                      else {basechr[0] = 'Z';}
                      basechr[1] = '\0';
-                  } 
+                  }
                   else {ptID[n][k+1] = '\0';} /* not overwrite : character*/
                }
                /*reset for another field*/
@@ -323,6 +328,13 @@ int  interpretresiduerecord(void)
          if(texts[j] == '?') {nan = 1;} /*NOT a number*/
       }
    }/*loop through inputed line*/
+   if(LaltIDfield) /* if the altIDfield specified - S.J. 01/07/2014*/
+   { 
+        if(!LaltID) /* if the user has not specified which alt to calculate for, calculate for altA*/
+        	altID[0]='A';
+	if(!CompArgStr(ptID[altIDfield],altID,1) && !CompArgStr(ptID[altIDfield]," ",1)) 
+         		return(0);
+   }
    return(1);
 }
 /*___interpretresiduerecord()________________________________________________*/
@@ -377,7 +389,7 @@ int  interpretsuiterecord(void)
       {/* input character */
          if(texts[j] != ' ') /*ignore leading blanks*/
          if(texts[j] == '_' || texts[j] == '?' ){nan = 1;} /*070525*/
-         {numstr[k++] = texts[j];} 
+         {numstr[k++] = texts[j];}
       }
    }/*loop through inputed line*/
    /*presume suite kinemage record was intact and good...*/
@@ -390,7 +402,7 @@ int  interpretsuiterecord(void)
        suiteptr->ang[0] = suiteptr->chim = angle[0];
        suiteptr->ang[8] = suiteptr->chi  = angle[7+i];
     }
-    else 
+    else
     {
        i=0;
        suiteptr->ang[0] = suiteptr->chim = 180.0;
@@ -404,6 +416,7 @@ int  interpretsuiterecord(void)
     suiteptr->ang[6] = suiteptr->gamma   = angle[5+i];
     suiteptr->ang[7] = suiteptr->delta   = angle[6+i];
     /*now DO NOT need to loadsuite() */
+    return(1);
 }
 /*___interpretsuiterecord()________________________________________________*/
 
@@ -482,9 +495,9 @@ float    floatfromstr(char ins[256])
 
         freturn = 0.0;
         Lstart = 1;
-        n = 0; 
+        n = 0;
         m = 0;
-        OK = 1;    
+        OK = 1;
         if(ins[0] != '\0')
         {/* not zero length C string */
             while(OK)
@@ -495,7 +508,7 @@ float    floatfromstr(char ins[256])
                         ins[n] == '3' || ins[n] == '4' || ins[n] == '5' ||
                         ins[n] == '6' || ins[n] == '7' || ins[n] == '8' ||
                         ins[n] == '9' || ins[n] == '.' || ins[n] == '-'   )
-                { 
+                {
                     s[m] = ins[n];
                     m++;
                     Lstart = 0;


=====================================
suitenout.c
=====================================
@@ -559,6 +559,8 @@ void usageout(void) /* -h  -help */
      "dangle \"alpha, beta, gamma, delta, epsilon, zeta\" in.pdb >out.dngl\n");
   fprintf(stderr,
      "label:model:chain:number:ins:type:alpha:beta:gamma:delta:epsilon:zeta\n");
+  fprintf(stderr,"if the file has alternate conformations, then use both -pointIDfields # -altIDfield # to specify the number of pointID fields and which field contains the altID\n"); /* S.J. 01/07/2014*/
+  fprintf(stderr,"use -altIDval <altID> to specify which alternate conformation to calculate suite for. By default calculated for alt A\n");
   fprintf(stderr,"-suitein presumes point records from a kinemage\n");
   fprintf(stderr,"{pointID} 7 or 9 anglefields \n");
   fprintf(stderr,


=====================================
suitenutil.c
=====================================
@@ -66,7 +66,8 @@ float dotproduct(float* first, float* secnd, int nang)
    int k=0,kmin=0,kmax=0;
    float answer=0;
 
-   if(nang = 4){kmin=2; kmax=5;}
+   //if(nang = 4){kmin=2; kmax=5;}
+   if(nang == 4){kmin=2; kmax=5;}
    else {kmin=1; kmax=7;}
 
    answer = 0;
@@ -76,7 +77,7 @@ float dotproduct(float* first, float* secnd, int nang)
       /* deltam epsilon zeta   alpha  beta   gamma  delta */
       /*    X                                  X      X   */
       /*    X not used in 4 angle calc*/
-      
+
       answer = answer + (first[k] * secnd[k]);
    }
    return(answer);



View it on GitLab: https://salsa.debian.org/med-team/suitename/-/compare/621a212c933d5eb3a53380eabd5014e7f35044ba...c9a5fe6ceb1a071eb6db386d82de1a821ca78547

-- 
View it on GitLab: https://salsa.debian.org/med-team/suitename/-/compare/621a212c933d5eb3a53380eabd5014e7f35044ba...c9a5fe6ceb1a071eb6db386d82de1a821ca78547
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/20201106/b006fa9e/attachment-0001.html>


More information about the debian-med-commit mailing list