Example #1
0
 public static ModifiedPeptide Read(BinaryReader reader)
 {
     try {
         ModifiedPeptide result = new ModifiedPeptide();
         result.peptideIndex  = reader.ReadInt32();
         result.modifications = PeptideModificationState.Read(reader);
         result.mass          = reader.ReadDouble();
         return(result);
     } catch (EndOfStreamException) {
         return(null);
     }
 }
Example #2
0
        public static Peptide Read(BinaryReader reader)
        {
            Peptide result = new Peptide();

            result.sequence = AASequence.Read(reader);
            if (result.sequence == null)
            {
                return(null);
            }
            result.monoIsotopicMass = reader.ReadDouble();
            int nproteins = reader.ReadInt32();

            for (int i = 0; i < nproteins; i++)
            {
                result.proteinIndices.Add(reader.ReadInt32());
                result.proteinOffsets.Add(reader.ReadInt32());
                result.residueBefore.Add(reader.ReadByte());
                result.residueAfter.Add(reader.ReadByte());
            }
            result.fixedModifications = PeptideModificationState.Read(reader);
            return(result);
        }