Exemplo n.º 1
0
		public int GetCompressionScore(Profile<TSeq, TItem> sequence1, AlignmentCell<TItem>[] p1, AlignmentCell<TItem>[] p2, Profile<TSeq, TItem> sequence2, AlignmentCell<TItem>[] q)
		{
			throw new NotImplementedException();
		}
Exemplo n.º 2
0
		public int GetTranspositionScore(Profile<TSeq, TItem> sequence1, AlignmentCell<TItem>[] p1, AlignmentCell<TItem>[] p2, Profile<TSeq, TItem> sequence2, AlignmentCell<TItem>[] q1, AlignmentCell<TItem>[] q2)
		{
			throw new NotImplementedException();
		}
Exemplo n.º 3
0
		public int GetSubstitutionScore(Profile<TSeq, TItem> sequence1, AlignmentCell<TItem>[] p, Profile<TSeq, TItem> sequence2, AlignmentCell<TItem>[] q)
		{
			int sum = 0;
			for (int i = 0; i < sequence1.Alignment.SequenceCount; i++)
			{
				for (int j = 0; j < sequence2.Alignment.SequenceCount; j++)
				{
					if (!p[i].IsNull && !q[j].IsNull)
					{
						sum += (int) (_scorer.GetSubstitutionScore(sequence1.Alignment.Sequences[i], p[i][0], sequence2.Alignment.Sequences[j], q[j][0])
							* sequence1.Weights[i] * sequence2.Weights[j]);
					}
				}
			}

			return sum / (sequence1.Alignment.SequenceCount * sequence2.Alignment.SequenceCount);
		}