## 1 Introduction  
Activities taken for the sake of environmental protection and energy security are the main motivation of research on renewable energy sources [1]. One of the alternatives to fossil fuels is methane (CH\({}_{4}\)) obtained from methane fermentation in anaerobic conditions, i.e., anaerobic digestion (AD). Methane fermentation can be implemented in technologies designed for the safe disposal and immobilization of a variety of organic biomass, used as a substrate [2]. Anaerobic digestion is a process often applied to sewage sludge and cattle slurry, which are substrates that enable the acquisition of high CH\({}_{4}\) content in biogas. Methane obtained via biological transformations is an eco-friendly, cheap and renewable fuel [3]. In order to harvest the highest possible amount of biogas and CH\({}_{4}\) contained in it, strict monitoring of the AD process and composition of the involved microbial community, an extremely complex and specialized microbiome, is in order [4, 5]. The four-stage AD process engages different groups of microorganisms, responsible for each of the stages and mutually dependent on one another. The following degradation stages can be distinguished (according to the subsequent organic matter conversions): hydrolysis, acidogenesis, acetogenesis, and methanogenesis, which is the final, key stage of the process driven by the activity of methanogenic microorganisms [6]. Substrates subjected to AD, and especially sewage sludge and cattle slurry, may contain pharmaceuticals (and products of their transformation), used in treatment of humans and animals, which have not been completely metabolized in their bodies [7,8]. There are numerous reports demonstrating that drugs administered in human and veterinary medicine have been detected in digestate from biogas plants fed sewage sludge or cattle slurry [9, 10, 11]. The presence of medications in substrates induces permanent selective pressure on microorganisms active in the first three stages of AD, and on methanogens directly responsible for generation of CH\({}_{4}\)[12,13]. Both sewage sludge and cattle slurry, often used as substrates in AD, can be loaded with antimicrobial substances present in different concentrations. The drugs most often detected in sewage sludge are quinolones, sulfonamides and MLS pharmaceuticals (macrolides-incosamides-streptomycinins) [14], whereas cattle slurry is most often found to contain tetracyclines, amoxicillin, and sulfamethoxazole [15]. Substrates undergoing AD are also frequently determined to be contaminated with metronidazolezole (MET), which effectively inhibits the growth and development of anaerobic microorganisms and, by being a fat-soluble substance, it is difficult to remove [16]. Despite more stringent drug monitoring procedures, it is still worrying to observe a constant growth in the global consumption of pharmaceuticals [17]. In 2013, it was estimated that the consumption of antibiotics in China alone reached about 8.4 \(\times\) 10\({}^{7}\) kg, half of which was administered in veterinary medicine, and the overall amount greatly surpassed the annual consumption of antibiotics in the USA, which was 1.48 \(\times\) 10\({}^{7}\) kg. Antimicrobial preparations used in veterinary treatment corresponded to 52% of the total consumption of antibiotics in China and 80% in the USA. At the same time, the consumption of antibiotics on animal farms in the EU countries averaged around 7.98 \(\times\) 10\({}^{6}\) kg. The European Surveillance of Veterinary Antimicrobial Consumption (ESVAC) informs that in Poland alone in 2014, the total amount of consumed antibiotics was 5.8 \(\times\) 10\({}^{5}\) kg [18]. Research by [PERSON] et al. [19] and [PERSON] et al. [20] showed that a large part of the residue, e.g., tetracycline, was discharged unchanged and/or active to domestic or animal wastewater at concentrations ranging from ng L\({}^{-1}\) to mg L\({}^{-1}\). Similar concentrations of antibiotics were observed by [PERSON] et al. [21] in the analyzed samples of cattle manure, which were approx.