Hi, I need to cut 27 nt in R1 is it normal that --...
# airrflow
j
Hi, I need to cut 27 nt in R1 is it normal that --clip_r1 27 also cuts 27nt in R2 ? It is problematic because it remove my c primer which is at the beginning of R2. Thank you in advance for your help
g
Hi @Justine, it shouldn’t be the case, I just double checked and seems like the code for it is ok and there is no accidental swap of r1 - r2. We use fastp for that. Do you have any adapters in your data? You could try also passing the `--trim_fastq false`param, in case that adapter trimming is creating this issue.
j
Thanks for your answer. Apart from this sequence of 27nt at the beginning of R1 just before the UMI + race linker no. If I use --trim_fastq false, this will prevent cutting the first 27 nt of my R1, won't it? I've tested by taking umi_lenght = actual length of UMI + 27nt and it works. Is there any contraindication to doing it this way?
g
Hi Justine,
--trim_fastq
controls adapter trimming,
--clip_r1 / r2
controls read clipping. So with
--clip_r1
now everything is fine and only R1 reads are clipped? Or is there still an issue with the R2 read clipping?
j
Hi @Gisela Gabernet, thanks for the explanations. --umi_length 18 --clip_r1 27 --trim_fastq false keep cut also 27nt in R2.
The problem is that the pipeline doesn't set
--trim_front2 0
in the fastp command when you run the pipeline with
--clip_r1 27 --clip_r2 0
parameters, so as specified in the fastp documentation, trim_front2 = trim_front1.
g
ok I see, I will fix it in the next version of the pipeline to also provide
--trim_front2 0
. Meanwhile, you can fix this in your case by providing a custom configuration file that specifies the necessary params for fastp. Instead of providing the extra clip params to the airrflow command provide this:
Copy code
-c custom.config
And then inside the custom config you can provide the fastp necessary params:
Copy code
process{
  withName: FASTP{
    ext.args = "--trim_front1 27 --trim_front2 0 --trim_tail1 0 --trim_tail2 0"
  }
}
Hopefully this fixes your issue @Justine
This would be preferable to including them as part of the UMI barcode, as if there is some variability in those bases that is not in the UMI, the same UMI would be split into different groups
j
Thank you very much for your reply, It works but I lose a lot of sequences because in some cases the upstream sequence is truncated by a few bases and so it shifts the search of my race linker after the 18 nt of the UMI in R1. I try to use fastp --adapter_sequence=GACTAGGCAGTGGTGTGACCGCAGAGT but it doesn't cut.
@Gisela Gabernet I see that the --adapter_sequence option only cuts off the end of the reads, so I'm preprocessing with cutadapt. I'm now looking for a way not to lose the reads that don't merge during the ASSEMBLE_PAIRS step, as these reads are important for my research team.