Place two cups of blueberries in a large heavy sauce pan with 1/4 cup of sugar.
Using a potato masher, crush the berries and cook for about 5 minutes. Remove from heat.
Add the remaining 4 cups of berries, remaining 1 cup sugar, tapioca, lemon juice, cinnamon. and almond extract if using.
Set aside for 15 minutes.
Prepare crust.
Preheat oven to 325.
Roll out half of dough and cover the bottom of a 9 inch pie plate. Fill with prepared blueberry filling. Roll out top crust, if making a lattice top crust, follow these directions:
Cut into 11/8 inch wide strips that are at least 10-inches long. Using a ruler that is 1 1/8-inches wide, lay the ruler on the dough at 1 edge and roll across dough using the edge of the ruler as you go to cut through the dough.Lay 4 strips of dough across the top of the filling horizontally, leaving an even amount of space in between each strip. Fold back 2 alternating strips and lay down another strip in the middle of the pie, perpendicular to the other strips. Return the strips that are laid back to their original position. Next, fold back the other 2 strips and lay down a strip to the left of the center perpendicular strip. Return the strips that are laid back to their original position and repeat on the other side of the perpendicular strip, folding back the same 2 strips as you did on the other side. Once you have a lattice, brush all the strips of dough with the egg yolk, trim excess dough and pinch strips and edge of crust in order to seal.
Place the pie on the bottom rack of the oven on top of a cookie sheet or sheet of foil to catch drippings and bake for about 1 hour 15 minutes. The pie should be bubbling lightly around the edges. If the lattice is not browned enough in the center, place under the broiler for 1 to 2 minutes. Watch carefully!
Place the pie on a rack and allow to cool to room temperature before serving, about 2-3 hours.