I want to use bbduk to remove adapters from my paired end reads. I am using my own file with adapters, but I have to specify if I want to use that file as lref (to trim the left side / 5' ends) or rref (to trim the right side / 3' ends). The following is my code:
bbduk2 in1=sample_R.fq in2=sample_L.fq out1=sample_R_trimmed.fq out2=sample_L_trimmed.fq lref=/path_to_file_with_adapters.fa k=23 mink=11 hdist=1 tbo tpe
I don't understand why I have to specify lref or rref, and which one to choose. Are adapters only found on one side of the reads?
I ran the command with both rref and lref. Both methods produced two output files of smaller sizes than the original (so something was trimmed using either method), but only rref produced outputs that were of the same size (meaning that both the left and right reads were kept in pairs). I don't understand why this is so.