Closed m3hdad closed 6 months ago
Just to check, you're trying to extract a UMI from just read2? extract
is designed to extract from read1 or read1 and read2, but it's possible to extract from just read2. Just swap them around in the input/output like so:
umi_tools extract -I read2.fastq.gz --read2-in=read1.fastq.gz --bc-pattern=NNNNNNNN -S r2UMI.fastq.gz --read2-out=r1UMI.fastq.gz
Yes I was trying to extract from read2 only. The reason is that umi-tools is part of a pipeline which I do not want to change the order of reads or its logic will break down.
Anyway I know the swapping works fine. It was my misunderstanding about --bc-pattern2
function to extract only from read2. Well in the documentation it says --bc-pattern
and/or --bc-pattern2
are required.
You might consider this as a feature request if it's not too much work to cater for. As I mentioned passing --bc-pattern=X
escapes the TypeError. Or the issue is closed as it is how it was suppose to work. Thanks for your reply.
Ah, the docs are wrong in that case!
I'd have to take a look back into the code to see whether supporting just extraction from read2 is a PITA. I suspect it should be OK and I've got no principle against it.
You OK if we add this @IanSudbery?
Fine by me, as long is its not too big a surgery.
Just posting here as another instance where this isn't explicitly clear in the documentation and caused issues until I found this post. Would be a great feature to add.
Thanks!
The next release will include an option to extract barcodes from read 2 only (see #630)
Hi there,
Shouldn't in the following
if(len(read1.seq) < len(self.pattern))
be asif(len(read1.seq) < len(self.pattern2))
or something to avoid this.This is fixed if I pass
--bc-pattern=X
UMI on read2:
read1:
read2
I have the following TypeError: