The application type impacts the wavelet chosen, and out-of-range decomposition levels produce useless data, which harms data analysis [33]. Furthermore, the selection of the appropriate family type and DWT decomposition level for the feature representation of a class is important because these two parameters affect the classification performance [34; 35; 36]. However, previous studies have mostly selected the DWT family type and decomposition level, based on experience or manually [4; 30]. They did not find the optimal wavelet family and decomposition level based on the data used. The well-known DWT families include Haar, Daubechies, Coiflets, Symlets, Discrete Meyer, and Biorthogonal. The differences between these DWT families include compact size, vanishing moment, symmetry, and orthogonality [37]. The decomposition level is related to the number of global and local features produced from DWT [34]. Using a high level of decomposition on a short sequence will create overlapping information, while using a low decomposition level on a long sequence will ignore much information. Some studies use metaheuristic methods to optimize the selection of DWT family types and decomposition levels such as genetic algorithms [27; 38], particle swarm optimization [27; 34; 39], whale optimization algorithm [28] and evolutionary quantum crowding [29]. However, no research has been performed to choose the optimal DWT family type and decomposition level for protein feature representation in hierarchical classes. This study uses a hybrid optimization method between the particle swarm optimization algorithm and the firefly algorithm (FAPSO) to select DWT's family and decomposition level. This hybridization is necessary to overcome the shortcomings of particle swarm optimization (PSO) and firefly algorithm (FA) algorithms [40]. The PSO algorithm has several weaknesses such as premature convergence or being trapped in local optima and a low convergence rate in the exploitation process [41; 42]. The FA algorithm has advantages compared to the PSO algorithm, such as no local and global parameters which could prevent it from getting stuck in local minima and premature convergence. In addition, the FA algorithm does not have a velocity parameter that can overcome the problem of the slowness of a particle's velocity. In this study, FA and PSO algorithms have been combined to prevent premature convergence of each algorithm, avoid local optima, and balance the exploitation and exploration processes [43]. The other problem relates to error propagation in hierarchical classification. It is a classification error in the nodes at the top level of the hierarchy. Then, this classification error will continue to the bottom level of the hierarchy and affect the classification results. This error propagation cannot be corrected at the bottom of the hierarchy [44; 45]. There are various methods to overcome the error propagation problem in hierarchical classification [22; 45; 46; 47]. This study used the virtual class method introduced by [48] to overcome this problem. This method was also used in [49] to overcome the problem of propagation errors in text hierarchy classification. In this method, each parent node except the root node and the terminal node will have one child node known as the virtual class node. These virtual nodes contain the training data from the parent node only. During the training phase, each classification model on each parent node will learn how to classify data only between the node and the virtual class node. The models generated at each parent node use the top-down classification method during the testing phase. A study by [49] found that this virtual class method can avoid the problem of propagated error by stopping the classification at the correct hierarchical level. This method can produce good experimental results compared to the hierarchical classification method by overcoming the problem of error propagation.