1 /* Copyright (c) 2011 Peter Troshin
3 * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0
5 * This library is free software; you can redistribute it and/or modify it under the terms of the
6 * Apache License version 2 as published by the Apache Software Foundation
8 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
9 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache
10 * License for more details.
12 * A copy of the license is in apache_license.txt. It is also available here:
13 * @see: http://www.apache.org/licenses/LICENSE-2.0.txt
15 * Any republication or derived work distributed in source code form
16 * must include this copyright and license notice.
18 package compbio.data.sequence;
21 * Enumeration listing of all the supported methods.
23 * @author Agnieszka Golicz & Peter Troshin
25 public enum ConservationMethod {
26 KABAT, JORES, SCHNEIDER, SHENKIN, GERSTEIN, TAYLOR_GAPS, TAYLOR_NO_GAPS, ZVELIBIL, KARLIN, ARMON, THOMPSON, NOT_LANCET, MIRNY, WILLIAMSON, LANDGRAF, SANDER, VALDAR, SMERFS;
28 public static ConservationMethod getMethod(String meth) {
29 meth = meth.trim().toLowerCase();
30 if (meth.equalsIgnoreCase(KABAT.toString())) {
33 if (meth.equalsIgnoreCase(JORES.toString())) {
36 if (meth.equalsIgnoreCase(SCHNEIDER.toString())) {
39 if (meth.equalsIgnoreCase(SHENKIN.toString())) {
42 if (meth.equalsIgnoreCase(GERSTEIN.toString())) {
45 if (meth.equalsIgnoreCase(TAYLOR_GAPS.toString())) {
48 if (meth.equalsIgnoreCase(TAYLOR_NO_GAPS.toString())) {
49 return TAYLOR_NO_GAPS;
51 if (meth.equalsIgnoreCase(ZVELIBIL.toString())) {
54 if (meth.equalsIgnoreCase(KARLIN.toString())) {
57 if (meth.equalsIgnoreCase(ARMON.toString())) {
60 if (meth.equalsIgnoreCase(THOMPSON.toString())) {
63 if (meth.equalsIgnoreCase(NOT_LANCET.toString())) {
66 if (meth.equalsIgnoreCase(MIRNY.toString())) {
69 if (meth.equalsIgnoreCase(WILLIAMSON.toString())) {
72 if (meth.equalsIgnoreCase(LANDGRAF.toString())) {
75 if (meth.equalsIgnoreCase(SANDER.toString())) {
78 if (meth.equalsIgnoreCase(VALDAR.toString())) {
81 if (meth.equalsIgnoreCase(SMERFS.toString())) {