public override int GetHashCode()
 {
     unchecked
     {
         var hash = (int)2166136261;
         hash = (hash * 16777619) ^ SequenceCoverage.GetHashCode();
         hash = (hash * 16777619) ^ FileId.GetHashCode();
         return((hash * 16777619) ^ (CoveredLines != null ? CoveredLines.GetHashCode() : 0));
     }
 }
Exemplo n.º 2
0
        public string ToOutputLine(OutputFileType type)
        {
            StringBuilder sb = new StringBuilder(512);

            switch (type)
            {
            case OutputFileType.Parsimony_Proteins:
                sb.Append(Name);
                sb.Append(',');
                sb.Append(IsDecoy);
                sb.Append(',');
                sb.Append("\"" + Description + "\"");
                sb.Append(',');
                sb.Append(LongestProteinLen);
                sb.Append(',');
                sb.Append(SequenceCoverage.ToString("g4"));
                sb.Append(',');
                sb.Append(SequenceRedundacy.ToString("g4"));
                sb.Append(',');
                sb.Append(Count);
                sb.Append(',');
                sb.Append(Count);     // Number of unique proteins... need to figure this one out at some point
                sb.Append(',');
                sb.Append(UniquePeptides);
                sb.Append(',');
                sb.Append(Peptides.Count);
                sb.Append(',');
                sb.AppendLine(PScore.ToString(CultureInfo.InvariantCulture));
                sb.Append(',');
                break;

            case OutputFileType.Parsimony_Protein_Groups:
                sb.Append(Name);
                sb.Append(',');
                sb.Append("\"" + Description + "\"");
                sb.Append(',');
                sb.Append(Count);
                sb.Append(',');
                sb.Append(Count);
                sb.Append(',');
                sb.Append(UniquePeptides);
                sb.Append(',');
                sb.Append(Peptides.Count);
                sb.Append(',');
                sb.Append(PScore);
                sb.AppendLine();
                sb.Append(GetProteinStrings());
                sb.Append(GetPeptideString());
                break;
            }
            return(sb.ToString());
        }