Returns the glow_variant_filter that the sets of one gene-centric non-coding mask are extracted under: the run's filter copied (QC label and pass value, variant type, MAF cutoff, minimum MAC, minimum set size) with no annotation clause, because the mask's selection and its gene linkage are done once per chromosome by define_regions_noncoding, whose candidates already satisfy the mask. The grouping pass applies the QC label and the variant type; the per-set extraction applies those again together with the run's MAF cutoff, minimum MAC and minimum set size. The filter carries the mask's name as the attribute category_name (as coding_filter does) and its specification as mask.

noncoding_filter(category, filter_spec)

Arguments

category

One of the eight mask names: "upstream", "downstream", "UTR", "promoter_CAGE", "promoter_DHS", "enhancer_CAGE", "enhancer_DHS", "ncRNA". The masks are described in define_regions_noncoding.

filter_spec

The run's glow_variant_filter, from variant_filter. Its annotation clauses, if any, are not copied.

Value

A glow_variant_filter with the attributes category_name and mask.

Examples

run_filter <- variant_filter(rare_maf_cutoff = 0.01, min_variants = 2L)
spec <- noncoding_filter("enhancer_DHS", run_filter)
spec
#> GLOWr Variant Filter Specification
#>   Variant type: SNV 
#>   MAF cutoff: 0.01 
#>   Min MAC: 1 
#>   Min variants: 2 
#>   Category: enhancer_DHS 
#>   Annotation filter: none (all passing variants)
attr(spec, "category_name")
#> [1] "enhancer_DHS"