Gel electrophoresis is a technique used for separating DNA of different sizes . This happens in a special gel electrophoresis machine , which is a rectangular shaped block of gel in a box containing a liquid ( called buffer ) and a voltage running through it from one electrode to another . Gel electrophoresis of large DNA or RNA is usually done by agarose gel electrophoresis .