X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fmsa_compactor%2FMsaProperties.java;h=1abc6385586a03192d69de9a3eef50e9707de876;hb=c73326f29a91a733a71bfe36192dbd30e4f49af8;hp=ae575b2054ebed6bc9ae8bf66c107e5e1665980c;hpb=cea9261d689486e31e8abd13a25ffbff3c826e2e;p=jalview.git diff --git a/forester/java/src/org/forester/msa_compactor/MsaProperties.java b/forester/java/src/org/forester/msa_compactor/MsaProperties.java index ae575b2..1abc638 100644 --- a/forester/java/src/org/forester/msa_compactor/MsaProperties.java +++ b/forester/java/src/org/forester/msa_compactor/MsaProperties.java @@ -34,6 +34,7 @@ public final class MsaProperties { final private double _gap_ratio; final private int _length; final private int _number_of_sequences; + final private double _avg_number_of_gaps; final private String _removed_seq; public MsaProperties( final int number_of_sequences, @@ -41,12 +42,14 @@ public final class MsaProperties { final double gap_ratio, final double entropy7, final double entropy21, + final double avg_number_of_gaps, final String removed_seq ) { _number_of_sequences = number_of_sequences; _length = length; _gap_ratio = gap_ratio; _entropy7 = entropy7; _entropy21 = entropy21; + _avg_number_of_gaps = avg_number_of_gaps; _removed_seq = removed_seq; } @@ -55,6 +58,7 @@ public final class MsaProperties { _length = msa.getLength(); _gap_ratio = MsaMethods.calcGapRatio( msa ); _removed_seq = removed_seq; + _avg_number_of_gaps = MsaMethods.calcNumberOfGapsStats( msa ).arithmeticMean(); if ( calculate_normalized_shannon_entropy ) { _entropy7 = MsaMethods.calcNormalizedShannonsEntropy( 7, msa ); _entropy21 = MsaMethods.calcNormalizedShannonsEntropy( 21, msa ); @@ -77,6 +81,10 @@ public final class MsaProperties { return _gap_ratio; } + public final double getAvgNumberOfGaps() { + return _avg_number_of_gaps; + } + public final int getLength() { return _length; }