public override void Write(BlamLib.IO.EndianWriter s)
 {
     s.Write(ulong.MinValue);
     Count.Write(s);
     Size.Write(s);
     OffsetReferences.Write(s);
     OffsetStrings.Write(s);
     s.Write(uint.MinValue);
 }
 public override void Read(BlamLib.IO.EndianReader s)
 {
     s.Seek(4 + 4, System.IO.SeekOrigin.Current);
     Count.Read(s);
     Size.Read(s);
     OffsetReferences.Read(s);
     OffsetStrings.Read(s);
     s.Seek(1 + 3, System.IO.SeekOrigin.Current);
 }
        public override bool PrepareOptions()
        {
            var result = base.PrepareOptions();

            long value;

            if (OffsetStrings.Any(l => !long.TryParse(l, out value)))
            {
                ParsingErrors.Add(string.Format("Offsets error {0}.", OffsetStrings.Merge(",")));
            }

            foreach (var file in this.InputFiles)
            {
                if (!File.Exists(file))
                {
                    ParsingErrors.Add(string.Format("Input file not exists {0}.", file));
                }
            }

            if (!File.Exists(this.CoordinateFile))
            {
                ParsingErrors.Add(string.Format("Coordinate file not exists {0}.", this.CoordinateFile));
            }

            if (!string.IsNullOrEmpty(this.FastaFile) && !File.Exists(this.FastaFile))
            {
                ParsingErrors.Add(string.Format("Fasta file not exists {0}.", this.FastaFile));
            }

            if (!string.IsNullOrEmpty(this.ExcludeXml) && !File.Exists(this.ExcludeXml))
            {
                ParsingErrors.Add(string.Format("Exclude xml file not exists {0}.", this.ExcludeXml));
            }

            if (!string.IsNullOrEmpty(this.FastqFile) && !File.Exists(this.FastqFile))
            {
                ParsingErrors.Add(string.Format("Fastq file not exists {0}.", this.FastqFile));
            }

            if (this.OffsetStrings == null || this.OffsetStrings.Count == 0)
            {
                this.OffsetStrings = DEFAULT_Offsets.ToList();
            }

            return(result && ParsingErrors.Count == 0);
        }