private static boolean validate
            (String query, String clusteringMethod, boolean lowerTriangular, boolean upperTrangular, boolean subReplicates) 
            throws ImproperInputEx 
    {
        if (query == null) query = "";
        query = query.trim();
        if (query.equals("")) 
        {
            throw new ImproperInputEx("Query cannot be null or empty; Protein Distance matrix expected...!");
        }//if
        
        if(clusteringMethod == null) clusteringMethod = "";
        clusteringMethod = clusteringMethod.trim();

        if (clusteringMethod.equalsIgnoreCase("UPGMA"))
        {
            partCodeG += "N\n";
        }
        else if ( (!clusteringMethod.equalsIgnoreCase("Neighbor-joining")) && (!clusteringMethod.equals("")) )
        {
            throw new ImproperInputEx("Phylip Neighbor supprots only two clustering methods: Neighbor-joining, UPGMA");
        }
        
        if (lowerTriangular == true)
            partCodeG += "L\n";

        if (upperTrangular == true)
            partCodeG += "R\n";
        
        if (subReplicates == true)
            partCodeG += "S\n";
        
        return true;
        
    }//validate