jdidion / atropos

An NGS read trimming tool that is specific, sensitive, and speedy. (production)
Other
120 stars 15 forks source link

Question about adapter removal and length filtering #84

Closed ElDeveloper closed 5 years ago

ElDeveloper commented 5 years ago

As far as I can tell from the code, and from some tests. When the command atropos trim removes adapters and filters sequences by length (say using --minimum-length) the sequences are first filtered by length and then adapters are removed. As a consequence there's sequences that might artificially pass the length filtering, because the adapter bases allow them to meet the minimum-length. Is this by design or is this a bug?

jdidion commented 5 years ago

Modifiers (which include adapter trimming) are applied first, then filters are applied.

https://github.com/jdidion/atropos/blob/2b15c778f0ccf1d0fb753e4334fa6dc0048a9ee6/atropos/commands/trim/__init__.py#L67

ElDeveloper commented 5 years ago

@jdidion, thanks so much for replying! I have now found where I was getting confused, it was a mistake on my end.