rrwick / Porechop

adapter trimmer for Oxford Nanopore reads
GNU General Public License v3.0
323 stars 124 forks source link

user defined adapter.py file #36

Open Psy-Fer opened 6 years ago

Psy-Fer commented 6 years ago

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 commented 6 years ago

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

rrwick commented 6 years ago

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!

Psy-Fer commented 6 years ago

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.