Loading beagleutil/ChromIds.java +5 −6 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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. Loading @@ -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<>(); } /** Loading Loading @@ -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); } Loading main/Main.java +3 −3 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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; Loading vcf/AllData.java +2 −4 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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) { Loading vcf/RestrictedVcfWindow.java +4 −2 Original line number Diff line number Diff line Loading @@ -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; } Loading vcf/TargetData.java +1 −2 Original line number Diff line number Diff line Loading @@ -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 Loading
beagleutil/ChromIds.java +5 −6 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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. Loading @@ -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<>(); } /** Loading Loading @@ -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); } Loading
main/Main.java +3 −3 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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; Loading
vcf/AllData.java +2 −4 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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) { Loading
vcf/RestrictedVcfWindow.java +4 −2 Original line number Diff line number Diff line Loading @@ -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; } Loading
vcf/TargetData.java +1 −2 Original line number Diff line number Diff line Loading @@ -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