[med-svn] [Git][med-team/beagle][upstream] New upstream version 5.0-180915+dfsg

Dylan Aïssi gitlab at salsa.debian.org
Sun Sep 16 13:23:37 BST 2018


Dylan Aïssi pushed to branch upstream at Debian Med / beagle


Commits:
169b5c18 by Dylan Aïssi at 2018-09-16T12:01:59Z
New upstream version 5.0-180915+dfsg
- - - - -


4 changed files:

- imp/ImputedRecBuilder.java
- imp/ImputedVcfWriter.java
- main/Main.java
- main/MainHelper.java


Changes:

=====================================
imp/ImputedRecBuilder.java
=====================================
@@ -261,20 +261,27 @@ public final class ImputedRecBuilder {
     }
 
     private void printInfoField(PrintWriter out, boolean isImputed) {
-        for (int a=1; a<nAlleles; ++a) {
-            out.print( (a==1) ? "DR2=" : Const.comma);
-            out.print(R2_VALS[(int) Math.rint(100*r2(a))]);
-        }
-        for (int a=1; a<nAlleles; ++a) {
-            out.print( (a==1) ? ";AF=" : Const.comma);
-            out.print(DF4.format(sumAlProbs[a]/nHaps));
-        }
-        if (marker.end()!=-1) {
-            out.print(";END=");
-            out.print(marker.end());
+        if (nAlleles==1) {
+            if (isImputed) {
+                out.print("IMP");
+            }
         }
-        if (isImputed) {
-            out.print(";IMP");
+        else {
+            for (int a=1; a<nAlleles; ++a) {
+                out.print( (a==1) ? "DR2=" : Const.comma);
+                out.print(R2_VALS[(int) Math.rint(100*r2(a))]);
+            }
+            for (int a=1; a<nAlleles; ++a) {
+                out.print( (a==1) ? ";AF=" : Const.comma);
+                out.print(DF4.format(sumAlProbs[a]/nHaps));
+            }
+            if (marker.end()!=-1) {
+                out.print(";END=");
+                out.print(marker.end());
+            }
+            if (isImputed) {
+                out.print(";IMP");
+            }
         }
     }
 
@@ -294,6 +301,7 @@ public final class ImputedRecBuilder {
 
     private static String[] defaultHomRefFields() {
         String[] sa = new String[5];
+        sa[1] = Const.tab + "0|0";
         sa[2] = Const.tab + "0|0:0";
         for (int j=3; j<sa.length; ++j) {
             sa[j] = sa[j-1] + ",0";
@@ -303,7 +311,7 @@ public final class ImputedRecBuilder {
 
     private static String[] homRefFields(boolean ap, boolean gp) {
         String[] homRefField = new String[DEFAULT_HOM_REF_FIELDS.length];
-        for (int nAl=2; nAl<homRefField.length; ++nAl) {
+        for (int nAl=1; nAl<homRefField.length; ++nAl) {
             StringBuilder sb = new StringBuilder(DEFAULT_HOM_REF_FIELDS[nAl]);
             if (ap) {
                 for (int a=1; a<nAl; ++a) {


=====================================
imp/ImputedVcfWriter.java
=====================================
@@ -61,7 +61,9 @@ public class ImputedVcfWriter {
      * @param refEnd an upper bound (exclusive) on the reference markers
      * that will be printed
      * @throws IndexOutOfBoundsException if
-     * {@code (minRefStart < 0 || maxRefEnd > impData.refGT().nMarkers())}
+     * {@code (refStart < 0 || refEnd > impData.refGT().nMarkers())}
+     * @throws IndexOutOfBoundsException if
+     * {@code targCluster < 0 || targCluster >= impData.nClusters()}
      * @throws NullPointerException if {@code impData == null}
      */
     public ImputedVcfWriter(ImpData impData, int targCluster, int refStart,
@@ -76,18 +78,16 @@ public class ImputedVcfWriter {
         this.targCluster = targCluster;
         if (targCluster==0) {
             this.refStart = refStart;
-            int tmpClustEnd = Math.max(refStart, impData.refClusterEnd(targCluster));
-            this.clustEnd = Math.min(tmpClustEnd, refEnd);
-            this.refEnd = Math.min(impData.refClusterStart(targCluster + 1), refEnd);
         }
-        else if (targCluster < impData.nClusters()-1) {
+        else {
             this.refStart = Math.max(refStart, impData.refClusterStart(targCluster));
+        }
+        if (targCluster < impData.nClusters()-1) {
             int tmpClustEnd = Math.max(refStart, impData.refClusterEnd(targCluster));
             this.clustEnd = Math.min(tmpClustEnd, refEnd);
             this.refEnd = Math.min(impData.refClusterStart(targCluster + 1), refEnd);
         }
         else {
-            this.refStart = Math.max(refStart, impData.refClusterStart(targCluster));
             this.clustEnd = refEnd;
             this.refEnd = refEnd;
         }


=====================================
main/Main.java
=====================================
@@ -70,8 +70,8 @@ public class Main {
      * The program name and version.
      */
     public static final String VERSION = "(version 5.0)";
-    public static final String PROGRAM = "beagle.03Jul18.40b.jar";
-    public static final String COMMAND = "java -jar beagle.03Jul18.40b.jar";
+    public static final String PROGRAM = "beagle.15Sep18.8a0.jar";
+    public static final String COMMAND = "java -jar beagle.15Sep18.8a0.jar";
 
     /**
      * The copyright string.
@@ -83,7 +83,7 @@ public class Main {
      */
     public static final String SHORT_HELP = Main.PROGRAM + " " + VERSION
             + Const.nl + Main.COPYRIGHT
-            + Const.nl + "Enter \"java -jar beagle.03Jul18.40b.jar\" to "
+            + Const.nl + "Enter \"java -jar beagle.15Sep18.8a0.jar\" to "
             + "list command line argument";
 
     private final Par par;


=====================================
main/MainHelper.java
=====================================
@@ -101,7 +101,7 @@ public class MainHelper {
                     rand.nextLong());
             long t1 = System.nanoTime();
             PhaseLS.run(phaseData, estPhase, recombRegress);
-            if (recombRegress!=null) {
+            if (recombRegress!=null && recombRegress.cnt()>=100) {
                 recombFactor = recombFactor(cd, recombRegress);
             }
             long elapsedNanos = System.nanoTime() - t0;



View it on GitLab: https://salsa.debian.org/med-team/beagle/commit/169b5c18a063266b9cee252aec9e4bcc2cb76671

-- 
View it on GitLab: https://salsa.debian.org/med-team/beagle/commit/169b5c18a063266b9cee252aec9e4bcc2cb76671
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/20180916/040eba63/attachment-0001.html>


More information about the debian-med-commit mailing list