DavidsonGroup / flexiplex

The Flexible Demultiplexer
https://davidsongroup.github.io/flexiplex/
MIT License
23 stars 2 forks source link

Forward and reverse barcode #7

Closed Frazapel closed 10 months ago

Frazapel commented 1 year ago

Hi all,

I cannot understand how to specify two barcodes for each sample. One forward and one reverse. Is there a way to do that?

Thanks!

nadiadavidson commented 1 year ago

Hi,

You can run flexiplex twice to extract out both barcodes, by piping the output of the search for the forward barcode to the search for the reverse barcode. e.g. cat file.fastq | flexiplex -p forward_left_flank -k forward_barcodes -T forward_right_flank -n forward [other options..] | flexiplex -p reverse_left_flank -k reverse_barcodes -T reverse_right_flank -n reverse [other options..]

The barcodes will be prefixed to the read ID. Note that sequence for -p and -T don't always need to be provided, but at least one of these does. You may also need to reverse compliment the reverse barcodes and reverse left/right flanking sequencing to ensure that the correct part of the sequence (the barcodes) are trimmed from the reads.

We are quite keen on looking at different use cases for flexiplex so we can add documentation to help others on the tool's website. If you have a small example file of reads and some information about the barcode structure within the reads and what the reads are, you are most welcome to share these with us so we can help you and others to get it running easily.

Cheers, Nadia.