# Methods
Methods are invoked using an object-oriented syntax. For example:
- mapped = select(mapped) using |mr|:
- mr = mr.pe_filter()
They can also take arguments
- mapped = select(mapped) using |mr|:
- mr = mr.filter(min_match_size=30)
## Short reads
Short reads have the following methods:
## Mapped reads
Mapped reads contain several methods. None of these methods changes its argument, they return new values. The typical approach is to reassign the result to the same variable as before (see examples above).
### filter
filter takes a mapped read and returns a mapped read according to several criteria:
If more than one test is specified, then they are combined with the AND operation (i.e., all conditions have to be fulfilled for the test to be true).
The default is to discard mappings that do not pass the test, but it can be changed with the action argument, which must be one of {drop} (default: the read is excluded from the output), or {unmatch} (the read is changed so that it no longer reports matching).
You can pass the flag reverse (i.e., reverse=True) to reverse the sign of the test.
Privacy: Usage of this site follows EMBL’s Privacy Policy. In accordance with that policy, we use Matomo to collect anonymised data on visits to, downloads from, and searches of this site. Contact: bork@embl.de.