/****************************************************************************
* Copyright (C) 2008 Peter Mortensen and Matthias Mann *
* This file is part of MSQuant. *
* *
* MSQuant is distributed under the terms of *
* the GNU General Public License. See src/COPYING.TXT or *
* <http://www.gnu.org/licenses/gpl.txt> for details. *
* *
* MSQuant is free software; you can redistribute it *
* and/or modify it under the terms of the GNU *
* General Public License as published by the Free *
* Software Foundation; either version 2 of the *
* License, or (at your option) any later version. *
* *
* MSQuant is distributed in the hope that it will be *
* useful, but WITHOUT ANY WARRANTY; without even the *
* implied warranty of MERCHANTABILITY or FITNESS FOR *
* A PARTICULAR PURPOSE. See the GNU General Public *
* License for more details. *
* *
* You should have received a copy of the GNU General *
* Public License along with MSQuant; if not, write to *
* the Free Software Foundation, Inc., 59 Temple *
* Place, Suite 330, Boston, MA 02111-1307 USA *
* *
* Purpose: Unit testing of isotope distributions calculations. *
* *
****************************************************************************/
/****************************************************************************
* CEBI *
* Software Development Group *
* Peter Mortensen *
* E-mail: NUKESPAMMERSdrmortensen@get2netZZZZZZ.dk *
* WWW: http://www.cebi.sdu.dk/ *
* *
* Program for post-processing of result from search in mass *
* spectrometric data. *
* *
* FILENAME: isotopeDistributionTests.cs *
* TYPE: CSHARP *
* *
* CREATED: PM 2008-01-24 Vrs 1.0. *
* UPDATED: PM 2008-xx-xx *
* *
* *
* *
****************************************************************************/
//using System;
//using System.Text;
using System.Collections.Generic; //For List
using NUnit.Framework;
using massSpectrometryBase;
/****************************************************************************
* <placeholder for header> *
****************************************************************************/
namespace namespaceForIsotopeDistributionTests
{
/****************************************************************************
* <placeholder for header> *
****************************************************************************/
[TestFixture]
public class isotopeDistributionTests
{
/****************************************************************************
* <placeholder for header> *
****************************************************************************/
[Test]
public void isotopePattern1()
{
// Peptide GTQDGSKHFVR.
List<double> iso =
isotopeDistribution.findIsotopeDistribution(52, 82, 18, 17, 0);
Assert.IsNotNull(iso);
double tol = 1.0E-6;
Assert.AreEqual(1.000000, iso[0], tol, "C12 is not 100%");
Assert.AreEqual(0.66432752, iso[1], tol, "C13 is not 66%");
Assert.AreEqual(0.25140454, iso[2], tol, "2xC13 is not 25%");
Assert.AreEqual(0.06929599, iso[3], tol, "3xC13 is not 7%");
Assert.AreEqual(0.01534171, iso[4], tol, "4xC13 is not 1.5%");
Assert.AreEqual(0.00286874, iso[5], tol, "5xC13 is not 0.3%");
Assert.AreEqual(0.00046269, iso[6], tol, "6xC13 is not 0.04%");
Assert.AreEqual(0.00006082, iso[7], tol, "7xC13 is not 0.006%");
} //isotopePattern1
} //class isotopeDistributionTests
} //namespace namespaceForIsotopeDistributionTests
Generated by script codePublish.pl at 2009-01-05T15:20:59.