// Generated by the protocol buffer compiler.  DO NOT EDIT!

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "Alignments.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)

namespace goby {

namespace {

const ::google::protobuf::Descriptor* AlignmentCollection_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  AlignmentCollection_reflection_ = NULL;
const ::google::protobuf::Descriptor* AlignmentEntry_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  AlignmentEntry_reflection_ = NULL;
const ::google::protobuf::Descriptor* RelatedAlignmentEntry_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  RelatedAlignmentEntry_reflection_ = NULL;
const ::google::protobuf::Descriptor* SequenceVariation_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  SequenceVariation_reflection_ = NULL;
const ::google::protobuf::Descriptor* AlignmentHeader_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  AlignmentHeader_reflection_ = NULL;
const ::google::protobuf::Descriptor* IdentifierMapping_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  IdentifierMapping_reflection_ = NULL;
const ::google::protobuf::Descriptor* IdentifierInfo_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  IdentifierInfo_reflection_ = NULL;
const ::google::protobuf::Descriptor* AlignmentTooManyHits_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  AlignmentTooManyHits_reflection_ = NULL;
const ::google::protobuf::Descriptor* AmbiguousLocation_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  AmbiguousLocation_reflection_ = NULL;
const ::google::protobuf::Descriptor* AlignmentIndex_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  AlignmentIndex_reflection_ = NULL;

}  // namespace


void protobuf_AssignDesc_Alignments_2eproto() {
  protobuf_AddDesc_Alignments_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "Alignments.proto");
  GOOGLE_CHECK(file != NULL);
  AlignmentCollection_descriptor_ = file->message_type(0);
  static const int AlignmentCollection_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentCollection, alignment_entries_),
  };
  AlignmentCollection_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      AlignmentCollection_descriptor_,
      AlignmentCollection::default_instance_,
      AlignmentCollection_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentCollection, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentCollection, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(AlignmentCollection));
  AlignmentEntry_descriptor_ = file->message_type(1);
  static const int AlignmentEntry_offsets_[22] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, multiplicity_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, query_index_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, target_index_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, position_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, matching_reverse_strand_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, query_position_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, score_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, number_of_mismatches_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, number_of_indels_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, query_aligned_length_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, target_aligned_length_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, sequence_variations_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, query_length_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, mapping_quality_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, pair_flags_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, pair_alignment_link_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, fragment_index_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, spliced_forward_alignment_link_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, spliced_backward_alignment_link_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, spliced_flags_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, insert_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, sample_index_),
  };
  AlignmentEntry_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      AlignmentEntry_descriptor_,
      AlignmentEntry::default_instance_,
      AlignmentEntry_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentEntry, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(AlignmentEntry));
  RelatedAlignmentEntry_descriptor_ = file->message_type(2);
  static const int RelatedAlignmentEntry_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RelatedAlignmentEntry, target_index_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RelatedAlignmentEntry, position_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RelatedAlignmentEntry, fragment_index_),
  };
  RelatedAlignmentEntry_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      RelatedAlignmentEntry_descriptor_,
      RelatedAlignmentEntry::default_instance_,
      RelatedAlignmentEntry_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RelatedAlignmentEntry, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RelatedAlignmentEntry, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(RelatedAlignmentEntry));
  SequenceVariation_descriptor_ = file->message_type(3);
  static const int SequenceVariation_offsets_[5] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SequenceVariation, from_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SequenceVariation, to_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SequenceVariation, position_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SequenceVariation, read_index_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SequenceVariation, to_quality_),
  };
  SequenceVariation_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      SequenceVariation_descriptor_,
      SequenceVariation::default_instance_,
      SequenceVariation_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SequenceVariation, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SequenceVariation, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(SequenceVariation));
  AlignmentHeader_descriptor_ = file->message_type(4);
  static const int AlignmentHeader_offsets_[17] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, smallest_split_query_index_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, largest_split_query_index_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, query_name_mapping_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, target_name_mapping_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, number_of_queries_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, number_of_targets_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, number_of_aligned_reads_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, query_length_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, constant_query_length_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, target_length_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, sorted_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, indexed_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, query_lengths_stored_in_entries_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, aligner_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, aligner_version_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, version_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, sample_basename_),
  };
  AlignmentHeader_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      AlignmentHeader_descriptor_,
      AlignmentHeader::default_instance_,
      AlignmentHeader_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentHeader, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(AlignmentHeader));
  IdentifierMapping_descriptor_ = file->message_type(5);
  static const int IdentifierMapping_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(IdentifierMapping, mappings_),
  };
  IdentifierMapping_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      IdentifierMapping_descriptor_,
      IdentifierMapping::default_instance_,
      IdentifierMapping_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(IdentifierMapping, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(IdentifierMapping, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(IdentifierMapping));
  IdentifierInfo_descriptor_ = file->message_type(6);
  static const int IdentifierInfo_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(IdentifierInfo, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(IdentifierInfo, index_),
  };
  IdentifierInfo_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      IdentifierInfo_descriptor_,
      IdentifierInfo::default_instance_,
      IdentifierInfo_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(IdentifierInfo, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(IdentifierInfo, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(IdentifierInfo));
  AlignmentTooManyHits_descriptor_ = file->message_type(7);
  static const int AlignmentTooManyHits_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentTooManyHits, aligner_threshold_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentTooManyHits, hits_),
  };
  AlignmentTooManyHits_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      AlignmentTooManyHits_descriptor_,
      AlignmentTooManyHits::default_instance_,
      AlignmentTooManyHits_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentTooManyHits, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentTooManyHits, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(AlignmentTooManyHits));
  AmbiguousLocation_descriptor_ = file->message_type(8);
  static const int AmbiguousLocation_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AmbiguousLocation, query_index_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AmbiguousLocation, at_least_number_of_hits_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AmbiguousLocation, length_of_match_),
  };
  AmbiguousLocation_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      AmbiguousLocation_descriptor_,
      AmbiguousLocation::default_instance_,
      AmbiguousLocation_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AmbiguousLocation, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AmbiguousLocation, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(AmbiguousLocation));
  AlignmentIndex_descriptor_ = file->message_type(9);
  static const int AlignmentIndex_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentIndex, target_position_offsets_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentIndex, offsets_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentIndex, absolute_positions_),
  };
  AlignmentIndex_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      AlignmentIndex_descriptor_,
      AlignmentIndex::default_instance_,
      AlignmentIndex_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentIndex, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AlignmentIndex, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(AlignmentIndex));
}

namespace {

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
inline void protobuf_AssignDescriptorsOnce() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
                 &protobuf_AssignDesc_Alignments_2eproto);
}

void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    AlignmentCollection_descriptor_, &AlignmentCollection::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    AlignmentEntry_descriptor_, &AlignmentEntry::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    RelatedAlignmentEntry_descriptor_, &RelatedAlignmentEntry::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    SequenceVariation_descriptor_, &SequenceVariation::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    AlignmentHeader_descriptor_, &AlignmentHeader::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    IdentifierMapping_descriptor_, &IdentifierMapping::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    IdentifierInfo_descriptor_, &IdentifierInfo::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    AlignmentTooManyHits_descriptor_, &AlignmentTooManyHits::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    AmbiguousLocation_descriptor_, &AmbiguousLocation::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    AlignmentIndex_descriptor_, &AlignmentIndex::default_instance());
}

}  // namespace

void protobuf_ShutdownFile_Alignments_2eproto() {
  delete AlignmentCollection::default_instance_;
  delete AlignmentCollection_reflection_;
  delete AlignmentEntry::default_instance_;
  delete AlignmentEntry_reflection_;
  delete RelatedAlignmentEntry::default_instance_;
  delete RelatedAlignmentEntry_reflection_;
  delete SequenceVariation::default_instance_;
  delete SequenceVariation_reflection_;
  delete AlignmentHeader::default_instance_;
  delete AlignmentHeader_reflection_;
  delete IdentifierMapping::default_instance_;
  delete IdentifierMapping_reflection_;
  delete IdentifierInfo::default_instance_;
  delete IdentifierInfo_reflection_;
  delete AlignmentTooManyHits::default_instance_;
  delete AlignmentTooManyHits_reflection_;
  delete AmbiguousLocation::default_instance_;
  delete AmbiguousLocation_reflection_;
  delete AlignmentIndex::default_instance_;
  delete AlignmentIndex_reflection_;
}

