Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All ReadFilters should have a flag to invert their tests #6005

Closed
jonn-smith opened this issue Jun 14, 2019 · 6 comments
Closed

All ReadFilters should have a flag to invert their tests #6005

jonn-smith opened this issue Jun 14, 2019 · 6 comments

Comments

@jonn-smith
Copy link
Collaborator

All ReadFilters should be able to be inverted by the user when specifying them on the command-line.

Currently the only filter that has this feature is the new SoftClippedReadFilter, which has a flag specific to itself.

The primary difficulty in implementing this feature is that Barclay may not parse the arguments correctly - it seems to only allow one argument of the same name on the command-line. This is an issue because if using PrintReads and specifying multiple ReadFilters you would only be able to invert one of them even if the argument was specified multiple times.

@lbergelson
Copy link
Member

Namespaced arguments in barclay are something we've talked about before that could help with this. So multiple argument collections / plugins objects could declare the same argument and it would be de-ambiguated by the full name of the plugin/collection. Something like --ReadNameFilter.invert --MappingQualityFilter.invert

@lbergelson
Copy link
Member

@cmnbroad

@cmnbroad
Copy link
Collaborator

Yeah, it would be useful (see #2582). Not sure if/when we'll ever get around to the Barclay changes though.

Another simple option that wouldn't require Barclay changes would be to implement it as just another (plugin descriptor) command line argument that could be sued alongside --read-filter'. So if you wanted a ReadNameFilter and an inverted ReadLengthFilter, the syntax would be:

--read-filter ReadNameFilter --invert-read-filter ReadLengthReadFilter

@ConorMesser
Copy link

Is there any progress on this? Inverting the filters would be very helpful as currently, I am unable to filter the correct read set (especially compared to the specificity of samtools view).

@droazen
Copy link
Contributor

droazen commented Jul 23, 2024

@ConorMesser This was added in GATK 4.6 (https://github.com/broadinstitute/gatk/releases/tag/4.6.0.0):

@droazen
Copy link
Contributor

droazen commented Jul 23, 2024

Closing -- this feature was added in GATK 4.6

@droazen droazen closed this as completed Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants