Filter genes from an RNA tibble.

filter_known_genes(x, what = "rm", specials = "MALAT1")

Arguments

x

The tibble for RNA.

what

A code string. If this contains "r" ribosomal genes are removed. If this contains "m" mitocondrial genes are removed. Both are matched by a regular expression.

specials

A list of genes to remove a priori.

Value

The RNA tibble without the required gene entries.

Examples

data('example_input')
filter_known_genes(example_input$rna)
#> 
#> ── Ribosomal 
#>  n = 166 genes found.
#> MRPL20, RPL22, RPL11, MRPS15, RPS8, RPL5 , ...
#> 
#> ── Mitochondrial 
#>  180 genes found.
#> ICMT, CAMTA1, MTF2, HENMT1, LAMTOR5, MTMR11 , ...
#> 
#> ── Specials 
#>  n = 1 genes found.
#> # A tibble: 190,566 × 6
#>    gene     chr      from      to cell                                 value
#>    <chr>    <chr>   <int>   <int> <chr>                                <int>
#>  1 NOC2L    chr1   944203  959309 bcc.su008.pre.tumor_AAGGCAGTCACCGTAA     2
#>  2 AGRN     chr1  1020120 1056118 bcc.su008.pre.tumor_AAGGCAGTCACCGTAA     1
#>  3 SDF4     chr1  1216909 1232067 bcc.su008.pre.tumor_AAGGCAGTCACCGTAA     1
#>  4 ACAP3    chr1  1292390 1309609 bcc.su008.pre.tumor_AAGGCAGTCACCGTAA     2
#>  5 CPTP     chr1  1324756 1328896 bcc.su008.pre.tumor_AAGGCAGTCACCGTAA     1
#>  6 AURKAIP1 chr1  1373730 1375495 bcc.su008.pre.tumor_AAGGCAGTCACCGTAA     1
#>  7 CCNL2    chr1  1385711 1399335 bcc.su008.pre.tumor_AAGGCAGTCACCGTAA     2
#>  8 CDK11B   chr1  1635225 1659012 bcc.su008.pre.tumor_AAGGCAGTCACCGTAA     1
#>  9 CDK11A   chr1  1702379 1724357 bcc.su008.pre.tumor_AAGGCAGTCACCGTAA     1
#> 10 WRAP73   chr1  3630767 3652761 bcc.su008.pre.tumor_AAGGCAGTCACCGTAA     2
#> # ℹ 190,556 more rows