calculate average coverage of duplex group segment

get_dg_coverage(duplex_group, genome_coverage)

Arguments

duplex_group

tibble. see read_duplexgroup()

genome_coverage

tibble. see cal_coverage()

Value

tibble.

Examples

sam_file <- system.file('extdata', 'Neat1_1.Aligend_trunc.sam', package = 'paristools') duplexgroup_file <- system.file('extdata', 'Neat1_1.duplexgroup', package = 'paristools'); get_dg_coverage( read_duplexgroup(duplexgroup_file), sam_file %>% read_sam() %>% sam_to_loc_df() %>% cal_coverage() )
#> Warning: All elements of `...` must be named. #> Did you want `data = c(strand, start, end)`?
#> Warning: `cols` is now required. #> Please use `cols = c(data)`
#> # A tibble: 1,884 x 6 #> id chrom strand pair n_reads support #> <chr> <chr> <chr> <chr> <dbl> <int> #> 1 0 neat1 + left 22.8 2 #> 2 0 neat1 + right 26.1 2 #> 3 1 neat1 + left 22.8 2 #> 4 1 neat1 + right 66.8 2 #> 5 100 neat1 + left 57.6 2 #> 6 100 neat1 + right 38.2 2 #> 7 1000 neat1 + left 56.2 2 #> 8 1000 neat1 + right 50.1 2 #> 9 1001 neat1 + left 58.6 2 #> 10 1001 neat1 + right 43 2 #> # … with 1,874 more rows