use of org.broadinstitute.hellbender.utils.fermi.FermiLiteAssembly.Connection in project gatk by broadinstitute.
the class AlignedAssemblyOrExcuse method serialize.
private void serialize(final Kryo kryo, final Output output) {
output.writeInt(assemblyId);
output.writeString(errorMessage);
if (errorMessage == null) {
final int nContigs = assembly.getNContigs();
final Map<Contig, Integer> contigMap = new HashMap<>();
output.writeInt(nContigs);
for (int idx = 0; idx != nContigs; ++idx) {
final Contig contig = assembly.getContig(idx);
writeContig(contig, output);
contigMap.put(contig, idx);
}
for (final Contig contig : assembly.getContigs()) {
final List<Connection> connections = contig.getConnections();
output.writeInt(connections.size());
for (final Connection connection : connections) {
writeConnection(connection, contigMap, output);
}
}
for (final List<BwaMemAlignment> alignments : contigAlignments) {
output.writeInt(alignments.size());
for (final BwaMemAlignment alignment : alignments) {
writeAlignment(alignment, output);
}
}
}
}
use of org.broadinstitute.hellbender.utils.fermi.FermiLiteAssembly.Connection in project gatk by broadinstitute.
the class AlignedAssemblyOrExcuse method readConnection.
private static Connection readConnection(final Input input, final List<Contig> contigs) {
final Contig target = contigs.get(input.readInt());
final int overlapLen = input.readInt();
final boolean isRC = input.readBoolean();
final boolean isTargetRC = input.readBoolean();
return new Connection(target, overlapLen, isRC, isTargetRC);
}
Aggregations