rrwick / Porechop

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

Dealing with multiple adapters in read #26

Closed bc2zb closed 7 years ago

bc2zb commented 7 years ago

I'm wondering what porechop's behavior would be if there are multiple adapters present in the middle of a read? I saw that it'll split it in half, does it check the split reads for additional adapters in the middle?

Edit: Forgot to ask, can you run it recursively in such a case?

rrwick commented 7 years ago

If there are multiple adapters in a read, it should split the read into more than two pieces. It first looks for all middle adapters, then it splits. E.g. a read with 3 middle adapters could result in 4 pieces (though sometimes less depending on the value of --min_split_read_size).

So recursively running shouldn't be necessary. It probably wouldn't work anyway, because if you ran Porechop on already-trimmed reads, it would likely fail to find any adapters at the start/end of reads and therefore not bother looking for them in the middle of reads.

Ryan