filter filters one or more placefiles by placement name.
usage: filter [options] placefile[s]
-o | Specify the filename to write to. |
--out-dir | Specify the directory to write files to. |
--prefix | Specify a string to be prepended to filenames. |
-Vr | Exclude every placement name by default (by default everything included). |
-Ir | Include placements whose name matches the given regexp. May be passed multiple times. |
-Er | Exclude placements whose name matches the given regexp. May be passed multiple times. |
-c | Reference package path. |
--cutoff | Use this cutoff for determining how likely a match is for a tax_id. Default: 0.9 |
--pp | Use posterior probability for our criteria. |
-Vx | Exclude every tax_id by default (by default everything included). |
-Ix | Include placements which are likely matches for the given tax_id. May be passed multiple times. |
-Ex | Exclude placements which are likely matches for the given tax_id. May be passed multiple times. |
--mass-gt | Include pqueries with a mass greater than the specified value. |
--mass-le | Include pqueries with a mass less than or equal to the specified value. |
This subcommand will filter pqueries in one or more placefiles. Placements can be filtered either by name or by tax_id.
By default, all pqueries present in any input file will be present in the output file. In this case, adding -Er or -Ex flags will cause pqueries to be excluded from the output if they match any of the provided regexps or tax_ids. Adding -Ir or -Ix flags will re-add any pqueries which would have otherwise been excluded.
If the options -Vr or -Vx are provided, the default will instead be to exclude all pqueries, unless (respectively) -Ir or -Ix are provided to include (respectively) specific placement names or tax_ids. In this case, adding -Er or -Ex flags will exclude pqueries which would have otherwise been included.
Whether or not -Vr or -Vx have been provided, a placement will be included or excluded if any (as opposed to all) of the provided inclusions or exclusions match.
When using the -Ix or -Ex options, it is required to also pass the -c option to provide a reference package for looking up taxonomic data. The –cutoff` flag also controls whether -Ix or -Ex will match for a particular placement: neither flag will match unless the likelihood that the placement matches that tax_id is greater than the value provided for the –cutoff flag.
Since pqueries can have multiple names, the -Ir and -Er flags will filter the names a placement has. If a placement has had all of its names filtered out, it won’t be present in the output.