00001 /* 00002 00003 Copyright (C) 2003-2009 Kevin Thornton, krthornt[]@[]uci.edu 00004 00005 Remove the brackets to email me. 00006 00007 This file is part of libsequence. 00008 00009 libsequence is free software: you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation, either version 3 of the License, or 00012 (at your option) any later version. 00013 00014 libsequence is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 long with libsequence. If not, see <http://www.gnu.org/licenses/>. 00021 00022 */ 00023 00024 #include <Sequence/PolyTable.hpp> 00025 #include <Sequence/PolyTableManip.hpp> 00026 00027 namespace Sequence 00028 { 00029 polySiteVector rotatePolyTable(const Sequence::PolyTable *data) 00039 { 00040 polySiteVector L; 00041 for (unsigned i = 0 ; i < data->numsites() ; ++i) 00042 { 00043 std::string s; 00044 for(unsigned j = 0 ; j < data->size() ; ++j) 00045 { 00046 s += (*data)[j][i]; 00047 } 00048 L.push_back( polymorphicSite(data->position(i), s) ); 00049 } 00050 return L; 00051 } 00052 }
1.6.3