#Libraries----------------------------------------------------------------------

"""
Dependencies and modules necessary for analytical functions to work
"""

import seaborn as sns
import matplotlib.pyplot as plt


##Exploratory plots----------------------------------------------------------------------


def feature_plot(data,*args):

    """
    Function takes data file provided by the data_prep function and plots analytical scatter plots.
    #Input: data frame generated by the data_prep function, as well as variables for feature ploting, e.g. "MW" and "TSPA".
    #       If user does not select args, the default values will be used:"Atom_number","MW","TSPA","HBD_count","HBA_count",#       "Rotatable_bond_count","MolLogP","Ring_number","AP".
    #Output: scatter plot of correlation visualisation and a data frame with correlation values.
    """
    if len(args)>0:
        for var in args:
            if var not in data.columns:
                print("%s not in the data frame" % var)
                return data.head()
        values=list(args)

    if len(args)==0:
        values=["Atom_number","MW","TSPA","HBD_count","HBA_count","Rotatable_bond_count","MolLogP","Ring_number","AP"]
    
    sns.set()
    sns.pairplot(data[values], height = 1.5)
    plt.show()

    return 