## 4 Conclusions  
Autotrophic algae (AA) looks to be more suitable for the AD process than heterotrophic algae (H), as AA were more easily digested and converted to methane: 53% COD removal and 104 mL methane from AA; and 23% COD removal and 73 mL methane from H. Ultrasound and autoclave pretreatments and lipid extraction processes applied to the heterotrophic algae had a positive effect on biogas/methane production obtained in AD with these substrate processes by reaching greater volumes than those recorded in H (107, 115, and 117 mL, respectively), and also higher methane yields (263 to 290 L CH\({}_{4}\)/kg VSin). The poorest behavior was recorded in HPenz where the final gas volumes approached those of H.  
The visible reddish pigmentation in the digestate of _Chlorella_ materials after AD, preserved under light and anoxygenic conditions, was attributed to bacteriochlorophyll \(a\) and to carotenoid pigments of the spirilloxanthin series, characteristic of the purple nonsulfur bacteria (PNSB). Microbial identification showed that populations of Proteobacteria found in the inoculum remained predominant after anaerobic digestion in H and HPU units. The main changes observed after AD were the high increase in the relative abundance of _Clostriiales_ and _Bacillus_ responsible for the hydrolysis of complex compounds in acetate. _Methanosaeta_, predominant in the inoculum, became dominant in both H and HPU units until the end of AD, meaning that methane was produced through acetoclastic methanogenesis. The microbial characterization also showed the presence of PNSB--_Rhodobacter_ and _Rhodpseudomonas_--in the inoculum, yet at the end of the AD process, _Rhodpseudomonas_ was predominant in both samples, H (OUT) and HPU (OUT), with a high relative abundance of 38.5% and 52%, respectively. The obtained results show that PNSB did not prevent methane production, so it was possible to simultaneously produce biogas and photosynthetic pigments using the same AD unit applied for the energetic valorization of waste/materials supplied by _Chlorella protothecodes_. The results from this first study can be regarded as a promising indicator for the improvement of a more sustainable AD process established on the biorefinery concept. Further research should focus on the enhancement of biogas/methane yields using the application of autoclave and/or ultrasound pretreatments, either on the autotrophically grown _Chlorella protothecodes_ (AA) or on the extracted heterotrophically grown microalga (HExt). More research is needed to better understand the effect of PNSB on the digestion of microalgae materials under anoxygenic conditions and to determine the conditions for their development as well as the advantages and drawbacks of the competition for the same substrates. The following supporting information can be downloaded at: [[https://www.mdpi.com/article/10.3390/app13053325/s1](https://www.mdpi.com/article/10.3390/app13053325/s1)]([https://www.mdpi.com/article/10.3390/app13053325/s1](https://www.mdpi.com/article/10.3390/app13053325/s1)), Figure S1: The effect of pretreatments on _Chlorella protothecodes_ cells seen under an optical microscope. Bar, 5 um; (a) H--heterotrophic algae; (b) HExt--extracted heterotrophic algae; pretreated heterotrophic algae: (c) HEnz--enzymatic; (d) HPA--autoclave; (e) HPU--ultrasound; (f) AA--autotrophic algae. Figure S2: UV spectrum of untreated algae and pretreated algae. Figure S3: Pictures at the end of the anaerobic digestion to see differences in coloration in units. H--heterotrophic algae (4-6); HExt--extracted heterotrophic algae (7-9); pretreated heterotrophic algae: (HPEnz--enzymatic (10-12); HPA--autoclave (13-15); HPU--ultrasound (16-18)); AA--autotrophic algae (19-21); I--inoculum (1-3). Figure S4: Alpha rarefaction curves for the occurrence with which OTUs were detected at each sample from inoculum (I) and samples from anaerobic digestion: H--heterotrophic algae; HPU--pretreated heterotrophic algae. OTU--operational taxonomic unit.