Genomics technologies

Why are adapter sequences commonly attached to DNA fragments during library preparation?