// Copyright (C) 2010 Christian M Zmasek
// Copyright (C) 2010 Sanford-Burnham Medical Research Institute
// All rights reserved
// Copyright (C) 2010 Christian M Zmasek
// Copyright (C) 2010 Sanford-Burnham Medical Research Institute
// All rights reserved
// 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
// 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
// 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.
// 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
//
// Contact: phylosoft @ gmail . com
// 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
//
// Contact: phylosoft @ gmail . com
package org.forester.evoinference.distance;
import org.forester.evoinference.matrix.distance.BasicSymmetricalDistanceMatrix;
import org.forester.msa.Msa;
package org.forester.evoinference.distance;
import org.forester.evoinference.matrix.distance.BasicSymmetricalDistanceMatrix;
import org.forester.msa.Msa;
private double calcFractionalDissimilarity( final int row_1, final int row_2 ) {
final int length = _msa.getLength();
int nd = 0;
private double calcFractionalDissimilarity( final int row_1, final int row_2 ) {
final int length = _msa.getLength();
int nd = 0;
- aa_1 = _msa.getResidueAt( row_1, col );
- aa_2 = _msa.getResidueAt( row_2, col );
- if ( ( aa_1 != GAP ) && ( aa_2 != GAP ) ) {
- if ( aa_1 != aa_2 ) {
- nd++;
- }
- n++;
+ if ( _msa.getResidueAt( row_1, col ) != _msa.getResidueAt( row_2, col ) ) {
+ ++nd;
private void copyIdentifiers( final int s, final BasicSymmetricalDistanceMatrix d ) {
for( int i = 0; i < s; i++ ) {
private void copyIdentifiers( final int s, final BasicSymmetricalDistanceMatrix d ) {
for( int i = 0; i < s; i++ ) {