Porechop icon indicating copy to clipboard operation
Porechop copied to clipboard

user defined adapter.py file

Open Psy-Fer opened this issue 8 years ago • 3 comments

Howdy,

I had an issue where a few people wanted to use porechop at the same time, but with different adapters.py settings.

I have forked and implemented a dirty hack for the user to define the path to the file and the module name (which is just the name of the file without .py....i got lazy ok)

Would be cool if this was part of the main package, with some defaults set up, or, if you could just give it a fasta file with barcodes, and porechop built the adapters file from it.

anyway, code is over here https://github.com/Psy-Fer/Porechop

command to define alt_adapters.py ./porechop-runner.py -i test/test_format_barcodes.fasta.gz -b test/ -AP ./alt_adapters.py -AN alt_adapters

Cheers! (i love the pretty interface btw. So good!)

Psy-Fer avatar Nov 16 '17 00:11 Psy-Fer

hmm, the latest python3 should be used...3.6.3. Seems the library is only half baked in earlier versions

Psy-Fer avatar Nov 16 '17 00:11 Psy-Fer

Thanks! People have requested support for custom adapters a few times, so I'll definitely have to add this feature. I'll take a look at your implementation for inspiration!

rrwick avatar Nov 26 '17 09:11 rrwick

I think the best way to handle this would be to ingest a fasta file for the barcodes. Then just have an argument to select the file (with default set to what you have currently, pulled from adapters.py)

I'll have a go if I get the chance. The advantage of this, is you don't need the latest python3 for this method like you do for my hack above.

Psy-Fer avatar Nov 29 '17 03:11 Psy-Fer