use of org.broadinstitute.hellbender.tools.walkers.haplotypecaller.readthreading.TestingReadThreadingGraph in project gatk by broadinstitute.
the class AssemblyResultSetUnitTest method assemblyResults.
@DataProvider(name = "assemblyResults")
public Iterator<Object[]> assemblyResults() {
final int size = THREE_KS_GRAPH_AND_HAPLOTYPES.length * (1 + TEN_KS_GRAPH_AND_HAPLOTYPES.length);
final Object[][] result = new Object[size][];
for (int i = 0; i < THREE_KS_GRAPH_AND_HAPLOTYPES.length; i++) {
final ReadThreadingGraph rtg = new TestingReadThreadingGraph((String) THREE_KS_GRAPH_AND_HAPLOTYPES[i][0]);
final AssemblyResult ar = new AssemblyResult(AssemblyResult.Status.ASSEMBLED_SOME_VARIATION, rtg.toSequenceGraph(), rtg);
final Object[] haplotypeStrings = (Object[]) THREE_KS_GRAPH_AND_HAPLOTYPES[i][1];
final Haplotype[] haplotypes = new Haplotype[haplotypeStrings.length];
for (int j = 0; j < haplotypeStrings.length; j++) {
haplotypes[j] = new Haplotype(((String) haplotypeStrings[j]).getBytes(), j == 0);
haplotypes[j].setGenomeLocation(genomeLocParser.createGenomeLoc("1", 1, haplotypes[j].length() + 1));
}
result[i] = new Object[] { Collections.singletonList(ar), Arrays.asList(Arrays.asList(haplotypes)) };
for (int j = 0; j < TEN_KS_GRAPH_AND_HAPLOTYPES.length; j++) {
final ReadThreadingGraph rtg10 = new TestingReadThreadingGraph((String) TEN_KS_GRAPH_AND_HAPLOTYPES[j][0]);
final AssemblyResult ar10 = new AssemblyResult(AssemblyResult.Status.ASSEMBLED_SOME_VARIATION, rtg10.toSequenceGraph(), rtg10);
final Object[] haplotypeStrings10 = (Object[]) TEN_KS_GRAPH_AND_HAPLOTYPES[j][1];
final Haplotype[] haplotype10 = new Haplotype[haplotypeStrings10.length];
for (int k = 0; k < haplotypeStrings10.length; k++) {
haplotype10[k] = new Haplotype(((String) haplotypeStrings10[k]).getBytes(), false);
haplotype10[k].setGenomeLocation(genomeLocParser.createGenomeLoc("1", 1, haplotype10[k].length() + 1));
}
result[THREE_KS_GRAPH_AND_HAPLOTYPES.length + i * TEN_KS_GRAPH_AND_HAPLOTYPES.length + j] = new Object[] { Arrays.asList(ar, ar10), Arrays.asList(Arrays.asList(haplotypes), Arrays.asList(haplotype10)) };
}
}
return Arrays.asList(result).iterator();
}
use of org.broadinstitute.hellbender.tools.walkers.haplotypecaller.readthreading.TestingReadThreadingGraph in project gatk-protected by broadinstitute.
the class AssemblyResultSetUnitTest method assemblyResults.
@DataProvider(name = "assemblyResults")
public Iterator<Object[]> assemblyResults() {
final int size = THREE_KS_GRAPH_AND_HAPLOTYPES.length * (1 + TEN_KS_GRAPH_AND_HAPLOTYPES.length);
final Object[][] result = new Object[size][];
for (int i = 0; i < THREE_KS_GRAPH_AND_HAPLOTYPES.length; i++) {
final ReadThreadingGraph rtg = new TestingReadThreadingGraph((String) THREE_KS_GRAPH_AND_HAPLOTYPES[i][0]);
final AssemblyResult ar = new AssemblyResult(AssemblyResult.Status.ASSEMBLED_SOME_VARIATION, rtg.toSequenceGraph(), rtg);
final Object[] haplotypeStrings = (Object[]) THREE_KS_GRAPH_AND_HAPLOTYPES[i][1];
final Haplotype[] haplotypes = new Haplotype[haplotypeStrings.length];
for (int j = 0; j < haplotypeStrings.length; j++) {
haplotypes[j] = new Haplotype(((String) haplotypeStrings[j]).getBytes(), j == 0);
haplotypes[j].setGenomeLocation(genomeLocParser.createGenomeLoc("1", 1, haplotypes[j].length() + 1));
}
result[i] = new Object[] { Collections.singletonList(ar), Arrays.asList(Arrays.asList(haplotypes)) };
for (int j = 0; j < TEN_KS_GRAPH_AND_HAPLOTYPES.length; j++) {
final ReadThreadingGraph rtg10 = new TestingReadThreadingGraph((String) TEN_KS_GRAPH_AND_HAPLOTYPES[j][0]);
final AssemblyResult ar10 = new AssemblyResult(AssemblyResult.Status.ASSEMBLED_SOME_VARIATION, rtg10.toSequenceGraph(), rtg10);
final Object[] haplotypeStrings10 = (Object[]) TEN_KS_GRAPH_AND_HAPLOTYPES[j][1];
final Haplotype[] haplotype10 = new Haplotype[haplotypeStrings10.length];
for (int k = 0; k < haplotypeStrings10.length; k++) {
haplotype10[k] = new Haplotype(((String) haplotypeStrings10[k]).getBytes(), false);
haplotype10[k].setGenomeLocation(genomeLocParser.createGenomeLoc("1", 1, haplotype10[k].length() + 1));
}
result[THREE_KS_GRAPH_AND_HAPLOTYPES.length + i * TEN_KS_GRAPH_AND_HAPLOTYPES.length + j] = new Object[] { Arrays.asList(ar, ar10), Arrays.asList(Arrays.asList(haplotypes), Arrays.asList(haplotype10)) };
}
}
return Arrays.asList(result).iterator();
}
Aggregations