Filter results of multiHiCcompare

topDirs(
  hicexp,
  logfc_cutoff = 1,
  logcpm_cutoff = 1,
  p.adj_cutoff = 0.01,
  D_cutoff = 1,
  return_df = "pairedbed",
  pval_aggregate = "max"
)

Arguments

hicexp

A hicexp object which has been compared.

logfc_cutoff

The logFC value you wish to filter by. Defaults to 1.

logcpm_cutoff

The logCPM cutoff you wish to filter by. Defaults to 1.

p.adj_cutoff

The adjusted p-value cutoff you wish to filter by. Defaults to 0.01.

D_cutoff

The distance cutoff you wish to filter by. Interactions with a D < D_cutoff will be filtered. Defaults to 1.

return_df

The format for the data.frame returned by the function. Options are "bed" and "pairedbed" (Default).

pval_aggregate

Method to aggregate region-specific p-values. If a region differentially interacts with several other regions, the p-values are aggregated using a 'max' method (Default, select maximum p-value, most conservative), or the Fisher ('fisher'), Lancaster ('lancaster'), or Sidak ('sidak') methods (see 'aggregate' package). regions, it is assigned a single p-value aggregated from several

Value

A data.table containing the filtered results.

Details

This function is meant to filter the results of multiHiCcompare. The top differentially interacting regions (DIRs) can be returned by using this function. When the return_df = "bed" option is set the resulting data.frame can be input into the plot_pvals or plot_counts functions to visualize the top DIRs.

Examples

data('hicexp_diff') topDirs(hicexp_diff)
#> chr1 start1 end1 chr2 start2 end2 D logFC logCPM #> 1: chr22 18800000 18899999 chr22 18900000 18999999 1 -1.0217 6.6933 #> 2: chr22 20200000 20299999 chr22 20300000 20399999 1 -1.1228 6.3142 #> 3: chr22 20300000 20399999 chr22 20700000 20799999 4 -1.0179 8.4828 #> 4: chr22 24200000 24299999 chr22 24300000 24399999 1 -1.4747 5.9224 #> 5: chr22 24200000 24299999 chr22 25100000 25199999 9 -1.0962 8.6435 #> 6: chr22 24300000 24399999 chr22 24600000 24699999 3 -1.4606 8.0560 #> 7: chr22 25300000 25399999 chr22 26900000 26999999 16 -1.2603 10.2406 #> 8: chr22 26400000 26499999 chr22 27100000 27199999 7 1.2468 9.4125 #> 9: chr22 26500000 26599999 chr22 27700000 27799999 12 1.1061 9.6947 #> 10: chr22 26500000 26599999 chr22 28000000 28099999 15 1.3838 9.6157 #> 11: chr22 27000000 27099999 chr22 28000000 28099999 10 -1.0481 11.1515 #> 12: chr22 28000000 28099999 chr22 28700000 28799999 7 1.3231 8.9565 #> 13: chr22 29900000 29999999 chr22 31000000 31099999 11 -1.0089 9.8466 #> 14: chr22 32600000 32699999 chr22 33500000 33599999 9 1.3395 8.0442 #> 15: chr22 32800000 32899999 chr22 34900000 34999999 21 2.9005 8.5070 #> 16: chr22 32900000 32999999 chr22 34000000 34099999 11 1.5199 8.8907 #> 17: chr22 32900000 32999999 chr22 34500000 34599999 16 2.2241 9.1691 #> 18: chr22 32900000 32999999 chr22 35100000 35199999 22 1.6690 9.8300 #> 19: chr22 33200000 33299999 chr22 34400000 34499999 12 1.3570 8.9873 #> 20: chr22 33200000 33299999 chr22 34600000 34699999 14 1.6342 9.1591 #> 21: chr22 33200000 33299999 chr22 34800000 34899999 16 1.5655 9.4893 #> 22: chr22 33200000 33299999 chr22 34900000 34999999 17 1.4156 9.5466 #> 23: chr22 33300000 33399999 chr22 34600000 34699999 13 1.3832 9.3638 #> 24: chr22 33300000 33399999 chr22 34700000 34799999 14 1.2492 9.1958 #> 25: chr22 33300000 33399999 chr22 34900000 34999999 16 1.5862 9.8547 #> 26: chr22 33600000 33699999 chr22 35600000 35699999 20 1.3306 9.8899 #> 27: chr22 36400000 36499999 chr22 37400000 37499999 10 -1.1520 9.2825 #> 28: chr22 36800000 36899999 chr22 37900000 37999999 11 -1.1309 9.7968 #> 29: chr22 36800000 36899999 chr22 38100000 38199999 13 -1.3767 9.2527 #> 30: chr22 39700000 39799999 chr22 41400000 41499999 17 -1.2765 9.8200 #> 31: chr22 46700000 46799999 chr22 48400000 48499999 17 1.9190 8.7671 #> 32: chr22 50300000 50399999 chr22 50900000 50999999 6 -1.0130 9.6722 #> 33: chr22 51100000 51199999 chr22 51200000 51299999 1 -1.2458 4.8466 #> chr1 start1 end1 chr2 start2 end2 D logFC logCPM #> p.value p.adj #> 1: 2.2573E-08 4.1576E-07 #> 2: 1.1007E-07 1.5274E-06 #> 3: 1.2098E-05 5.6920E-04 #> 4: 2.2274E-10 7.0512E-09 #> 5: 1.3771E-04 5.9355E-03 #> 6: 4.4435E-08 2.1951E-05 #> 7: 8.0780E-06 3.4415E-03 #> 8: 8.4540E-08 5.6282E-05 #> 9: 2.1028E-05 3.3351E-03 #> 10: 3.6963E-05 8.6973E-03 #> 11: 3.0062E-10 4.7678E-07 #> 12: 7.2391E-07 2.2526E-04 #> 13: 8.7867E-05 9.2649E-03 #> 14: 1.7093E-04 7.1294E-03 #> 15: 1.5481E-06 3.2077E-03 #> 16: 1.3181E-05 2.3227E-03 #> 17: 2.4922E-08 4.5882E-05 #> 18: 3.9054E-06 4.0460E-03 #> 19: 6.7201E-05 7.6129E-03 #> 20: 3.4162E-07 1.3545E-04 #> 21: 9.3469E-06 3.4415E-03 #> 22: 3.7794E-05 8.6973E-03 #> 23: 1.4769E-06 4.6848E-04 #> 24: 6.5998E-05 7.6129E-03 #> 25: 3.8014E-07 2.3328E-04 #> 26: 1.4052E-05 4.3115E-03 #> 27: 9.3467E-05 9.2649E-03 #> 28: 1.1884E-05 2.3227E-03 #> 29: 6.6184E-06 1.7495E-03 #> 30: 4.5260E-05 9.1004E-03 #> 31: 4.9432E-05 9.1004E-03 #> 32: 8.7106E-07 2.2526E-04 #> 33: 1.4754E-04 9.1182E-04 #> p.value p.adj