swo / caravan

a 16S pipeline
0 stars 3 forks source link

Inline barcodes #9

Closed elsherbini closed 8 years ago

elsherbini commented 8 years ago

closes #6

Add --inline option to the demultiplex subparser, which passes it to barcodes.py. If --inline is non-zero, it will look at that number of bases in the fastx record for a match to the barcode_map for demultiplexing.

Also refactored the tests to allow easy addition of new test conditions, using the params keyword in the ficture decorator (docs)

swo commented 8 years ago

We may have talked about this: do you think it's better to do van.py demultiplex --inline_length 8 rather than van.py truncate length 8 | van.py demultiplex? I like the pipe because then there's not duplication of functionality.

The mapper fixture is pretty cool.

elsherbini commented 8 years ago

I hadn't thought of that, very smart! I'm all for not duplicating functionality.

One consideration: the truncate solution requires some synthetic thinking on the part of the software user (which i failed at), and I think it's good to make it as clear as possible how to do commonly needed things. But maybe instead of duplicating functionality, this issue could be fixed with documentation.

I'll close this pull request and add a new one for just the test refactoring.