<commit_before>﻿using Proteomics;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;

namespace EngineLayer
{
    public class ProteinParsimonyEngine : MetaMorpheusEngine
    {
        #region Private Fields

        private readonly bool treatModPeptidesAsDifferentPeptides;
        private readonly Dictionary<CompactPeptideBase, HashSet<PeptideWithSetModifications>> compactPeptideToProteinPeptideMatching;
        //dictionary with key being object contianing mass of the compact peptide and value being a hasset of peptides with set modifications having that mass
        #endregion Private Fields

        #region Public Constructors

        public ProteinParsimonyEngine(Dictionary<CompactPeptideBase, HashSet<PeptideWithSetModifications>> compactPeptideToProteinPeptideMatching, bool modPeptidesAreDifferent, List<string> nestedIds) : base(nestedIds)
        {
            this.treatModPeptidesAsDifferentPeptides = modPeptidesAreDifferent;
            this.compactPeptideToProteinPeptideMatching = compactPeptideToProteinPeptideMatching;
        }

        #endregion Public Constructors

        #region Protected Methods

        protected override MetaMorpheusEngineResults RunSpecific()
        {
            ProteinParsimonyResults myAnalysisResults = new ProteinParsimonyResults(this);
            Status("Running protein analysis engine!");

            Status("Applying protein parsimony...");
            myAnalysisResults.ProteinGroups = ApplyProteinParsimony();
            return myAnalysisResults;
        }

        #endregion Protected Methods

        #region Private Methods
<commit_msg>Comment moved<commit_after>﻿using Proteomics;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;

namespace EngineLayer
{
    public class ProteinParsimonyEngine : MetaMorpheusEngine
    {
        #region Private Fields

        private readonly bool treatModPeptidesAsDifferentPeptides;
        //dictionary with key being object contianing mass of the compact peptide and value being a hasset of peptides with set modifications having that mass
        private readonly Dictionary<CompactPeptideBase, HashSet<PeptideWithSetModifications>> compactPeptideToProteinPeptideMatching;
        
        #endregion Private Fields

        #region Public Constructors

        public ProteinParsimonyEngine(Dictionary<CompactPeptideBase, HashSet<PeptideWithSetModifications>> compactPeptideToProteinPeptideMatching, bool modPeptidesAreDifferent, List<string> nestedIds) : base(nestedIds)
        {
            this.treatModPeptidesAsDifferentPeptides = modPeptidesAreDifferent;
            this.compactPeptideToProteinPeptideMatching = compactPeptideToProteinPeptideMatching;
        }

        #endregion Public Constructors

        #region Protected Methods

        protected override MetaMorpheusEngineResults RunSpecific()
        {
            ProteinParsimonyResults myAnalysisResults = new ProteinParsimonyResults(this);
            Status("Running protein analysis engine!");

            Status("Applying protein parsimony...");
            myAnalysisResults.ProteinGroups = ApplyProteinParsimony();
            return myAnalysisResults;
        }

        #endregion Protected Methods

        #region Private Methods

{'fraction_non_alphanumeric': 0.050881757733448975, 'fraction_numerical': 0.0, 'mean_word_length': 3.682002706359946, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3867202', 'n_tokens_mistral': 900, 'n_tokens_neox': 783, 'n_words': 213}