Beispiel #1
0
 public static DatabasePeptide Read(BinaryReader reader)
 {
     try {
         DatabasePeptide result = new DatabasePeptide();
         result.length           = reader.ReadByte();
         result.monoisotopicMass = reader.ReadDouble();
         int nproteins = reader.ReadInt32();
         for (int i = 0; i < nproteins; i++)
         {
             result.proteinIndices.Add(reader.ReadInt32());
             result.proteinOffsets.Add(reader.ReadUInt16());
         }
         result.fixedModifications = new PeptideModificationCounts(reader);
         return(result);
     } catch (EndOfStreamException) {
         return(null);
     }
 }
Beispiel #2
0
 public ModifiedPeptide(DatabasePeptide peptide, int peptideIndex, string sequence)
 {
     this.peptideIndex = peptideIndex;
     modifications     = new PeptideModificationState(sequence.Length);
     mass = peptide.GetMonoIsotopicMass(sequence);
 }