fulcrumgenomics / fgbio

Tools for working with genomic and high throughput sequencing data.
http://fulcrumgenomics.github.io/fgbio/
MIT License
314 stars 67 forks source link

adds a barcode option to FastqToBam #936

Closed bwlang closed 1 year ago

bwlang commented 1 year ago

I tried this if (this.barcode.nonEmpty) rg.setBarcodes(util.Arrays.asList(this.barcode.mkString("+"))) testing like this: barcode=Seq("TATA", "GAGA"), which produces a single barcode "TATA+GAGA" as I expected.

but i was surprised to see that ... if (this.barcode.nonEmpty) rg.setBarcodes(util.Arrays.asList(this.barcode.mkString("-"))) gets split by htsjdk's getBarcodes on "-"( i guess???) , producing a list of 2 barcodes ["TATA", "GAGA"]

I've done like you asked but it's a bit too much magic for my taste...

nh13 commented 1 year ago

@bwlang want to revert to the pre-Seq changes then I'll run the CI and merge if it passes?

bwlang commented 1 year ago

It doesn't really matter which way we pass the barcodes in. I didn't appreciate that until testing with 'TATA-GAGA'... so whichever way you think is clearer.

nh13 commented 1 year ago

Thank-you for your patience @bwlang ! Making sure unit tests pass here, then I'll merge.