void protobuf_AddDesc_Alignments_2eproto() {
  static bool already_here = false;
  if (already_here) return;
  already_here = true;
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\020Alignments.proto\022\004goby\"F\n\023AlignmentCol"
    "lection\022/\n\021alignment_entries\030\001 \003(\0132\024.gob"
    "y.AlignmentEntry\"\270\005\n\016AlignmentEntry\022\024\n\014m"
    "ultiplicity\030\007 \001(\r\022\023\n\013query_index\030\001 \002(\r\022\024"
    "\n\014target_index\030\002 \002(\r\022\020\n\010position\030\003 \002(\r\022\037"
    "\n\027matching_reverse_strand\030\006 \002(\010\022\026\n\016query"
    "_position\030\005 \001(\r\022\r\n\005score\030\004 \001(\002\022\034\n\024number"
    "_of_mismatches\030\010 \001(\r\022\030\n\020number_of_indels"
    "\030\t \001(\r\022\034\n\024query_aligned_length\030\013 \001(\r\022\035\n\025"
    "target_aligned_length\030\014 \001(\r\0224\n\023sequence_"
    "variations\030\r \003(\0132\027.goby.SequenceVariatio"
    "n\022\024\n\014query_length\030\n \001(\r\022\027\n\017mapping_quali"
    "ty\030\016 \001(\005\022\022\n\npair_flags\030\017 \001(\r\0228\n\023pair_ali"
    "gnment_link\030\020 \001(\0132\033.goby.RelatedAlignmen"
    "tEntry\022\026\n\016fragment_index\030\021 \001(\r\022C\n\036splice"
    "d_forward_alignment_link\030\022 \001(\0132\033.goby.Re"
    "latedAlignmentEntry\022D\n\037spliced_backward_"
    "alignment_link\030\026 \001(\0132\033.goby.RelatedAlign"
    "mentEntry\022\025\n\rspliced_flags\030\023 \001(\r\022\023\n\013inse"
    "rt_size\030\024 \001(\r\022\024\n\014sample_index\030\025 \001(\r\"W\n\025R"
    "elatedAlignmentEntry\022\024\n\014target_index\030\001 \002"
    "(\r\022\020\n\010position\030\002 \002(\r\022\026\n\016fragment_index\030\003"
    " \002(\r\"g\n\021SequenceVariation\022\014\n\004from\030\002 \002(\t\022"
    "\n\n\002to\030\001 \002(\t\022\020\n\010position\030\003 \002(\r\022\022\n\nread_in"
    "dex\030\005 \002(\r\022\022\n\nto_quality\030\004 \001(\014\"\215\004\n\017Alignm"
    "entHeader\022\"\n\032smallest_split_query_index\030"
    "\t \001(\r\022!\n\031largest_split_query_index\030\013 \001(\r"
    "\0223\n\022query_name_mapping\030\001 \001(\0132\027.goby.Iden"
    "tifierMapping\0224\n\023target_name_mapping\030\002 \001"
    "(\0132\027.goby.IdentifierMapping\022\031\n\021number_of"
    "_queries\030\005 \001(\r\022\031\n\021number_of_targets\030\006 \001("
    "\r\022\037\n\027number_of_aligned_reads\030\007 \001(\r\022\030\n\014qu"
    "ery_length\030\003 \003(\rB\002\030\001\022\035\n\025constant_query_l"
    "ength\030\n \001(\r\022\025\n\rtarget_length\030\010 \003(\r\022\016\n\006so"
    "rted\030\r \001(\010\022\017\n\007indexed\030\016 \001(\010\022\'\n\037query_len"
    "gths_stored_in_entries\030\017 \001(\010\022\024\n\014aligner_"
    "name\030\021 \001(\t\022\027\n\017aligner_version\030\022 \001(\t\022\017\n\007v"
    "ersion\030\031 \001(\t\022\027\n\017sample_basename\030\036 \003(\t\";\n"
    "\021IdentifierMapping\022&\n\010mappings\030\001 \003(\0132\024.g"
    "oby.IdentifierInfo\"-\n\016IdentifierInfo\022\014\n\004"
    "name\030\001 \002(\t\022\r\n\005index\030\002 \002(\r\"X\n\024AlignmentTo"
    "oManyHits\022\031\n\021aligner_threshold\030\002 \002(\r\022%\n\004"
    "hits\030\001 \003(\0132\027.goby.AmbiguousLocation\"b\n\021A"
    "mbiguousLocation\022\023\n\013query_index\030\001 \002(\r\022\037\n"
    "\027at_least_number_of_hits\030\002 \002(\r\022\027\n\017length"
    "_of_match\030\003 \001(\r\"j\n\016AlignmentIndex\022#\n\027tar"
    "get_position_offsets\030\001 \003(\rB\002\020\001\022\023\n\007offset"
    "s\030\002 \003(\004B\002\020\001\022\036\n\022absolute_positions\030\003 \003(\004B"
    "\002\020\001B\'\n#edu.cornell.med.icb.goby.alignmen"
    "tsH\001", 1964);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "Alignments.proto", &protobuf_RegisterTypes);
  AlignmentCollection::default_instance_ = new AlignmentCollection();
  AlignmentEntry::default_instance_ = new AlignmentEntry();
  RelatedAlignmentEntry::default_instance_ = new RelatedAlignmentEntry();
  SequenceVariation::default_instance_ = new SequenceVariation();
  AlignmentHeader::default_instance_ = new AlignmentHeader();
  IdentifierMapping::default_instance_ = new IdentifierMapping();
  IdentifierInfo::default_instance_ = new IdentifierInfo();
  AlignmentTooManyHits::default_instance_ = new AlignmentTooManyHits();
  AmbiguousLocation::default_instance_ = new AmbiguousLocation();
  AlignmentIndex::default_instance_ = new AlignmentIndex();
  AlignmentCollection::default_instance_->InitAsDefaultInstance();
  AlignmentEntry::default_instance_->InitAsDefaultInstance();
  RelatedAlignmentEntry::default_instance_->InitAsDefaultInstance();
  SequenceVariation::default_instance_->InitAsDefaultInstance();
  AlignmentHeader::default_instance_->InitAsDefaultInstance();
  IdentifierMapping::default_instance_->InitAsDefaultInstance();
  IdentifierInfo::default_instance_->InitAsDefaultInstance();
  AlignmentTooManyHits::default_instance_->InitAsDefaultInstance();
  AmbiguousLocation::default_instance_->InitAsDefaultInstance();
  AlignmentIndex::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_Alignments_2eproto);
}

// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_Alignments_2eproto {
  StaticDescriptorInitializer_Alignments_2eproto() {
    protobuf_AddDesc_Alignments_2eproto();
  }
} static_descriptor_initializer_Alignments_2eproto_;


// ===================================================================

#ifndef _MSC_VER
const int AlignmentCollection::kAlignmentEntriesFieldNumber;
#endif  // !_MSC_VER

AlignmentCollection::AlignmentCollection()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void AlignmentCollection::InitAsDefaultInstance() {
}

AlignmentCollection::AlignmentCollection(const AlignmentCollection& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void AlignmentCollection::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

AlignmentCollection::~AlignmentCollection() {
  SharedDtor();
}

void AlignmentCollection::SharedDtor() {
  if (this != default_instance_) {
  }
}

void AlignmentCollection::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* AlignmentCollection::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return AlignmentCollection_descriptor_;
}

const AlignmentCollection& AlignmentCollection::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_Alignments_2eproto();  return *default_instance_;
}

AlignmentCollection* AlignmentCollection::default_instance_ = NULL;

AlignmentCollection* AlignmentCollection::New() const {
  return new AlignmentCollection;
}

