NOVELTY - Treating wastewater with filamentous biomass and producing a polyhydroxyalkanoate (PHA)-storing filamentous biomass under conditions comprises: (a) mixing the wastewater with the activated sludge; (b) selecting a filament dominated biomass and causing the filamentous biomass; (c) treating the wastewater with the filamentous biomass; (d) enhancing the PHA production potential of the filamentous biomass; and (e) separating the PHA enriched filamentous biomass from the wastewater such that further PHA accumulation or harvesting from the filamentous biomass can occur.    USE - The methods are useful for treating wastewater with filamentous biomass and producing PHA-storing filamentous biomass under conditions where the filamentous biomass is selected and caused to proliferate to dominate activated sludge; biologically treating wastewater with biomass and producing PHA storing biomass; and for biologically treating wastewater with biomass and producing PHA-storing biomass in sequencing batch reactor (all claimed).    ADVANTAGE - The filamentous biomass exhibits a high potential for PHA production.    DETAILED DESCRIPTION - Treating wastewater with filamentous biomass and producing a polyhydroxyalkanoate (PHA)-storing filamentous biomass under conditions where the filamentous biomass is selected and caused to proliferate to dominate an activated sludge, comprises: (a) mixing the wastewater with the activated sludge; (b) selecting a filament dominated biomass and causing the filamentous biomass to proliferate and dominate over non-filamentous biomass in the activated sludge; (c) treating the wastewater with the filamentous biomass by utilizing the filamentous biomass to remove contaminants from the wastewater; (d) enhancing the PHA production potential of the filamentous biomass by subjecting the filamentous biomass to alternating feast and famine conditions where under feast conditions more biodegradable organic substrate is available to the filamentous biomass than under famine conditions; and (e) separating the PHA enriched filamentous biomass from the wastewater such that further PHA accumulation or harvesting from the filamentous biomass can occur. INDEPENDENT CLAIMS are:    (1) a method of biologically treating wastewater with a biomass and producing a PHA storing biomass, including: (a) mixing the wastewater and biomass and biologically treating the wastewater in a mainstream process to remove contaminants from the wastewater; (b) enhancing the PHA production potential of the biomass through a biomass enrichment process by subjecting the biomass to alternating feast and famine conditions where under feast conditions more biodegradable organic substrate is available to the biomass than under famine conditions; (c) separating the biomass from the wastewater to produce a treated effluent and a concentrated biomass; (d) directing the concentrated biomass to a sidestream having at least one famine reactor in the sidestream; (e) directing the concentrated biomass into the famine reactor(s) in the sidestream and subjecting the concentrated biomass to famine conditions in the famine reactor(s) in the sidestream and (f) after the concentrated biomass has been subjected to famine conditions in the sidestream, recycling at least a portion of the concentrated biomass to the mainstream and mixing the concentrated biomass with the wastewater in the mainstream; and    (2) a method of biologically treating wastewater with a biomass and producing a PHA-storing biomass in a sequencing batch reactor, including: (a) mixing the wastewater and biomass and biologically treating the wastewater to remove contaminants from the wastewater; (b) enhancing the PHA production potential of the biomass through a biomass enrichment process by subjecting the biomass to alternating feast and famine conditions where under feast conditions more biodegradable organic substrate is available to the biomass than under famine conditions; (c) separating the biomass from the wastewater to produce a treated effluent and a concentrated biomass; (d) subjecting the concentrated biomass to famine conditions; and (e) after the concentrated biomass has been subjected to famine conditions in the reactor, leaving at least a portion of the concentrated biomass in the reactor to be mixed with the wastewater in the following sequencing batch reactor cycle.