-
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview 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 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview 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 Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
package jalview.analysis;
+
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNull;
private static final String P = AAFrequency.PROFILE;
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testCalculate_noProfile()
{
SequenceI seq1 = new Sequence("Seq1", "CAGT");
SequenceI seq2 = new Sequence("Seq2", "CACT");
SequenceI seq3 = new Sequence("Seq3", "C--G");
SequenceI seq4 = new Sequence("Seq4", "CA-t");
- SequenceI[] seqs = new SequenceI[]
- { seq1, seq2, seq3, seq4 };
+ SequenceI[] seqs = new SequenceI[] { seq1, seq2, seq3, seq4 };
Hashtable[] result = new Hashtable[seq1.getLength()];
-
+
AAFrequency.calculate(seqs, 0, seq1.getLength(), result, false);
// col 0 is 100% C
assertEquals("T", col.get(R));
}
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testCalculate_withProfile()
{
SequenceI seq1 = new Sequence("Seq1", "CAGT");
SequenceI seq2 = new Sequence("Seq2", "CACT");
SequenceI seq3 = new Sequence("Seq3", "C--G");
SequenceI seq4 = new Sequence("Seq4", "CA-t");
- SequenceI[] seqs = new SequenceI[]
- { seq1, seq2, seq3, seq4 };
+ SequenceI[] seqs = new SequenceI[] { seq1, seq2, seq3, seq4 };
Hashtable[] result = new Hashtable[seq1.getLength()];
AAFrequency.calculate(seqs, 0, seq1.getLength(), result, true);
assertEquals(4, profile[1][1]);
}
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testCalculate_withProfileTiming()
{
SequenceI seq1 = new Sequence("Seq1", "CAGT");
SequenceI seq2 = new Sequence("Seq2", "CACT");
SequenceI seq3 = new Sequence("Seq3", "C--G");
SequenceI seq4 = new Sequence("Seq4", "CA-t");
- SequenceI[] seqs = new SequenceI[]
- { seq1, seq2, seq3, seq4 };
+ SequenceI[] seqs = new SequenceI[] { seq1, seq2, seq3, seq4 };
Hashtable[] result = new Hashtable[seq1.getLength()];
// ensure class loaded and initialized
System.out.println(System.currentTimeMillis() - start);
}
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testGetPercentageFormat()
{
assertNull(AAFrequency.getPercentageFormat(0));