void AlignmentCollection::Clear() {
  alignment_entries_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool AlignmentCollection::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .goby.AlignmentEntry alignment_entries = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_alignment_entries:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_alignment_entries()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(10)) goto parse_alignment_entries;
        if (input->ExpectAtEnd()) return true;
        break;
      }
      
      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void AlignmentCollection::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated .goby.AlignmentEntry alignment_entries = 1;
  for (int i = 0; i < this->alignment_entries_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->alignment_entries(i), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* AlignmentCollection::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated .goby.AlignmentEntry alignment_entries = 1;
  for (int i = 0; i < this->alignment_entries_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        1, this->alignment_entries(i), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int AlignmentCollection::ByteSize() const {
  int total_size = 0;
  
  // repeated .goby.AlignmentEntry alignment_entries = 1;
  total_size += 1 * this->alignment_entries_size();
  for (int i = 0; i < this->alignment_entries_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->alignment_entries(i));
  }
  
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void AlignmentCollection::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const AlignmentCollection* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const AlignmentCollection*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void AlignmentCollection::MergeFrom(const AlignmentCollection& from) {
  GOOGLE_CHECK_NE(&from, this);
  alignment_entries_.MergeFrom(from.alignment_entries_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void AlignmentCollection::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void AlignmentCollection::CopyFrom(const AlignmentCollection& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool AlignmentCollection::IsInitialized() const {
  
  for (int i = 0; i < alignment_entries_size(); i++) {
    if (!this->alignment_entries(i).IsInitialized()) return false;
  }
  return true;
}

void AlignmentCollection::Swap(AlignmentCollection* other) {
  if (other != this) {
    alignment_entries_.Swap(&other->alignment_entries_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata AlignmentCollection::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = AlignmentCollection_descriptor_;
  metadata.reflection = AlignmentCollection_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int AlignmentEntry::kMultiplicityFieldNumber;
const int AlignmentEntry::kQueryIndexFieldNumber;
const int AlignmentEntry::kTargetIndexFieldNumber;
const int AlignmentEntry::kPositionFieldNumber;
const int AlignmentEntry::kMatchingReverseStrandFieldNumber;
const int AlignmentEntry::kQueryPositionFieldNumber;
const int AlignmentEntry::kScoreFieldNumber;
const int AlignmentEntry::kNumberOfMismatchesFieldNumber;
const int AlignmentEntry::kNumberOfIndelsFieldNumber;
const int AlignmentEntry::kQueryAlignedLengthFieldNumber;
const int AlignmentEntry::kTargetAlignedLengthFieldNumber;
const int AlignmentEntry::kSequenceVariationsFieldNumber;
const int AlignmentEntry::kQueryLengthFieldNumber;
const int AlignmentEntry::kMappingQualityFieldNumber;
const int AlignmentEntry::kPairFlagsFieldNumber;
const int AlignmentEntry::kPairAlignmentLinkFieldNumber;
const int AlignmentEntry::kFragmentIndexFieldNumber;
const int AlignmentEntry::kSplicedForwardAlignmentLinkFieldNumber;
const int AlignmentEntry::kSplicedBackwardAlignmentLinkFieldNumber;
const int AlignmentEntry::kSplicedFlagsFieldNumber;
const int AlignmentEntry::kInsertSizeFieldNumber;
const int AlignmentEntry::kSampleIndexFieldNumber;
#endif  // !_MSC_VER

AlignmentEntry::AlignmentEntry()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void AlignmentEntry::InitAsDefaultInstance() {
  pair_alignment_link_ = const_cast< ::goby::RelatedAlignmentEntry*>(&::goby::RelatedAlignmentEntry::default_instance());
  spliced_forward_alignment_link_ = const_cast< ::goby::RelatedAlignmentEntry*>(&::goby::RelatedAlignmentEntry::default_instance());
  spliced_backward_alignment_link_ = const_cast< ::goby::RelatedAlignmentEntry*>(&::goby::RelatedAlignmentEntry::default_instance());
}

AlignmentEntry::AlignmentEntry(const AlignmentEntry& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void AlignmentEntry::SharedCtor() {
  _cached_size_ = 0;
  multiplicity_ = 0u;
  query_index_ = 0u;
  target_index_ = 0u;
  position_ = 0u;
  matching_reverse_strand_ = false;
  query_position_ = 0u;
  score_ = 0;
  number_of_mismatches_ = 0u;
  number_of_indels_ = 0u;
  query_aligned_length_ = 0u;
  target_aligned_length_ = 0u;
  query_length_ = 0u;
  mapping_quality_ = 0;
  pair_flags_ = 0u;
  pair_alignment_link_ = NULL;
  fragment_index_ = 0u;
  spliced_forward_alignment_link_ = NULL;
  spliced_backward_alignment_link_ = NULL;
  spliced_flags_ = 0u;
  insert_size_ = 0u;
  sample_index_ = 0u;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

AlignmentEntry::~AlignmentEntry() {
  SharedDtor();
}

void AlignmentEntry::SharedDtor() {
  if (this != default_instance_) {
    delete pair_alignment_link_;
    delete spliced_forward_alignment_link_;
    delete spliced_backward_alignment_link_;
  }
}

void AlignmentEntry::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* AlignmentEntry::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return AlignmentEntry_descriptor_;
}

const AlignmentEntry& AlignmentEntry::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_Alignments_2eproto();  return *default_instance_;
}

AlignmentEntry* AlignmentEntry::default_instance_ = NULL;

AlignmentEntry* AlignmentEntry::New() const {
  return new AlignmentEntry;
}

void AlignmentEntry::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    multiplicity_ = 0u;
    query_index_ = 0u;
    target_index_ = 0u;
    position_ = 0u;
    matching_reverse_strand_ = false;
    query_position_ = 0u;
    score_ = 0;
    number_of_mismatches_ = 0u;
  }
  if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    number_of_indels_ = 0u;
    query_aligned_length_ = 0u;
    target_aligned_length_ = 0u;
    query_length_ = 0u;
    mapping_quality_ = 0;
    pair_flags_ = 0u;
    if (has_pair_alignment_link()) {
      if (pair_alignment_link_ != NULL) pair_alignment_link_->::goby::RelatedAlignmentEntry::Clear();
    }
  }
  if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    fragment_index_ = 0u;
    if (has_spliced_forward_alignment_link()) {
      if (spliced_forward_alignment_link_ != NULL) spliced_forward_alignment_link_->::goby::RelatedAlignmentEntry::Clear();
    }
    if (has_spliced_backward_alignment_link()) {
      if (spliced_backward_alignment_link_ != NULL) spliced_backward_alignment_link_->::goby::RelatedAlignmentEntry::Clear();
    }
    spliced_flags_ = 0u;
    insert_size_ = 0u;
    sample_index_ = 0u;
  }
  sequence_variations_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool AlignmentEntry::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required uint32 query_index = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &query_index_)));
          set_has_query_index();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_target_index;
        break;
      }
      
      // required uint32 target_index = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_target_index:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &target_index_)));
          set_has_target_index();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_position;
        break;
      }
      
      // required uint32 position = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_position:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &position_)));
          set_has_position();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(37)) goto parse_score;
        break;
      }
      
      // optional float score = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
         parse_score:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &score_)));
          set_has_score();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(40)) goto parse_query_position;
        break;
      }
      
      // optional uint32 query_position = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_query_position:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &query_position_)));
          set_has_query_position();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(48)) goto parse_matching_reverse_strand;
        break;
      }
      
      // required bool matching_reverse_strand = 6;
      case 6: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_matching_reverse_strand:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &matching_reverse_strand_)));
          set_has_matching_reverse_strand();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(56)) goto parse_multiplicity;
        break;
      }
      
      // optional uint32 multiplicity = 7;
      case 7: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_multiplicity:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &multiplicity_)));
          set_has_multiplicity();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(64)) goto parse_number_of_mismatches;
        break;
      }
      
      // optional uint32 number_of_mismatches = 8;
      case 8: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_number_of_mismatches:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &number_of_mismatches_)));
          set_has_number_of_mismatches();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(72)) goto parse_number_of_indels;
        break;
      }
      
      // optional uint32 number_of_indels = 9;
      case 9: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_number_of_indels:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &number_of_indels_)));
          set_has_number_of_indels();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(80)) goto parse_query_length;
        break;
      }
      
      // optional uint32 query_length = 10;
      case 10: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_query_length:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &query_length_)));
          set_has_query_length();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(88)) goto parse_query_aligned_length;
        break;
      }
      
      // optional uint32 query_aligned_length = 11;
      case 11: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_query_aligned_length:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &query_aligned_length_)));
          set_has_query_aligned_length();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(96)) goto parse_target_aligned_length;
        break;
      }
      
      // optional uint32 target_aligned_length = 12;
      case 12: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_target_aligned_length:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &target_aligned_length_)));
          set_has_target_aligned_length();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(106)) goto parse_sequence_variations;
        break;
      }
      
      // repeated .goby.SequenceVariation sequence_variations = 13;
      case 13: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_sequence_variations:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_sequence_variations()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(106)) goto parse_sequence_variations;
        if (input->ExpectTag(112)) goto parse_mapping_quality;
        break;
      }
      
      // optional int32 mapping_quality = 14;
      case 14: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_mapping_quality:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &mapping_quality_)));
          set_has_mapping_quality();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(120)) goto parse_pair_flags;
        break;
      }
      
      // optional uint32 pair_flags = 15;
      case 15: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_pair_flags:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &pair_flags_)));
          set_has_pair_flags();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(130)) goto parse_pair_alignment_link;
        break;
      }
      
      // optional .goby.RelatedAlignmentEntry pair_alignment_link = 16;
      case 16: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_pair_alignment_link:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_pair_alignment_link()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(136)) goto parse_fragment_index;
        break;
      }
      
      // optional uint32 fragment_index = 17;
      case 17: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_fragment_index:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &fragment_index_)));
          set_has_fragment_index();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(146)) goto parse_spliced_forward_alignment_link;
        break;
      }
      
      // optional .goby.RelatedAlignmentEntry spliced_forward_alignment_link = 18;
      case 18: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_spliced_forward_alignment_link:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_spliced_forward_alignment_link()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(152)) goto parse_spliced_flags;
        break;
      }
      
      // optional uint32 spliced_flags = 19;
      case 19: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_spliced_flags:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &spliced_flags_)));
          set_has_spliced_flags();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(160)) goto parse_insert_size;
        break;
      }
      
      // optional uint32 insert_size = 20;
      case 20: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_insert_size:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &insert_size_)));
          set_has_insert_size();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(168)) goto parse_sample_index;
        break;
      }
      
      // optional uint32 sample_index = 21;
      case 21: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_sample_index:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &sample_index_)));
          set_has_sample_index();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(178)) goto parse_spliced_backward_alignment_link;
        break;
      }
      
      // optional .goby.RelatedAlignmentEntry spliced_backward_alignment_link = 22;
      case 22: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_spliced_backward_alignment_link:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_spliced_backward_alignment_link()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }
      
      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void AlignmentEntry::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // required uint32 query_index = 1;
  if (has_query_index()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->query_index(), output);
  }
  
  // required uint32 target_index = 2;
  if (has_target_index()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->target_index(), output);
  }
  
  // required uint32 position = 3;
  if (has_position()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->position(), output);
  }
  
  // optional float score = 4;
  if (has_score()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->score(), output);
  }
  
  // optional uint32 query_position = 5;
  if (has_query_position()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->query_position(), output);
  }
  
  // required bool matching_reverse_strand = 6;
  if (has_matching_reverse_strand()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->matching_reverse_strand(), output);
  }
  
  // optional uint32 multiplicity = 7;
  if (has_multiplicity()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->multiplicity(), output);
  }
  
  // optional uint32 number_of_mismatches = 8;
  if (has_number_of_mismatches()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(8, this->number_of_mismatches(), output);
  }
  
  // optional uint32 number_of_indels = 9;
  if (has_number_of_indels()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(9, this->number_of_indels(), output);
  }
  
  // optional uint32 query_length = 10;
  if (has_query_length()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(10, this->query_length(), output);
  }
  
  // optional uint32 query_aligned_length = 11;
  if (has_query_aligned_length()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(11, this->query_aligned_length(), output);
  }
  
  // optional uint32 target_aligned_length = 12;
  if (has_target_aligned_length()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(12, this->target_aligned_length(), output);
  }
  
  // repeated .goby.SequenceVariation sequence_variations = 13;
  for (int i = 0; i < this->sequence_variations_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      13, this->sequence_variations(i), output);
  }
  
  // optional int32 mapping_quality = 14;
  if (has_mapping_quality()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(14, this->mapping_quality(), output);
  }
  
  // optional uint32 pair_flags = 15;
  if (has_pair_flags()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(15, this->pair_flags(), output);
  }
  
  // optional .goby.RelatedAlignmentEntry pair_alignment_link = 16;
  if (has_pair_alignment_link()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      16, this->pair_alignment_link(), output);
  }
  
  // optional uint32 fragment_index = 17;
  if (has_fragment_index()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(17, this->fragment_index(), output);
  }
  
  // optional .goby.RelatedAlignmentEntry spliced_forward_alignment_link = 18;
  if (has_spliced_forward_alignment_link()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      18, this->spliced_forward_alignment_link(), output);
  }
  
  // optional uint32 spliced_flags = 19;
  if (has_spliced_flags()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(19, this->spliced_flags(), output);
  }
  
  // optional uint32 insert_size = 20;
  if (has_insert_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(20, this->insert_size(), output);
  }
  
  // optional uint32 sample_index = 21;
  if (has_sample_index()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(21, this->sample_index(), output);
  }
  
  // optional .goby.RelatedAlignmentEntry spliced_backward_alignment_link = 22;
  if (has_spliced_backward_alignment_link()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      22, this->spliced_backward_alignment_link(), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* AlignmentEntry::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // required uint32 query_index = 1;
  if (has_query_index()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->query_index(), target);
  }
  
  // required uint32 target_index = 2;
  if (has_target_index()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->target_index(), target);
  }
  
  // required uint32 position = 3;
  if (has_position()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->position(), target);
  }
  
  // optional float score = 4;
  if (has_score()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->score(), target);
  }
  
  // optional uint32 query_position = 5;
  if (has_query_position()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->query_position(), target);
  }
  
  // required bool matching_reverse_strand = 6;
  if (has_matching_reverse_strand()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->matching_reverse_strand(), target);
  }
  
  // optional uint32 multiplicity = 7;
  if (has_multiplicity()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, this->multiplicity(), target);
  }
  
  // optional uint32 number_of_mismatches = 8;
  if (has_number_of_mismatches()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(8, this->number_of_mismatches(), target);
  }
  
  // optional uint32 number_of_indels = 9;
  if (has_number_of_indels()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(9, this->number_of_indels(), target);
  }
  
  // optional uint32 query_length = 10;
  if (has_query_length()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(10, this->query_length(), target);
  }
  
  // optional uint32 query_aligned_length = 11;
  if (has_query_aligned_length()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(11, this->query_aligned_length(), target);
  }
  
  // optional uint32 target_aligned_length = 12;
  if (has_target_aligned_length()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(12, this->target_aligned_length(), target);
  }
  
  // repeated .goby.SequenceVariation sequence_variations = 13;
  for (int i = 0; i < this->sequence_variations_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        13, this->sequence_variations(i), target);
  }
  
  // optional int32 mapping_quality = 14;
  if (has_mapping_quality()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(14, this->mapping_quality(), target);
  }
  
  // optional uint32 pair_flags = 15;
  if (has_pair_flags()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(15, this->pair_flags(), target);
  }
  
  // optional .goby.RelatedAlignmentEntry pair_alignment_link = 16;
  if (has_pair_alignment_link()) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        16, this->pair_alignment_link(), target);
  }
  
  // optional uint32 fragment_index = 17;
  if (has_fragment_index()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(17, this->fragment_index(), target);
  }
  
  // optional .goby.RelatedAlignmentEntry spliced_forward_alignment_link = 18;
  if (has_spliced_forward_alignment_link()) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        18, this->spliced_forward_alignment_link(), target);
  }
  
  // optional uint32 spliced_flags = 19;
  if (has_spliced_flags()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(19, this->spliced_flags(), target);
  }
  
  // optional uint32 insert_size = 20;
  if (has_insert_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(20, this->insert_size(), target);
  }
  
  // optional uint32 sample_index = 21;
  if (has_sample_index()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(21, this->sample_index(), target);
  }
  
  // optional .goby.RelatedAlignmentEntry spliced_backward_alignment_link = 22;
  if (has_spliced_backward_alignment_link()) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        22, this->spliced_backward_alignment_link(), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int AlignmentEntry::ByteSize() const {
  int total_size = 0;
  
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional uint32 multiplicity = 7;
    if (has_multiplicity()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->multiplicity());
    }
    
    // required uint32 query_index = 1;
    if (has_query_index()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->query_index());
    }
    
    // required uint32 target_index = 2;
    if (has_target_index()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->target_index());
    }
    
    // required uint32 position = 3;
    if (has_position()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->position());
    }
    
    // required bool matching_reverse_strand = 6;
    if (has_matching_reverse_strand()) {
      total_size += 1 + 1;
    }
    
    // optional uint32 query_position = 5;
    if (has_query_position()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->query_position());
    }
    
    // optional float score = 4;
    if (has_score()) {
      total_size += 1 + 4;
    }
    
    // optional uint32 number_of_mismatches = 8;
    if (has_number_of_mismatches()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->number_of_mismatches());
    }
    
  }
  if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    // optional uint32 number_of_indels = 9;
    if (has_number_of_indels()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->number_of_indels());
    }
    
    // optional uint32 query_aligned_length = 11;
    if (has_query_aligned_length()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->query_aligned_length());
    }
    
    // optional uint32 target_aligned_length = 12;
    if (has_target_aligned_length()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->target_aligned_length());
    }
    
    // optional uint32 query_length = 10;
    if (has_query_length()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->query_length());
    }
    
    // optional int32 mapping_quality = 14;
    if (has_mapping_quality()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->mapping_quality());
    }
    
    // optional uint32 pair_flags = 15;
    if (has_pair_flags()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->pair_flags());
    }
    
    // optional .goby.RelatedAlignmentEntry pair_alignment_link = 16;
    if (has_pair_alignment_link()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->pair_alignment_link());
    }
    
  }
  if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    // optional uint32 fragment_index = 17;
    if (has_fragment_index()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->fragment_index());
    }
    
    // optional .goby.RelatedAlignmentEntry spliced_forward_alignment_link = 18;
    if (has_spliced_forward_alignment_link()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->spliced_forward_alignment_link());
    }
    
    // optional .goby.RelatedAlignmentEntry spliced_backward_alignment_link = 22;
    if (has_spliced_backward_alignment_link()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->spliced_backward_alignment_link());
    }
    
    // optional uint32 spliced_flags = 19;
    if (has_spliced_flags()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->spliced_flags());
    }
    
    // optional uint32 insert_size = 20;
    if (has_insert_size()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->insert_size());
    }
    
    // optional uint32 sample_index = 21;
    if (has_sample_index()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->sample_index());
    }
    
  }
  // repeated .goby.SequenceVariation sequence_variations = 13;
  total_size += 1 * this->sequence_variations_size();
  for (int i = 0; i < this->sequence_variations_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->sequence_variations(i));
  }
  
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void AlignmentEntry::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const AlignmentEntry* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const AlignmentEntry*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void AlignmentEntry::MergeFrom(const AlignmentEntry& from) {
  GOOGLE_CHECK_NE(&from, this);
  sequence_variations_.MergeFrom(from.sequence_variations_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_multiplicity()) {
      set_multiplicity(from.multiplicity());
    }
    if (from.has_query_index()) {
      set_query_index(from.query_index());
    }
    if (from.has_target_index()) {
      set_target_index(from.target_index());
    }
    if (from.has_position()) {
      set_position(from.position());
    }
    if (from.has_matching_reverse_strand()) {
      set_matching_reverse_strand(from.matching_reverse_strand());
    }
    if (from.has_query_position()) {
      set_query_position(from.query_position());
    }
    if (from.has_score()) {
      set_score(from.score());
    }
    if (from.has_number_of_mismatches()) {
      set_number_of_mismatches(from.number_of_mismatches());
    }
  }
  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    if (from.has_number_of_indels()) {
      set_number_of_indels(from.number_of_indels());
    }
    if (from.has_query_aligned_length()) {
      set_query_aligned_length(from.query_aligned_length());
    }
    if (from.has_target_aligned_length()) {
      set_target_aligned_length(from.target_aligned_length());
    }
    if (from.has_query_length()) {
      set_query_length(from.query_length());
    }
    if (from.has_mapping_quality()) {
      set_mapping_quality(from.mapping_quality());
    }
    if (from.has_pair_flags()) {
      set_pair_flags(from.pair_flags());
    }
    if (from.has_pair_alignment_link()) {
      mutable_pair_alignment_link()->::goby::RelatedAlignmentEntry::MergeFrom(from.pair_alignment_link());
    }
  }
  if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    if (from.has_fragment_index()) {
      set_fragment_index(from.fragment_index());
    }
    if (from.has_spliced_forward_alignment_link()) {
      mutable_spliced_forward_alignment_link()->::goby::RelatedAlignmentEntry::MergeFrom(from.spliced_forward_alignment_link());
    }
    if (from.has_spliced_backward_alignment_link()) {
      mutable_spliced_backward_alignment_link()->::goby::RelatedAlignmentEntry::MergeFrom(from.spliced_backward_alignment_link());
    }
    if (from.has_spliced_flags()) {
      set_spliced_flags(from.spliced_flags());
    }
    if (from.has_insert_size()) {
      set_insert_size(from.insert_size());
    }
    if (from.has_sample_index()) {
      set_sample_index(from.sample_index());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void AlignmentEntry::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void AlignmentEntry::CopyFrom(const AlignmentEntry& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool AlignmentEntry::IsInitialized() const {
  if ((_has_bits_[0] & 0x0000001e) != 0x0000001e) return false;
  
  for (int i = 0; i < sequence_variations_size(); i++) {
    if (!this->sequence_variations(i).IsInitialized()) return false;
  }
  if (has_pair_alignment_link()) {
    if (!this->pair_alignment_link().IsInitialized()) return false;
  }
  if (has_spliced_forward_alignment_link()) {
    if (!this->spliced_forward_alignment_link().IsInitialized()) return false;
  }
  if (has_spliced_backward_alignment_link()) {
    if (!this->spliced_backward_alignment_link().IsInitialized()) return false;
  }
  return true;
}

void AlignmentEntry::Swap(AlignmentEntry* other) {
  if (other != this) {
    std::swap(multiplicity_, other->multiplicity_);
    std::swap(query_index_, other->query_index_);
    std::swap(target_index_, other->target_index_);
    std::swap(position_, other->position_);
    std::swap(matching_reverse_strand_, other->matching_reverse_strand_);
    std::swap(query_position_, other->query_position_);
    std::swap(score_, other->score_);
    std::swap(number_of_mismatches_, other->number_of_mismatches_);
    std::swap(number_of_indels_, other->number_of_indels_);
    std::swap(query_aligned_length_, other->query_aligned_length_);
    std::swap(target_aligned_length_, other->target_aligned_length_);
    sequence_variations_.Swap(&other->sequence_variations_);
    std::swap(query_length_, other->query_length_);
    std::swap(mapping_quality_, other->mapping_quality_);
    std::swap(pair_flags_, other->pair_flags_);
    std::swap(pair_alignment_link_, other->pair_alignment_link_);
    std::swap(fragment_index_, other->fragment_index_);
    std::swap(spliced_forward_alignment_link_, other->spliced_forward_alignment_link_);
    std::swap(spliced_backward_alignment_link_, other->spliced_backward_alignment_link_);
    std::swap(spliced_flags_, other->spliced_flags_);
    std::swap(insert_size_, other->insert_size_);
    std::swap(sample_index_, other->sample_index_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata AlignmentEntry::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = AlignmentEntry_descriptor_;
  metadata.reflection = AlignmentEntry_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int RelatedAlignmentEntry::kTargetIndexFieldNumber;
const int RelatedAlignmentEntry::kPositionFieldNumber;
const int RelatedAlignmentEntry::kFragmentIndexFieldNumber;
#endif  // !_MSC_VER

RelatedAlignmentEntry::RelatedAlignmentEntry()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void RelatedAlignmentEntry::InitAsDefaultInstance() {
}

RelatedAlignmentEntry::RelatedAlignmentEntry(const RelatedAlignmentEntry& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void RelatedAlignmentEntry::SharedCtor() {
  _cached_size_ = 0;
  target_index_ = 0u;
  position_ = 0u;
  fragment_index_ = 0u;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

RelatedAlignmentEntry::~RelatedAlignmentEntry() {
  SharedDtor();
}

void RelatedAlignmentEntry::SharedDtor() {
  if (this != default_instance_) {
  }
}

void RelatedAlignmentEntry::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* RelatedAlignmentEntry::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return RelatedAlignmentEntry_descriptor_;
}

const RelatedAlignmentEntry& RelatedAlignmentEntry::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_Alignments_2eproto();  return *default_instance_;
}

RelatedAlignmentEntry* RelatedAlignmentEntry::default_instance_ = NULL;

RelatedAlignmentEntry* RelatedAlignmentEntry::New() const {
  return new RelatedAlignmentEntry;
}

void RelatedAlignmentEntry::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    target_index_ = 0u;
    position_ = 0u;
    fragment_index_ = 0u;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool RelatedAlignmentEntry::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required uint32 target_index = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &target_index_)));
          set_has_target_index();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_position;
        break;
      }
      
      // required uint32 position = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_position:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &position_)));
          set_has_position();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_fragment_index;
        break;
      }
      
      // required uint32 fragment_index = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_fragment_index:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &fragment_index_)));
          set_has_fragment_index();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }
      
      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void RelatedAlignmentEntry::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // required uint32 target_index = 1;
  if (has_target_index()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->target_index(), output);
  }
  
  // required uint32 position = 2;
  if (has_position()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->position(), output);
  }
  
  // required uint32 fragment_index = 3;
  if (has_fragment_index()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->fragment_index(), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* RelatedAlignmentEntry::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // required uint32 target_index = 1;
  if (has_target_index()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->target_index(), target);
  }
  
  // required uint32 position = 2;
  if (has_position()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->position(), target);
  }
  
  // required uint32 fragment_index = 3;
  if (has_fragment_index()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->fragment_index(), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int RelatedAlignmentEntry::ByteSize() const {
  int total_size = 0;
  
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required uint32 target_index = 1;
    if (has_target_index()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->target_index());
    }
    
    // required uint32 position = 2;
    if (has_position()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->position());
    }
    
    // required uint32 fragment_index = 3;
    if (has_fragment_index()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->fragment_index());
    }
    
  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void RelatedAlignmentEntry::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const RelatedAlignmentEntry* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const RelatedAlignmentEntry*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void RelatedAlignmentEntry::MergeFrom(const RelatedAlignmentEntry& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_target_index()) {
      set_target_index(from.target_index());
    }
    if (from.has_position()) {
      set_position(from.position());
    }
    if (from.has_fragment_index()) {
      set_fragment_index(from.fragment_index());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void RelatedAlignmentEntry::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RelatedAlignmentEntry::CopyFrom(const RelatedAlignmentEntry& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RelatedAlignmentEntry::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
  
  return true;
}

void RelatedAlignmentEntry::Swap(RelatedAlignmentEntry* other) {
  if (other != this) {
    std::swap(target_index_, other->target_index_);
    std::swap(position_, other->position_);
    std::swap(fragment_index_, other->fragment_index_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata RelatedAlignmentEntry::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = RelatedAlignmentEntry_descriptor_;
  metadata.reflection = RelatedAlignmentEntry_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int SequenceVariation::kFromFieldNumber;
const int SequenceVariation::kToFieldNumber;
const int SequenceVariation::kPositionFieldNumber;
const int SequenceVariation::kReadIndexFieldNumber;
const int SequenceVariation::kToQualityFieldNumber;
#endif  // !_MSC_VER

SequenceVariation::SequenceVariation()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void SequenceVariation::InitAsDefaultInstance() {
}

SequenceVariation::SequenceVariation(const SequenceVariation& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void SequenceVariation::SharedCtor() {
  _cached_size_ = 0;
  from_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  to_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  position_ = 0u;
  read_index_ = 0u;
  to_quality_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

SequenceVariation::~SequenceVariation() {
  SharedDtor();
}

void SequenceVariation::SharedDtor() {
  if (from_ != &::google::protobuf::internal::kEmptyString) {
    delete from_;
  }
  if (to_ != &::google::protobuf::internal::kEmptyString) {
    delete to_;
  }
  if (to_quality_ != &::google::protobuf::internal::kEmptyString) {
    delete to_quality_;
  }
  if (this != default_instance_) {
  }
}

void SequenceVariation::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SequenceVariation::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SequenceVariation_descriptor_;
}

const SequenceVariation& SequenceVariation::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_Alignments_2eproto();  return *default_instance_;
}

SequenceVariation* SequenceVariation::default_instance_ = NULL;

SequenceVariation* SequenceVariation::New() const {
  return new SequenceVariation;
}

void SequenceVariation::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_from()) {
      if (from_ != &::google::protobuf::internal::kEmptyString) {
        from_->clear();
      }
    }
    if (has_to()) {
      if (to_ != &::google::protobuf::internal::kEmptyString) {
        to_->clear();
      }
    }
    position_ = 0u;
    read_index_ = 0u;
    if (has_to_quality()) {
      if (to_quality_ != &::google::protobuf::internal::kEmptyString) {
        to_quality_->clear();
      }
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool SequenceVariation::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required string to = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_to()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->to().data(), this->to().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_from;
        break;
      }
      
      // required string from = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_from:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_from()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->from().data(), this->from().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_position;
        break;
      }
      
      // required uint32 position = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_position:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &position_)));
          set_has_position();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(34)) goto parse_to_quality;
        break;
      }
      
      // optional bytes to_quality = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_to_quality:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_to_quality()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(40)) goto parse_read_index;
        break;
      }
      
      // required uint32 read_index = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_read_index:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &read_index_)));
          set_has_read_index();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }
      
      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void SequenceVariation::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // required string to = 1;
  if (has_to()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->to().data(), this->to().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->to(), output);
  }
  
  // required string from = 2;
  if (has_from()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->from().data(), this->from().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->from(), output);
  }
  
  // required uint32 position = 3;
  if (has_position()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->position(), output);
  }
  
  // optional bytes to_quality = 4;
  if (has_to_quality()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      4, this->to_quality(), output);
  }
  
  // required uint32 read_index = 5;
  if (has_read_index()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->read_index(), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* SequenceVariation::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // required string to = 1;
  if (has_to()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->to().data(), this->to().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->to(), target);
  }
  
  // required string from = 2;
  if (has_from()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->from().data(), this->from().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->from(), target);
  }
  
  // required uint32 position = 3;
  if (has_position()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->position(), target);
  }
  
  // optional bytes to_quality = 4;
  if (has_to_quality()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        4, this->to_quality(), target);
  }
  
  // required uint32 read_index = 5;
  if (has_read_index()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->read_index(), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int SequenceVariation::ByteSize() const {
  int total_size = 0;
  
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required string from = 2;
    if (has_from()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->from());
    }
    
    // required string to = 1;
    if (has_to()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->to());
    }
    
    // required uint32 position = 3;
    if (has_position()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->position());
    }
    
    // required uint32 read_index = 5;
    if (has_read_index()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->read_index());
    }
    
    // optional bytes to_quality = 4;
    if (has_to_quality()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->to_quality());
    }
    
  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void SequenceVariation::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const SequenceVariation* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const SequenceVariation*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void SequenceVariation::MergeFrom(const SequenceVariation& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_from()) {
      set_from(from.from());
    }
    if (from.has_to()) {
      set_to(from.to());
    }
    if (from.has_position()) {
      set_position(from.position());
    }
    if (from.has_read_index()) {
      set_read_index(from.read_index());
    }
    if (from.has_to_quality()) {
      set_to_quality(from.to_quality());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void SequenceVariation::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void SequenceVariation::CopyFrom(const SequenceVariation& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SequenceVariation::IsInitialized() const {
  if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false;
  
  return true;
}

void SequenceVariation::Swap(SequenceVariation* other) {
  if (other != this) {
    std::swap(from_, other->from_);
    std::swap(to_, other->to_);
    std::swap(position_, other->position_);
    std::swap(read_index_, other->read_index_);
    std::swap(to_quality_, other->to_quality_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata SequenceVariation::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = SequenceVariation_descriptor_;
  metadata.reflection = SequenceVariation_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int AlignmentHeader::kSmallestSplitQueryIndexFieldNumber;
const int AlignmentHeader::kLargestSplitQueryIndexFieldNumber;
const int AlignmentHeader::kQueryNameMappingFieldNumber;
const int AlignmentHeader::kTargetNameMappingFieldNumber;
const int AlignmentHeader::kNumberOfQueriesFieldNumber;
const int AlignmentHeader::kNumberOfTargetsFieldNumber;
const int AlignmentHeader::kNumberOfAlignedReadsFieldNumber;
const int AlignmentHeader::kQueryLengthFieldNumber;
const int AlignmentHeader::kConstantQueryLengthFieldNumber;
const int AlignmentHeader::kTargetLengthFieldNumber;
const int AlignmentHeader::kSortedFieldNumber;
const int AlignmentHeader::kIndexedFieldNumber;
const int AlignmentHeader::kQueryLengthsStoredInEntriesFieldNumber;
const int AlignmentHeader::kAlignerNameFieldNumber;
const int AlignmentHeader::kAlignerVersionFieldNumber;
const int AlignmentHeader::kVersionFieldNumber;
const int AlignmentHeader::kSampleBasenameFieldNumber;
#endif  // !_MSC_VER

AlignmentHeader::AlignmentHeader()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void AlignmentHeader::InitAsDefaultInstance() {
  query_name_mapping_ = const_cast< ::goby::IdentifierMapping*>(&::goby::IdentifierMapping::default_instance());
  target_name_mapping_ = const_cast< ::goby::IdentifierMapping*>(&::goby::IdentifierMapping::default_instance());
}

AlignmentHeader::AlignmentHeader(const AlignmentHeader& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void AlignmentHeader::SharedCtor() {
  _cached_size_ = 0;
  smallest_split_query_index_ = 0u;
  largest_split_query_index_ = 0u;
  query_name_mapping_ = NULL;
  target_name_mapping_ = NULL;
  number_of_queries_ = 0u;
  number_of_targets_ = 0u;
  number_of_aligned_reads_ = 0u;
  constant_query_length_ = 0u;
  sorted_ = false;
  indexed_ = false;
  query_lengths_stored_in_entries_ = false;
  aligner_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  aligner_version_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  version_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

AlignmentHeader::~AlignmentHeader() {
  SharedDtor();
}

void AlignmentHeader::SharedDtor() {
  if (aligner_name_ != &::google::protobuf::internal::kEmptyString) {
    delete aligner_name_;
  }
  if (aligner_version_ != &::google::protobuf::internal::kEmptyString) {
    delete aligner_version_;
  }
  if (version_ != &::google::protobuf::internal::kEmptyString) {
    delete version_;
  }
  if (this != default_instance_) {
    delete query_name_mapping_;
    delete target_name_mapping_;
  }
}

void AlignmentHeader::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* AlignmentHeader::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return AlignmentHeader_descriptor_;
}

const AlignmentHeader& AlignmentHeader::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_Alignments_2eproto();  return *default_instance_;
}

AlignmentHeader* AlignmentHeader::default_instance_ = NULL;

AlignmentHeader* AlignmentHeader::New() const {
  return new AlignmentHeader;
}

void AlignmentHeader::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    smallest_split_query_index_ = 0u;
    largest_split_query_index_ = 0u;
    if (has_query_name_mapping()) {
      if (query_name_mapping_ != NULL) query_name_mapping_->::goby::IdentifierMapping::Clear();
    }
    if (has_target_name_mapping()) {
      if (target_name_mapping_ != NULL) target_name_mapping_->::goby::IdentifierMapping::Clear();
    }
    number_of_queries_ = 0u;
    number_of_targets_ = 0u;
    number_of_aligned_reads_ = 0u;
  }
  if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    constant_query_length_ = 0u;
    sorted_ = false;
    indexed_ = false;
    query_lengths_stored_in_entries_ = false;
    if (has_aligner_name()) {
      if (aligner_name_ != &::google::protobuf::internal::kEmptyString) {
        aligner_name_->clear();
      }
    }
    if (has_aligner_version()) {
      if (aligner_version_ != &::google::protobuf::internal::kEmptyString) {
        aligner_version_->clear();
      }
    }
    if (has_version()) {
      if (version_ != &::google::protobuf::internal::kEmptyString) {
        version_->clear();
      }
    }
  }
  query_length_.Clear();
  target_length_.Clear();
  sample_basename_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool AlignmentHeader::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .goby.IdentifierMapping query_name_mapping = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_query_name_mapping()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_target_name_mapping;
        break;
      }
      
      // optional .goby.IdentifierMapping target_name_mapping = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_target_name_mapping:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_target_name_mapping()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_query_length;
        break;
      }
      
      // repeated uint32 query_length = 3 [deprecated = true];
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_query_length:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 1, 24, input, this->mutable_query_length())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, this->mutable_query_length())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_query_length;
        if (input->ExpectTag(40)) goto parse_number_of_queries;
        break;
      }
      
      // optional uint32 number_of_queries = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_number_of_queries:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &number_of_queries_)));
          set_has_number_of_queries();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(48)) goto parse_number_of_targets;
        break;
      }
      
      // optional uint32 number_of_targets = 6;
      case 6: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_number_of_targets:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &number_of_targets_)));
          set_has_number_of_targets();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(56)) goto parse_number_of_aligned_reads;
        break;
      }
      
      // optional uint32 number_of_aligned_reads = 7;
      case 7: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_number_of_aligned_reads:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &number_of_aligned_reads_)));
          set_has_number_of_aligned_reads();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(64)) goto parse_target_length;
        break;
      }
      
      // repeated uint32 target_length = 8;
      case 8: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_target_length:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 1, 64, input, this->mutable_target_length())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, this->mutable_target_length())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(64)) goto parse_target_length;
        if (input->ExpectTag(72)) goto parse_smallest_split_query_index;
        break;
      }
      
      // optional uint32 smallest_split_query_index = 9;
      case 9: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_smallest_split_query_index:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &smallest_split_query_index_)));
          set_has_smallest_split_query_index();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(80)) goto parse_constant_query_length;
        break;
      }
      
      // optional uint32 constant_query_length = 10;
      case 10: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_constant_query_length:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &constant_query_length_)));
          set_has_constant_query_length();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(88)) goto parse_largest_split_query_index;
        break;
      }
      
      // optional uint32 largest_split_query_index = 11;
      case 11: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_largest_split_query_index:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &largest_split_query_index_)));
          set_has_largest_split_query_index();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(104)) goto parse_sorted;
        break;
      }
      
      // optional bool sorted = 13;
      case 13: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_sorted:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &sorted_)));
          set_has_sorted();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(112)) goto parse_indexed;
        break;
      }
      
      // optional bool indexed = 14;
      case 14: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_indexed:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &indexed_)));
          set_has_indexed();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(120)) goto parse_query_lengths_stored_in_entries;
        break;
      }
      
      // optional bool query_lengths_stored_in_entries = 15;
      case 15: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_query_lengths_stored_in_entries:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &query_lengths_stored_in_entries_)));
          set_has_query_lengths_stored_in_entries();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(138)) goto parse_aligner_name;
        break;
      }
      
      // optional string aligner_name = 17;
      case 17: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_aligner_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_aligner_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->aligner_name().data(), this->aligner_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(146)) goto parse_aligner_version;
        break;
      }
      
      // optional string aligner_version = 18;
      case 18: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_aligner_version:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_aligner_version()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->aligner_version().data(), this->aligner_version().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(202)) goto parse_version;
        break;
      }
      
      // optional string version = 25;
      case 25: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_version:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_version()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->version().data(), this->version().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(242)) goto parse_sample_basename;
        break;
      }
      
      // repeated string sample_basename = 30;
      case 30: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_sample_basename:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_sample_basename()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->sample_basename(0).data(), this->sample_basename(0).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(242)) goto parse_sample_basename;
        if (input->ExpectAtEnd()) return true;
        break;
      }
      
      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void AlignmentHeader::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional .goby.IdentifierMapping query_name_mapping = 1;
  if (has_query_name_mapping()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->query_name_mapping(), output);
  }
  
  // optional .goby.IdentifierMapping target_name_mapping = 2;
  if (has_target_name_mapping()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->target_name_mapping(), output);
  }
  
  // repeated uint32 query_length = 3 [deprecated = true];
  for (int i = 0; i < this->query_length_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(
      3, this->query_length(i), output);
  }
  
  // optional uint32 number_of_queries = 5;
  if (has_number_of_queries()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->number_of_queries(), output);
  }
  
  // optional uint32 number_of_targets = 6;
  if (has_number_of_targets()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->number_of_targets(), output);
  }
  
  // optional uint32 number_of_aligned_reads = 7;
  if (has_number_of_aligned_reads()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->number_of_aligned_reads(), output);
  }
  
  // repeated uint32 target_length = 8;
  for (int i = 0; i < this->target_length_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(
      8, this->target_length(i), output);
  }
  
  // optional uint32 smallest_split_query_index = 9;
  if (has_smallest_split_query_index()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(9, this->smallest_split_query_index(), output);
  }
  
  // optional uint32 constant_query_length = 10;
  if (has_constant_query_length()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(10, this->constant_query_length(), output);
  }
  
  // optional uint32 largest_split_query_index = 11;
  if (has_largest_split_query_index()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(11, this->largest_split_query_index(), output);
  }
  
  // optional bool sorted = 13;
  if (has_sorted()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(13, this->sorted(), output);
  }
  
  // optional bool indexed = 14;
  if (has_indexed()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(14, this->indexed(), output);
  }
  
  // optional bool query_lengths_stored_in_entries = 15;
  if (has_query_lengths_stored_in_entries()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(15, this->query_lengths_stored_in_entries(), output);
  }
  
  // optional string aligner_name = 17;
  if (has_aligner_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->aligner_name().data(), this->aligner_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      17, this->aligner_name(), output);
  }
  
  // optional string aligner_version = 18;
  if (has_aligner_version()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->aligner_version().data(), this->aligner_version().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      18, this->aligner_version(), output);
  }
  
  // optional string version = 25;
  if (has_version()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->version().data(), this->version().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      25, this->version(), output);
  }
  
  // repeated string sample_basename = 30;
  for (int i = 0; i < this->sample_basename_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->sample_basename(i).data(), this->sample_basename(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      30, this->sample_basename(i), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* AlignmentHeader::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional .goby.IdentifierMapping query_name_mapping = 1;
  if (has_query_name_mapping()) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        1, this->query_name_mapping(), target);
  }
  
  // optional .goby.IdentifierMapping target_name_mapping = 2;
  if (has_target_name_mapping()) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        2, this->target_name_mapping(), target);
  }
  
  // repeated uint32 query_length = 3 [deprecated = true];
  for (int i = 0; i < this->query_length_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt32ToArray(3, this->query_length(i), target);
  }
  
  // optional uint32 number_of_queries = 5;
  if (has_number_of_queries()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->number_of_queries(), target);
  }
  
  // optional uint32 number_of_targets = 6;
  if (has_number_of_targets()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, this->number_of_targets(), target);
  }
  
  // optional uint32 number_of_aligned_reads = 7;
  if (has_number_of_aligned_reads()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, this->number_of_aligned_reads(), target);
  }
  
  // repeated uint32 target_length = 8;
  for (int i = 0; i < this->target_length_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt32ToArray(8, this->target_length(i), target);
  }
  
  // optional uint32 smallest_split_query_index = 9;
  if (has_smallest_split_query_index()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(9, this->smallest_split_query_index(), target);
  }
  
  // optional uint32 constant_query_length = 10;
  if (has_constant_query_length()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(10, this->constant_query_length(), target);
  }
  
  // optional uint32 largest_split_query_index = 11;
  if (has_largest_split_query_index()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(11, this->largest_split_query_index(), target);
  }
  
  // optional bool sorted = 13;
  if (has_sorted()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(13, this->sorted(), target);
  }
  
  // optional bool indexed = 14;
  if (has_indexed()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(14, this->indexed(), target);
  }
  
  // optional bool query_lengths_stored_in_entries = 15;
  if (has_query_lengths_stored_in_entries()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(15, this->query_lengths_stored_in_entries(), target);
  }
  
  // optional string aligner_name = 17;
  if (has_aligner_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->aligner_name().data(), this->aligner_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        17, this->aligner_name(), target);
  }
  
  // optional string aligner_version = 18;
  if (has_aligner_version()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->aligner_version().data(), this->aligner_version().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        18, this->aligner_version(), target);
  }
  
  // optional string version = 25;
  if (has_version()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->version().data(), this->version().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        25, this->version(), target);
  }
  
  // repeated string sample_basename = 30;
  for (int i = 0; i < this->sample_basename_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->sample_basename(i).data(), this->sample_basename(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(30, this->sample_basename(i), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int AlignmentHeader::ByteSize() const {
  int total_size = 0;
  
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional uint32 smallest_split_query_index = 9;
    if (has_smallest_split_query_index()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->smallest_split_query_index());
    }
    
    // optional uint32 largest_split_query_index = 11;
    if (has_largest_split_query_index()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->largest_split_query_index());
    }
    
    // optional .goby.IdentifierMapping query_name_mapping = 1;
    if (has_query_name_mapping()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->query_name_mapping());
    }
    
    // optional .goby.IdentifierMapping target_name_mapping = 2;
    if (has_target_name_mapping()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->target_name_mapping());
    }
    
    // optional uint32 number_of_queries = 5;
    if (has_number_of_queries()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->number_of_queries());
    }
    
    // optional uint32 number_of_targets = 6;
    if (has_number_of_targets()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->number_of_targets());
    }
    
    // optional uint32 number_of_aligned_reads = 7;
    if (has_number_of_aligned_reads()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->number_of_aligned_reads());
    }
    
  }
  if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    // optional uint32 constant_query_length = 10;
    if (has_constant_query_length()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->constant_query_length());
    }
    
    // optional bool sorted = 13;
    if (has_sorted()) {
      total_size += 1 + 1;
    }
    
    // optional bool indexed = 14;
    if (has_indexed()) {
      total_size += 1 + 1;
    }
    
    // optional bool query_lengths_stored_in_entries = 15;
    if (has_query_lengths_stored_in_entries()) {
      total_size += 1 + 1;
    }
    
    // optional string aligner_name = 17;
    if (has_aligner_name()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->aligner_name());
    }
    
    // optional string aligner_version = 18;
    if (has_aligner_version()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->aligner_version());
    }
    
    // optional string version = 25;
    if (has_version()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->version());
    }
    
  }
  // repeated uint32 query_length = 3 [deprecated = true];
  {
    int data_size = 0;
    for (int i = 0; i < this->query_length_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        UInt32Size(this->query_length(i));
    }
    total_size += 1 * this->query_length_size() + data_size;
  }
  
  // repeated uint32 target_length = 8;
  {
    int data_size = 0;
    for (int i = 0; i < this->target_length_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        UInt32Size(this->target_length(i));
    }
    total_size += 1 * this->target_length_size() + data_size;
  }
  
  // repeated string sample_basename = 30;
  total_size += 2 * this->sample_basename_size();
  for (int i = 0; i < this->sample_basename_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->sample_basename(i));
  }
  
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void AlignmentHeader::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const AlignmentHeader* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const AlignmentHeader*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void AlignmentHeader::MergeFrom(const AlignmentHeader& from) {
  GOOGLE_CHECK_NE(&from, this);
  query_length_.MergeFrom(from.query_length_);
  target_length_.MergeFrom(from.target_length_);
  sample_basename_.MergeFrom(from.sample_basename_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_smallest_split_query_index()) {
      set_smallest_split_query_index(from.smallest_split_query_index());
    }
    if (from.has_largest_split_query_index()) {
      set_largest_split_query_index(from.largest_split_query_index());
    }
    if (from.has_query_name_mapping()) {
      mutable_query_name_mapping()->::goby::IdentifierMapping::MergeFrom(from.query_name_mapping());
    }
    if (from.has_target_name_mapping()) {
      mutable_target_name_mapping()->::goby::IdentifierMapping::MergeFrom(from.target_name_mapping());
    }
    if (from.has_number_of_queries()) {
      set_number_of_queries(from.number_of_queries());
    }
    if (from.has_number_of_targets()) {
      set_number_of_targets(from.number_of_targets());
    }
    if (from.has_number_of_aligned_reads()) {
      set_number_of_aligned_reads(from.number_of_aligned_reads());
    }
  }
  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    if (from.has_constant_query_length()) {
      set_constant_query_length(from.constant_query_length());
    }
    if (from.has_sorted()) {
      set_sorted(from.sorted());
    }
    if (from.has_indexed()) {
      set_indexed(from.indexed());
    }
    if (from.has_query_lengths_stored_in_entries()) {
      set_query_lengths_stored_in_entries(from.query_lengths_stored_in_entries());
    }
    if (from.has_aligner_name()) {
      set_aligner_name(from.aligner_name());
    }
    if (from.has_aligner_version()) {
      set_aligner_version(from.aligner_version());
    }
    if (from.has_version()) {
      set_version(from.version());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void AlignmentHeader::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void AlignmentHeader::CopyFrom(const AlignmentHeader& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool AlignmentHeader::IsInitialized() const {
  
  if (has_query_name_mapping()) {
    if (!this->query_name_mapping().IsInitialized()) return false;
  }
  if (has_target_name_mapping()) {
    if (!this->target_name_mapping().IsInitialized()) return false;
  }
  return true;
}

void AlignmentHeader::Swap(AlignmentHeader* other) {
  if (other != this) {
    std::swap(smallest_split_query_index_, other->smallest_split_query_index_);
    std::swap(largest_split_query_index_, other->largest_split_query_index_);
    std::swap(query_name_mapping_, other->query_name_mapping_);
    std::swap(target_name_mapping_, other->target_name_mapping_);
    std::swap(number_of_queries_, other->number_of_queries_);
    std::swap(number_of_targets_, other->number_of_targets_);
    std::swap(number_of_aligned_reads_, other->number_of_aligned_reads_);
    query_length_.Swap(&other->query_length_);
    std::swap(constant_query_length_, other->constant_query_length_);
    target_length_.Swap(&other->target_length_);
    std::swap(sorted_, other->sorted_);
    std::swap(indexed_, other->indexed_);
    std::swap(query_lengths_stored_in_entries_, other->query_lengths_stored_in_entries_);
    std::swap(aligner_name_, other->aligner_name_);
    std::swap(aligner_version_, other->aligner_version_);
    std::swap(version_, other->version_);
    sample_basename_.Swap(&other->sample_basename_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata AlignmentHeader::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = AlignmentHeader_descriptor_;
  metadata.reflection = AlignmentHeader_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int IdentifierMapping::kMappingsFieldNumber;
#endif  // !_MSC_VER

IdentifierMapping::IdentifierMapping()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void IdentifierMapping::InitAsDefaultInstance() {
}

IdentifierMapping::IdentifierMapping(const IdentifierMapping& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void IdentifierMapping::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

IdentifierMapping::~IdentifierMapping() {
  SharedDtor();
}

void IdentifierMapping::SharedDtor() {
  if (this != default_instance_) {
  }
}

void IdentifierMapping::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* IdentifierMapping::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return IdentifierMapping_descriptor_;
}

const IdentifierMapping& IdentifierMapping::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_Alignments_2eproto();  return *default_instance_;
}

IdentifierMapping* IdentifierMapping::default_instance_ = NULL;

IdentifierMapping* IdentifierMapping::New() const {
  return new IdentifierMapping;
}

void IdentifierMapping::Clear() {
  mappings_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool IdentifierMapping::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .goby.IdentifierInfo mappings = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_mappings:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_mappings()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(10)) goto parse_mappings;
        if (input->ExpectAtEnd()) return true;
        break;
      }
      
      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void IdentifierMapping::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated .goby.IdentifierInfo mappings = 1;
  for (int i = 0; i < this->mappings_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->mappings(i), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* IdentifierMapping::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated .goby.IdentifierInfo mappings = 1;
  for (int i = 0; i < this->mappings_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        1, this->mappings(i), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int IdentifierMapping::ByteSize() const {
  int total_size = 0;
  
  // repeated .goby.IdentifierInfo mappings = 1;
  total_size += 1 * this->mappings_size();
  for (int i = 0; i < this->mappings_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->mappings(i));
  }
  
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void IdentifierMapping::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const IdentifierMapping* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const IdentifierMapping*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void IdentifierMapping::MergeFrom(const IdentifierMapping& from) {
  GOOGLE_CHECK_NE(&from, this);
  mappings_.MergeFrom(from.mappings_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void IdentifierMapping::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void IdentifierMapping::CopyFrom(const IdentifierMapping& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool IdentifierMapping::IsInitialized() const {
  
  for (int i = 0; i < mappings_size(); i++) {
    if (!this->mappings(i).IsInitialized()) return false;
  }
  return true;
}

void IdentifierMapping::Swap(IdentifierMapping* other) {
  if (other != this) {
    mappings_.Swap(&other->mappings_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata IdentifierMapping::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = IdentifierMapping_descriptor_;
  metadata.reflection = IdentifierMapping_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int IdentifierInfo::kNameFieldNumber;
const int IdentifierInfo::kIndexFieldNumber;
#endif  // !_MSC_VER

IdentifierInfo::IdentifierInfo()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void IdentifierInfo::InitAsDefaultInstance() {
}

IdentifierInfo::IdentifierInfo(const IdentifierInfo& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void IdentifierInfo::SharedCtor() {
  _cached_size_ = 0;
  name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  index_ = 0u;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

IdentifierInfo::~IdentifierInfo() {
  SharedDtor();
}

void IdentifierInfo::SharedDtor() {
  if (name_ != &::google::protobuf::internal::kEmptyString) {
    delete name_;
  }
  if (this != default_instance_) {
  }
}

void IdentifierInfo::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* IdentifierInfo::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return IdentifierInfo_descriptor_;
}

const IdentifierInfo& IdentifierInfo::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_Alignments_2eproto();  return *default_instance_;
}

IdentifierInfo* IdentifierInfo::default_instance_ = NULL;

IdentifierInfo* IdentifierInfo::New() const {
  return new IdentifierInfo;
}

void IdentifierInfo::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_name()) {
      if (name_ != &::google::protobuf::internal::kEmptyString) {
        name_->clear();
      }
    }
    index_ = 0u;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool IdentifierInfo::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required string name = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_index;
        break;
      }
      
      // required uint32 index = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_index:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &index_)));
          set_has_index();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }
      
      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void IdentifierInfo::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // required string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->name(), output);
  }
  
  // required uint32 index = 2;
  if (has_index()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->index(), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* IdentifierInfo::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // required string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }
  
  // required uint32 index = 2;
  if (has_index()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->index(), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int IdentifierInfo::ByteSize() const {
  int total_size = 0;
  
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required string name = 1;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }
    
    // required uint32 index = 2;
    if (has_index()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->index());
    }
    
  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void IdentifierInfo::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const IdentifierInfo* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const IdentifierInfo*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void IdentifierInfo::MergeFrom(const IdentifierInfo& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_name()) {
      set_name(from.name());
    }
    if (from.has_index()) {
      set_index(from.index());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void IdentifierInfo::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void IdentifierInfo::CopyFrom(const IdentifierInfo& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool IdentifierInfo::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
  
  return true;
}

void IdentifierInfo::Swap(IdentifierInfo* other) {
  if (other != this) {
    std::swap(name_, other->name_);
    std::swap(index_, other->index_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata IdentifierInfo::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = IdentifierInfo_descriptor_;
  metadata.reflection = IdentifierInfo_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int AlignmentTooManyHits::kAlignerThresholdFieldNumber;
const int AlignmentTooManyHits::kHitsFieldNumber;
#endif  // !_MSC_VER

AlignmentTooManyHits::AlignmentTooManyHits()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void AlignmentTooManyHits::InitAsDefaultInstance() {
}

AlignmentTooManyHits::AlignmentTooManyHits(const AlignmentTooManyHits& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void AlignmentTooManyHits::SharedCtor() {
  _cached_size_ = 0;
  aligner_threshold_ = 0u;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

AlignmentTooManyHits::~AlignmentTooManyHits() {
  SharedDtor();
}

void AlignmentTooManyHits::SharedDtor() {
  if (this != default_instance_) {
  }
}

void AlignmentTooManyHits::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* AlignmentTooManyHits::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return AlignmentTooManyHits_descriptor_;
}

const AlignmentTooManyHits& AlignmentTooManyHits::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_Alignments_2eproto();  return *default_instance_;
}

AlignmentTooManyHits* AlignmentTooManyHits::default_instance_ = NULL;

AlignmentTooManyHits* AlignmentTooManyHits::New() const {
  return new AlignmentTooManyHits;
}

void AlignmentTooManyHits::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    aligner_threshold_ = 0u;
  }
  hits_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool AlignmentTooManyHits::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .goby.AmbiguousLocation hits = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_hits:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_hits()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(10)) goto parse_hits;
        if (input->ExpectTag(16)) goto parse_aligner_threshold;
        break;
      }
      
      // required uint32 aligner_threshold = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_aligner_threshold:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &aligner_threshold_)));
          set_has_aligner_threshold();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }
      
      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void AlignmentTooManyHits::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated .goby.AmbiguousLocation hits = 1;
  for (int i = 0; i < this->hits_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->hits(i), output);
  }
  
  // required uint32 aligner_threshold = 2;
  if (has_aligner_threshold()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->aligner_threshold(), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* AlignmentTooManyHits::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated .goby.AmbiguousLocation hits = 1;
  for (int i = 0; i < this->hits_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        1, this->hits(i), target);
  }
  
  // required uint32 aligner_threshold = 2;
  if (has_aligner_threshold()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->aligner_threshold(), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int AlignmentTooManyHits::ByteSize() const {
  int total_size = 0;
  
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required uint32 aligner_threshold = 2;
    if (has_aligner_threshold()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->aligner_threshold());
    }
    
  }
  // repeated .goby.AmbiguousLocation hits = 1;
  total_size += 1 * this->hits_size();
  for (int i = 0; i < this->hits_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->hits(i));
  }
  
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void AlignmentTooManyHits::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const AlignmentTooManyHits* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const AlignmentTooManyHits*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void AlignmentTooManyHits::MergeFrom(const AlignmentTooManyHits& from) {
  GOOGLE_CHECK_NE(&from, this);
  hits_.MergeFrom(from.hits_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_aligner_threshold()) {
      set_aligner_threshold(from.aligner_threshold());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void AlignmentTooManyHits::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void AlignmentTooManyHits::CopyFrom(const AlignmentTooManyHits& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool AlignmentTooManyHits::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
  
  for (int i = 0; i < hits_size(); i++) {
    if (!this->hits(i).IsInitialized()) return false;
  }
  return true;
}

void AlignmentTooManyHits::Swap(AlignmentTooManyHits* other) {
  if (other != this) {
    std::swap(aligner_threshold_, other->aligner_threshold_);
    hits_.Swap(&other->hits_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata AlignmentTooManyHits::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = AlignmentTooManyHits_descriptor_;
  metadata.reflection = AlignmentTooManyHits_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int AmbiguousLocation::kQueryIndexFieldNumber;
const int AmbiguousLocation::kAtLeastNumberOfHitsFieldNumber;
const int AmbiguousLocation::kLengthOfMatchFieldNumber;
#endif  // !_MSC_VER

AmbiguousLocation::AmbiguousLocation()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void AmbiguousLocation::InitAsDefaultInstance() {
}

AmbiguousLocation::AmbiguousLocation(const AmbiguousLocation& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void AmbiguousLocation::SharedCtor() {
  _cached_size_ = 0;
  query_index_ = 0u;
  at_least_number_of_hits_ = 0u;
  length_of_match_ = 0u;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

AmbiguousLocation::~AmbiguousLocation() {
  SharedDtor();
}

void AmbiguousLocation::SharedDtor() {
  if (this != default_instance_) {
  }
}

void AmbiguousLocation::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* AmbiguousLocation::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return AmbiguousLocation_descriptor_;
}

const AmbiguousLocation& AmbiguousLocation::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_Alignments_2eproto();  return *default_instance_;
}

AmbiguousLocation* AmbiguousLocation::default_instance_ = NULL;

AmbiguousLocation* AmbiguousLocation::New() const {
  return new AmbiguousLocation;
}

void AmbiguousLocation::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    query_index_ = 0u;
    at_least_number_of_hits_ = 0u;
    length_of_match_ = 0u;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool AmbiguousLocation::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required uint32 query_index = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &query_index_)));
          set_has_query_index();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_at_least_number_of_hits;
        break;
      }
      
      // required uint32 at_least_number_of_hits = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_at_least_number_of_hits:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &at_least_number_of_hits_)));
          set_has_at_least_number_of_hits();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_length_of_match;
        break;
      }
      
      // optional uint32 length_of_match = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_length_of_match:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &length_of_match_)));
          set_has_length_of_match();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }
      
      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void AmbiguousLocation::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // required uint32 query_index = 1;
  if (has_query_index()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->query_index(), output);
  }
  
  // required uint32 at_least_number_of_hits = 2;
  if (has_at_least_number_of_hits()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->at_least_number_of_hits(), output);
  }
  
  // optional uint32 length_of_match = 3;
  if (has_length_of_match()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->length_of_match(), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* AmbiguousLocation::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // required uint32 query_index = 1;
  if (has_query_index()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->query_index(), target);
  }
  
  // required uint32 at_least_number_of_hits = 2;
  if (has_at_least_number_of_hits()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->at_least_number_of_hits(), target);
  }
  
  // optional uint32 length_of_match = 3;
  if (has_length_of_match()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->length_of_match(), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int AmbiguousLocation::ByteSize() const {
  int total_size = 0;
  
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required uint32 query_index = 1;
    if (has_query_index()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->query_index());
    }
    
    // required uint32 at_least_number_of_hits = 2;
    if (has_at_least_number_of_hits()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->at_least_number_of_hits());
    }
    
    // optional uint32 length_of_match = 3;
    if (has_length_of_match()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->length_of_match());
    }
    
  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void AmbiguousLocation::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const AmbiguousLocation* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const AmbiguousLocation*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void AmbiguousLocation::MergeFrom(const AmbiguousLocation& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_query_index()) {
      set_query_index(from.query_index());
    }
    if (from.has_at_least_number_of_hits()) {
      set_at_least_number_of_hits(from.at_least_number_of_hits());
    }
    if (from.has_length_of_match()) {
      set_length_of_match(from.length_of_match());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void AmbiguousLocation::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void AmbiguousLocation::CopyFrom(const AmbiguousLocation& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool AmbiguousLocation::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
  
  return true;
}

void AmbiguousLocation::Swap(AmbiguousLocation* other) {
  if (other != this) {
    std::swap(query_index_, other->query_index_);
    std::swap(at_least_number_of_hits_, other->at_least_number_of_hits_);
    std::swap(length_of_match_, other->length_of_match_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata AmbiguousLocation::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = AmbiguousLocation_descriptor_;
  metadata.reflection = AmbiguousLocation_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int AlignmentIndex::kTargetPositionOffsetsFieldNumber;
const int AlignmentIndex::kOffsetsFieldNumber;
const int AlignmentIndex::kAbsolutePositionsFieldNumber;
#endif  // !_MSC_VER

AlignmentIndex::AlignmentIndex()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void AlignmentIndex::InitAsDefaultInstance() {
}

AlignmentIndex::AlignmentIndex(const AlignmentIndex& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void AlignmentIndex::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

AlignmentIndex::~AlignmentIndex() {
  SharedDtor();
}

void AlignmentIndex::SharedDtor() {
  if (this != default_instance_) {
  }
}

void AlignmentIndex::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* AlignmentIndex::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return AlignmentIndex_descriptor_;
}

const AlignmentIndex& AlignmentIndex::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_Alignments_2eproto();  return *default_instance_;
}

AlignmentIndex* AlignmentIndex::default_instance_ = NULL;

AlignmentIndex* AlignmentIndex::New() const {
  return new AlignmentIndex;
}

void AlignmentIndex::Clear() {
  target_position_offsets_.Clear();
  offsets_.Clear();
  absolute_positions_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool AlignmentIndex::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated uint32 target_position_offsets = 1 [packed = true];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, this->mutable_target_position_offsets())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 1, 10, input, this->mutable_target_position_offsets())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_offsets;
        break;
      }
      
      // repeated uint64 offsets = 2 [packed = true];
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_offsets:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, this->mutable_offsets())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 1, 18, input, this->mutable_offsets())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_absolute_positions;
        break;
      }
      
      // repeated uint64 absolute_positions = 3 [packed = true];
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_absolute_positions:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, this->mutable_absolute_positions())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 1, 26, input, this->mutable_absolute_positions())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }
      
      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void AlignmentIndex::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated uint32 target_position_offsets = 1 [packed = true];
  if (this->target_position_offsets_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_target_position_offsets_cached_byte_size_);
  }
  for (int i = 0; i < this->target_position_offsets_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32NoTag(
      this->target_position_offsets(i), output);
  }
  
  // repeated uint64 offsets = 2 [packed = true];
  if (this->offsets_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_offsets_cached_byte_size_);
  }
  for (int i = 0; i < this->offsets_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64NoTag(
      this->offsets(i), output);
  }
  
  // repeated uint64 absolute_positions = 3 [packed = true];
  if (this->absolute_positions_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(3, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_absolute_positions_cached_byte_size_);
  }
  for (int i = 0; i < this->absolute_positions_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64NoTag(
      this->absolute_positions(i), output);
  }
  
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* AlignmentIndex::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated uint32 target_position_offsets = 1 [packed = true];
  if (this->target_position_offsets_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      1,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _target_position_offsets_cached_byte_size_, target);
  }
  for (int i = 0; i < this->target_position_offsets_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt32NoTagToArray(this->target_position_offsets(i), target);
  }
  
  // repeated uint64 offsets = 2 [packed = true];
  if (this->offsets_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      2,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _offsets_cached_byte_size_, target);
  }
  for (int i = 0; i < this->offsets_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt64NoTagToArray(this->offsets(i), target);
  }
  
  // repeated uint64 absolute_positions = 3 [packed = true];
  if (this->absolute_positions_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      3,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _absolute_positions_cached_byte_size_, target);
  }
  for (int i = 0; i < this->absolute_positions_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt64NoTagToArray(this->absolute_positions(i), target);
  }
  
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int AlignmentIndex::ByteSize() const {
  int total_size = 0;
  
  // repeated uint32 target_position_offsets = 1 [packed = true];
  {
    int data_size = 0;
    for (int i = 0; i < this->target_position_offsets_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        UInt32Size(this->target_position_offsets(i));
    }
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    _target_position_offsets_cached_byte_size_ = data_size;
    total_size += data_size;
  }
  
  // repeated uint64 offsets = 2 [packed = true];
  {
    int data_size = 0;
    for (int i = 0; i < this->offsets_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        UInt64Size(this->offsets(i));
    }
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    _offsets_cached_byte_size_ = data_size;
    total_size += data_size;
  }
  
  // repeated uint64 absolute_positions = 3 [packed = true];
  {
    int data_size = 0;
    for (int i = 0; i < this->absolute_positions_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        UInt64Size(this->absolute_positions(i));
    }
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    _absolute_positions_cached_byte_size_ = data_size;
    total_size += data_size;
  }
  
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void AlignmentIndex::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const AlignmentIndex* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const AlignmentIndex*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void AlignmentIndex::MergeFrom(const AlignmentIndex& from) {
  GOOGLE_CHECK_NE(&from, this);
  target_position_offsets_.MergeFrom(from.target_position_offsets_);
  offsets_.MergeFrom(from.offsets_);
  absolute_positions_.MergeFrom(from.absolute_positions_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void AlignmentIndex::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void AlignmentIndex::CopyFrom(const AlignmentIndex& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool AlignmentIndex::IsInitialized() const {
  
  return true;
}

void AlignmentIndex::Swap(AlignmentIndex* other) {
  if (other != this) {
    target_position_offsets_.Swap(&other->target_position_offsets_);
    offsets_.Swap(&other->offsets_);
    absolute_positions_.Swap(&other->absolute_positions_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata AlignmentIndex::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = AlignmentIndex_descriptor_;
  metadata.reflection = AlignmentIndex_reflection_;
  return metadata;
}


// @@protoc_insertion_point(namespace_scope)

}  // namespace goby

// @@protoc_insertion_point(global_scope)
