Skip to content
Snippets Groups Projects
Select Git revision
  • 1.3.0
  • master default protected
  • develop protected
  • cmake_boost_refactor
  • ubuntu_ci
  • mmtf
  • non-orthogonal-maps
  • no_boost_filesystem
  • data_viewer
  • 2.11.1
  • 2.11.0
  • 2.10.0
  • 2.9.3
  • 2.9.2
  • 2.9.1
  • 2.9.0
  • 2.8.0
  • 2.7.0
  • 2.6.1
  • 2.6.0
  • 2.6.0-rc4
  • 2.6.0-rc3
  • 2.6.0-rc2
  • 2.6.0-rc
  • 2.5.0
  • 2.5.0-rc2
  • 2.5.0-rc
  • 2.4.0
  • 2.4.0-rc2
29 results

test_clustal.cc

Blame
  • user avatar
    Marco Biasini authored
    A minimalistic OST (no info, no gfx, no gui, no img) compiles
    and links with a default CentOS installation. Only eigen2 is
    required as an additional dependency. But since that's header
    only library that's not a problem for bundling a standalone OST.
    
    Tested on CentOS 5.5 with boost 1.33.1 and MacOS X with boost
    1.46.
    9563cd8e
    History
    test_clustal.cc 2.24 KiB
    //------------------------------------------------------------------------------
    // This file is part of the OpenStructure project <www.openstructure.org>
    //
    // Copyright (C) 2008-2011 by the OpenStructure authors
    //
    // This library is free software; you can redistribute it and/or modify it under
    // the terms of the GNU Lesser General Public License as published by the Free
    // Software Foundation; either version 3.0 of the License, or (at your option)
    // any later version.
    // This library 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 Lesser General Public License for more
    // details.
    //
    // You should have received a copy of the GNU Lesser General Public License
    // along with this library; if not, write to the Free Software Foundation, Inc.,
    // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
    //------------------------------------------------------------------------------
    
    /*
      Author: Marco Biasini
     */
    
    #include <ost/io/seq/clustal_io_handler.hh>
    #include <ost/io/seq/load.hh>
    #define BOOST_TEST_DYN_LINK
    #include <boost/test/unit_test.hpp>
    #include <boost/test/auto_unit_test.hpp>
    
    using namespace ost;
    using namespace ost::io;
    const static String MOUSE="MFQAFPGDYDSGSRCSSSPSAESQYLSSVDSFGSPPTAAASQECAGLGEMPGSFVPTVTAITTSQDLQWLVQPTLISSMAQSQGQPLASQPPAVDPYDMPGTSYSTPGLSAYSTGGASGS";
    const static String HUMAN="MFQAFPGDYDSGSRCSSSPSAESQYLSSVDSFGSPPTAAASQECAGLGEMPGSFVPTVTAITTSQDLQWLVQPTLISSMAQSQGQPLASQPPVVDPYDMPGTSYSTPGMSGYSSGGASGS";
    
    
    BOOST_AUTO_TEST_SUITE( io );
    
    
    BOOST_AUTO_TEST_CASE(clustal) 
    {
      BOOST_CHECK(ClustalIOHandler::ProvidesImport("","clustal"));
      BOOST_CHECK(ClustalIOHandler::ProvidesImport("alignment.aln"));
      seq::AlignmentHandle aln=LoadAlignment("testfiles/alignment.aln");
      BOOST_CHECK_EQUAL(aln.GetCount(), 2);
      BOOST_CHECK_EQUAL(aln.FindSequence("FOSB_MOUSE").GetString(), 
                        aln.GetSequence(0).GetString());
      BOOST_CHECK_EQUAL(aln.FindSequence("FOSB_HUMAN").GetString(), 
                        aln.GetSequence(1).GetString());  
      BOOST_CHECK_EQUAL(aln.GetSequence(0).GetString(), MOUSE);
      BOOST_CHECK_EQUAL(aln.GetSequence(1).GetString(), HUMAN);
    }
    
    BOOST_AUTO_TEST_SUITE_END();