Commit a65a6809 authored by Dylan Aïssi's avatar Dylan Aïssi
Browse files

New upstream version 5.0-190703+dfsg

parent 984ed8b0
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -18,10 +18,11 @@
 */
package beagleutil;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * <p>Class {@code ChromIds} is a singleton class that represents a
@@ -38,7 +39,7 @@ public final class ChromIds {
    private final ThreadSafeIndexer<String> indexer;

    private final ConcurrentMap<String, Integer> map;
    private volatile CopyOnWriteArrayList<String> ids;
    private volatile List<String> ids;

    private ChromIds() {
        // private constructor to restrict instantiation.
@@ -46,7 +47,7 @@ public final class ChromIds {
        this.indexer = new ThreadSafeIndexer<>(initCapacity);

        this.map = new ConcurrentHashMap<>(initCapacity);
        this.ids = new CopyOnWriteArrayList<>(new String[0]);
        this.ids = new ArrayList<>();
    }

    /**
@@ -149,9 +150,7 @@ public final class ChromIds {
     */
    public String id(int index) {
        if (index >= ids.size()) {
            for (int j=ids.size(), n=indexer.size(); j<n; ++j) {
                ids.add(indexer.item(j));
            }
            ids = indexer.items();
        }
        return ids.get(index);
    }
+3 −3
Original line number Diff line number Diff line
@@ -68,8 +68,8 @@ public class Main {
     * The program name and version.
     */
    public static final String VERSION = "(version 5.0)";
    public static final String PROGRAM = "beagle.28Sep18.793.jar";
    public static final String COMMAND = "java -jar beagle.28Sep18.793.jar";
    public static final String PROGRAM = "beagle.03Jul19.b33.jar";
    public static final String COMMAND = "java -jar beagle.03Jul19.b33.jar";

    /**
     * The copyright string.
@@ -81,7 +81,7 @@ public class Main {
     */
    public static final String SHORT_HELP = Main.PROGRAM + " " + VERSION
            + Const.nl + Main.COPYRIGHT
            + Const.nl + "Enter \"java -jar beagle.28Sep18.793.jar\" to "
            + Const.nl + "Enter \"java -jar beagle.03Jul19.b33.jar\" to "
            + "list command line argument";

    private final Par par;
+2 −4
Original line number Diff line number Diff line
@@ -130,8 +130,7 @@ public class AllData implements Data {

    private static GT targGTWindow(Samples samples, GTRec[] targData,
            Pedigree ped) {
        GT gt = new BasicGT(samples, targData);
        return gt.isGTData() ? new XBasicGT(gt, ped) : gt;
        return new BasicGT(samples, targData);
    }

    @Override
@@ -214,8 +213,7 @@ public class AllData implements Data {
        for (int j=0; j<refMarkerIndex.length; ++j) {
            restricted[j] = vma[refMarkerIndex[j]];
        }
        GT gt = new BasicGT(samples, restricted);
        return gt.isGTData() ? new XBasicGT(gt, ped) : gt;
        return new BasicGT(samples, restricted);
    }

    private void setRefHaplotypes(RefGT refGT) {
+4 −2
Original line number Diff line number Diff line
@@ -98,10 +98,12 @@ public class RestrictedVcfWindow implements Closeable {
        for (int j = fullOverlap, n=nextMarkers.nMarkers(); j<n; ++j) {
            Marker m = nextMarkers.marker(j);
            if (next!=null && next.marker().chromIndex()==m.chromIndex()) {
                while (next != null && next.marker().pos() < m.pos()) {
                while (next != null && next.marker().chromIndex()==m.chromIndex()
                        && next.marker().pos()<m.pos()) {
                    next = it.hasNext() ? it.next() : null;
                }
                while (next != null && next.marker().pos() == m.pos()
                while (next != null && next.marker().chromIndex()==m.chromIndex()
                        && next.marker().pos()==m.pos()
                        && next.marker().equals(m)==false) {
                    next = it.hasNext() ? it.next() : null;
                }
+1 −2
Original line number Diff line number Diff line
@@ -88,8 +88,7 @@ public class TargetData implements Data {

    private static GT targGT(Samples samples, GTRec[] targData,
            Pedigree ped) {
        GT gt = new BasicGT(samples, targData);
        return gt.isGTData() ? new XBasicGT(gt, ped) : gt;
        return new BasicGT(samples, targData);
    }

    @Override
Loading