GM12878 on bp - After removing telemore and centremore, Study about string of 0

##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
##      0.0     17.0     50.0    168.8    116.0 134569.0

Arm 1 - 200bp resolution

Load data

Study string of 0

## [1] 18145
summary(zero_regions$bp200_bin_size)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.000   1.000   3.799   3.000 671.000
##      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
## 4.840e-06 6.893e-03 2.059e-02 3.012e-02 4.340e-02 2.560e-01
##      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
## 0.0000009 0.1796927 0.4042432 0.4131520 0.6565578 0.9033211
##      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
## 4.840e-06 6.893e-03 2.059e-02 3.012e-02 4.340e-02 2.560e-01
##      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
## 0.0000009 0.1796927 0.4042432 0.4131520 0.6565578 0.9033211

w = 2000, h= 2000, e = 0.1

smooth_line1 <- read.csv("GM12878/chr1/smooth0to2000_chr1.1_200bp.csv")
smooth_line1 <- smooth_line1[,-1]


probability_table1 <- data.frame(Position = c(1:nrow(data1_200bp_mean)), Probability = data1_200bp_mean$baseProbs)

plot(smooth_line1$y, type = 'l')

Subset plots

Strong boundary

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   1.000   2.000   3.000   2.977   4.000   8.000

Set different number of cutt-off for strong boundary

Full length

 cut.off.list = c(5:8)
## Full length arm1
strong_boundaries_plot(smooth_line = smooth_line1,boundary_table =all.tads.arm1,
                       probability_table = probability_table1,
                       cut.off.list = c(5:8))

Subset length

## Subset arm1
strong_boundaries_plot(smooth_line = smooth_line1[1:100000, ], boundary_table =all.tads.arm1,
                       probability_table = probability_table1[1:100000,],
                       cut.off.list = c(5:8))

Windown size

Actual size (not 200bp bin) of all found TAD

### Actual size (not 200bp bin) of all found TAD
summary(report1a$actual_size)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   46200   74900   89400  131462  187800  383800

Actual size of all TAD generated by strong boundaries

size.strong.t5 = size_strong_region(strong_boundaries = strong.boundaries[[1]])
size.strong.t6 = size_strong_region(strong_boundaries = strong.boundaries[[2]])
size.strong.t7 = size_strong_region(strong_boundaries = strong.boundaries[[3]])
datatable(size.strong.t5);  datatable(size.strong.t6);  datatable(size.strong.t7)         
summary(size.strong.t5$region_size);  summary(size.strong.t6$region_size);  summary(size.strong.t7$region_size)  
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
##    61600   883900  2139100  3142200  3278100 16985400
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
##   652800  2789400  5743800  5784350  7297800 13562800
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
##  5412000  9487400 13562800 13529133 17587700 21612600

w = 5000, h= 2000, e = 0.1

Subset plots

Strong boundary

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   1.000   1.000   3.000   3.163   4.000  12.000

Set different number of cutt-off for strong boundary

Full length

Subset length

## Subset arm1
strong_boundaries_plot(smooth_line = smooth_line1[1:100000, ], boundary_table =all.tads.arm2,
                       probability_table = probability_table1[1:100000,],
                       cut.off.list = c(5:8))

Windown size

Actual size (not 200bp bin) of all found TAD

### Actual size (not 200bp bin) of all found TAD
summary(report2$actual_size)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   46200   80000  184800  273935  437300  989600

Actual size of all TAD generated by strong boundaries

size.strong.t6 = size_strong_region(strong_boundaries = strong.boundaries[[1]])
size.strong.t7 = size_strong_region(strong_boundaries = strong.boundaries[[2]])
size.strong.t8 = size_strong_region(strong_boundaries = strong.boundaries[[3]])
size.strong.t9 = size_strong_region(strong_boundaries = strong.boundaries[[4]])
size.strong.t10 = size_strong_region(strong_boundaries = strong.boundaries[[5]])
datatable(size.strong.t6);  datatable(size.strong.t7); datatable(size.strong.t8);  datatable(size.strong.t9);  datatable(size.strong.t10);        
summary(size.strong.t6$region_size);  summary(size.strong.t7$region_size); summary(size.strong.t8$region_size); summary(size.strong.t9$region_size);  summary(size.strong.t10$region_size);  
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   80000  583100 1320600 1813458 2801350 6759600
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
##   331800  1208500  2465000  3061631  3693800 11426600
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
##   943000  1879200  2823800  5191461  6356400 22626200
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
##  1998400  4777600  7072700  9950300 14791550 22626200
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
##  7430000  9792800 17716100 16129567 21075800 24567800

w = 10000, h= 2000, e = 0.1

Subset size

Strong boundary

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   1.000   1.000   2.000   2.243   2.000  15.000

Set different number of cutt-off for strong boundary

Full length

Subset length

## Subset arm1
strong_boundaries_plot(smooth_line = smooth_line1[1:100000, ], boundary_table =all.tads.arm3,
                       probability_table = probability_table1[1:100000,],
                       cut.off.list = cut.off.list )

Windown size

Actual size (not 200bp bin) of all found TAD

### Actual size (not 200bp bin) of all found TAD
summary(report3$actual_size)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   46200  202800  586600  669810 1038600 1952000

Actual size of all TAD generated by strong boundaries

reports <- lapply(strong.boundaries, size_strong_region)
reports
## [[1]]
##    left_boundary_region right_boundary_region region_size
## 1                267000                267000           0
## 2                267000               1050200      783200
## 3               1050200               2576800     1526600
## 4               2576800               3643400     1066600
## 5               3643400               4655200     1011800
## 6               4655200               7658000     3002800
## 7               7658000               8562600      904600
## 8               8562600              10510400     1947800
## 9              10510400              11646800     1136400
## 10             11646800              12210800      564000
## 11             12210800              14104200     1893400
## 12             14104200              15814600     1710400
## 13             15814600              17490200     1675600
## 14             17490200              18895000     1404800
## 15             18895000              19250200      355200
## 16             19250200              20503000     1252800
## 17             20503000              22650000     2147000
## 18             22650000              23200000      550000
## 19             23200000              24834800     1634800
## 20             24834800              26606200     1771400
## 21             26606200              27404200      798000
## 22             27404200              29195400     1791200
## 23             29195400              30784200     1588800
## 24             30784200              31948000     1163800
## 25             31948000              33629400     1681400
## 26             33629400              34861400     1232000
## 27             34861400              37686400     2825000
## 28             37686400              38823400     1137000
## 29             38823400              39806400      983000
## 30             39806400              41507200     1700800
## 31             41507200              42922200     1415000
## 32             42922200              44801400     1879200
## 33             44801400              45501600      700200
## 34             45501600              47181800     1680200
## 35             47181800              48560600     1378800
## 36             48560600              49293200      732600
## 37             49293200              50350800     1057600
## 38             50350800              52828800     2478000
## 39             52828800              54804600     1975800
## 40             54804600              55010200      205600
## 41             55010200              57278200     2268000
## 42             57278200              58043600      765400
## 43             58043600              59960800     1917200
## 44             59960800              60148800      188000
## 45             60148800              62751600     2602800
## 46             62751600              63688000      936400
## 47             63688000              64255400      567400
## 48             64255400              66362000     2106600
## 49             66362000              67766600     1404600
## 50             67766600              68339200      572600
## 51             68339200              70500600     2161400
## 52             70500600              71064000      563400
## 53             71064000              72624600     1560600
## 54             72624600              73997800     1373200
## 55             73997800              74762600      764800
## 56             74762600              75908200     1145600
## 57             75908200              78127000     2218800
## 58             78127000              79497400     1370400
## 59             79497400              81548800     2051400
## 60             81548800              82223000      674200
## 61             82223000              82635600      412600
## 62             82635600              84949400     2313800
## 63             84949400              86499800     1550400
## 64             86499800              87143600      643800
## 65             87143600              89614400     2470800
## 66             89614400              91523400     1909000
## 67             91523400              92614800     1091400
## 68             92614800              94052600     1437800
## 69             94052600              95046000      993400
## 70             95046000              95311600      265600
## 71             95311600              96842400     1530800
## 72             96842400              97044400      202000
## 73             97044400              98050600     1006200
## 74             98050600             100463600     2413000
## 75            100463600             101439400      975800
## 76            101439400             102185400      746000
## 77            102185400             104643600     2458200
## 78            104643600             105028000      384400
## 79            105028000             105793600      765600
## 80            105793600             107135600     1342000
## 81            107135600             109102000     1966400
## 82            109102000             111211000     2109000
## 83            111211000             113969200     2758200
## 84            113969200             114968800      999600
## 85            114968800             116150800     1182000
## 86            116150800             117064800      914000
## 87            117064800             119670600     2605800
## 
## [[2]]
##    left_boundary_region right_boundary_region region_size
## 1                267000               1050200      783200
## 2               1050200               2576800     1526600
## 3               2576800               3643400     1066600
## 4               3643400               4655200     1011800
## 5               4655200               7658000     3002800
## 6               7658000              10510400     2852400
## 7              10510400              11646800     1136400
## 8              11646800              12210800      564000
## 9              12210800              14104200     1893400
## 10             14104200              15814600     1710400
## 11             15814600              17490200     1675600
## 12             17490200              18895000     1404800
## 13             18895000              19250200      355200
## 14             19250200              20503000     1252800
## 15             20503000              22650000     2147000
## 16             22650000              24834800     2184800
## 17             24834800              26606200     1771400
## 18             26606200              27404200      798000
## 19             27404200              29195400     1791200
## 20             29195400              30784200     1588800
## 21             30784200              31948000     1163800
## 22             31948000              33629400     1681400
## 23             33629400              34861400     1232000
## 24             34861400              37686400     2825000
## 25             37686400              38823400     1137000
## 26             38823400              41507200     2683800
## 27             41507200              42922200     1415000
## 28             42922200              44801400     1879200
## 29             44801400              45501600      700200
## 30             45501600              47181800     1680200
## 31             47181800              48560600     1378800
## 32             48560600              50350800     1790200
## 33             50350800              52828800     2478000
## 34             52828800              54804600     1975800
## 35             54804600              58043600     3239000
## 36             58043600              59960800     1917200
## 37             59960800              60148800      188000
## 38             60148800              62751600     2602800
## 39             62751600              63688000      936400
## 40             63688000              66362000     2674000
## 41             66362000              67766600     1404600
## 42             67766600              68339200      572600
## 43             68339200              70500600     2161400
## 44             70500600              71064000      563400
## 45             71064000              72624600     1560600
## 46             72624600              73997800     1373200
## 47             73997800              75908200     1910400
## 48             75908200              78127000     2218800
## 49             78127000              79497400     1370400
## 50             79497400              81548800     2051400
## 51             81548800              84949400     3400600
## 52             84949400              86499800     1550400
## 53             86499800              87143600      643800
## 54             87143600              89614400     2470800
## 55             89614400              91523400     1909000
## 56             91523400              94052600     2529200
## 57             94052600              95311600     1259000
## 58             95311600              96842400     1530800
## 59             96842400              97044400      202000
## 60             97044400              98050600     1006200
## 61             98050600             100463600     2413000
## 62            100463600             101439400      975800
## 63            101439400             102185400      746000
## 64            102185400             104643600     2458200
## 65            104643600             107135600     2492000
## 66            107135600             109102000     1966400
## 67            109102000             111211000     2109000
## 68            111211000             113969200     2758200
## 69            113969200             114968800      999600
## 70            114968800             116150800     1182000
## 71            116150800             117064800      914000
## 72            117064800             119670600     2605800
## 
## [[3]]
##    left_boundary_region right_boundary_region region_size
## 1                267000               1050200      783200
## 2               1050200               2576800     1526600
## 3               2576800               4655200     2078400
## 4               4655200               7658000     3002800
## 5               7658000              10510400     2852400
## 6              10510400              12210800     1700400
## 7              12210800              14104200     1893400
## 8              14104200              15814600     1710400
## 9              15814600              17490200     1675600
## 10             17490200              18895000     1404800
## 11             18895000              19250200      355200
## 12             19250200              22650000     3399800
## 13             22650000              24834800     2184800
## 14             24834800              26606200     1771400
## 15             26606200              27404200      798000
## 16             27404200              30784200     3380000
## 17             30784200              33629400     2845200
## 18             33629400              34861400     1232000
## 19             34861400              37686400     2825000
## 20             37686400              41507200     3820800
## 21             41507200              42922200     1415000
## 22             42922200              44801400     1879200
## 23             44801400              45501600      700200
## 24             45501600              47181800     1680200
## 25             47181800              48560600     1378800
## 26             48560600              50350800     1790200
## 27             50350800              52828800     2478000
## 28             52828800              54804600     1975800
## 29             54804600              59960800     5156200
## 30             59960800              60148800      188000
## 31             60148800              62751600     2602800
## 32             62751600              63688000      936400
## 33             63688000              66362000     2674000
## 34             66362000              67766600     1404600
## 35             67766600              68339200      572600
## 36             68339200              70500600     2161400
## 37             70500600              71064000      563400
## 38             71064000              72624600     1560600
## 39             72624600              75908200     3283600
## 40             75908200              78127000     2218800
## 41             78127000              79497400     1370400
## 42             79497400              81548800     2051400
## 43             81548800              84949400     3400600
## 44             84949400              86499800     1550400
## 45             86499800              87143600      643800
## 46             87143600              89614400     2470800
## 47             89614400              91523400     1909000
## 48             91523400              94052600     2529200
## 49             94052600              95311600     1259000
## 50             95311600              96842400     1530800
## 51             96842400              97044400      202000
## 52             97044400             100463600     3419200
## 53            100463600             101439400      975800
## 54            101439400             102185400      746000
## 55            102185400             104643600     2458200
## 56            104643600             107135600     2492000
## 57            107135600             109102000     1966400
## 58            109102000             111211000     2109000
## 59            111211000             113969200     2758200
## 60            113969200             114968800      999600
## 61            114968800             116150800     1182000
## 62            116150800             117064800      914000
## 63            117064800             119670600     2605800
## 
## [[4]]
##    left_boundary_region right_boundary_region region_size
## 1                267000               1050200      783200
## 2               1050200               2576800     1526600
## 3               2576800               4655200     2078400
## 4               4655200               7658000     3002800
## 5               7658000              10510400     2852400
## 6              10510400              12210800     1700400
## 7              12210800              14104200     1893400
## 8              14104200              15814600     1710400
## 9              15814600              18895000     3080400
## 10             18895000              19250200      355200
## 11             19250200              24834800     5584600
## 12             24834800              26606200     1771400
## 13             26606200              27404200      798000
## 14             27404200              30784200     3380000
## 15             30784200              33629400     2845200
## 16             33629400              34861400     1232000
## 17             34861400              37686400     2825000
## 18             37686400              41507200     3820800
## 19             41507200              42922200     1415000
## 20             42922200              45501600     2579400
## 21             45501600              47181800     1680200
## 22             47181800              48560600     1378800
## 23             48560600              50350800     1790200
## 24             50350800              59960800     9610000
## 25             59960800              62751600     2790800
## 26             62751600              66362000     3610400
## 27             66362000              67766600     1404600
## 28             67766600              68339200      572600
## 29             68339200              70500600     2161400
## 30             70500600              71064000      563400
## 31             71064000              72624600     1560600
## 32             72624600              75908200     3283600
## 33             75908200              78127000     2218800
## 34             78127000              79497400     1370400
## 35             79497400              86499800     7002400
## 36             86499800              87143600      643800
## 37             87143600              89614400     2470800
## 38             89614400              91523400     1909000
## 39             91523400              94052600     2529200
## 40             94052600              95311600     1259000
## 41             95311600              96842400     1530800
## 42             96842400              97044400      202000
## 43             97044400             100463600     3419200
## 44            100463600             104643600     4180000
## 45            104643600             109102000     4458400
## 46            109102000             111211000     2109000
## 47            111211000             116150800     4939800
## 48            116150800             119670600     3519800
## 
## [[5]]
##    left_boundary_region right_boundary_region region_size
## 1                267000               2576800     2309800
## 2               2576800               4655200     2078400
## 3               4655200               7658000     3002800
## 4               7658000              10510400     2852400
## 5              10510400              12210800     1700400
## 6              12210800              14104200     1893400
## 7              14104200              18895000     4790800
## 8              18895000              19250200      355200
## 9              19250200              24834800     5584600
## 10             24834800              26606200     1771400
## 11             26606200              27404200      798000
## 12             27404200              30784200     3380000
## 13             30784200              33629400     2845200
## 14             33629400              34861400     1232000
## 15             34861400              37686400     2825000
## 16             37686400              42922200     5235800
## 17             42922200              45501600     2579400
## 18             45501600              47181800     1680200
## 19             47181800              48560600     1378800
## 20             48560600              59960800    11400200
## 21             59960800              62751600     2790800
## 22             62751600              66362000     3610400
## 23             66362000              67766600     1404600
## 24             67766600              68339200      572600
## 25             68339200              70500600     2161400
## 26             70500600              71064000      563400
## 27             71064000              72624600     1560600
## 28             72624600              75908200     3283600
## 29             75908200              78127000     2218800
## 30             78127000              79497400     1370400
## 31             79497400              86499800     7002400
## 32             86499800              87143600      643800
## 33             87143600              89614400     2470800
## 34             89614400              91523400     1909000
## 35             91523400              94052600     2529200
## 36             94052600              95311600     1259000
## 37             95311600              97044400     1732800
## 38             97044400             100463600     3419200
## 39            100463600             104643600     4180000
## 40            104643600             109102000     4458400
## 41            109102000             111211000     2109000
## 42            111211000             116150800     4939800
## 
## [[6]]
##    left_boundary_region right_boundary_region region_size
## 1                267000               2576800     2309800
## 2               2576800               4655200     2078400
## 3               4655200               7658000     3002800
## 4               7658000              12210800     4552800
## 5              12210800              14104200     1893400
## 6              14104200              19250200     5146000
## 7              19250200              24834800     5584600
## 8              24834800              26606200     1771400
## 9              26606200              33629400     7023200
## 10             33629400              42922200     9292800
## 11             42922200              45501600     2579400
## 12             45501600              47181800     1680200
## 13             47181800              48560600     1378800
## 14             48560600              59960800    11400200
## 15             59960800              62751600     2790800
## 16             62751600              66362000     3610400
## 17             66362000              67766600     1404600
## 18             67766600              68339200      572600
## 19             68339200              71064000     2724800
## 20             71064000              72624600     1560600
## 21             72624600              78127000     5502400
## 22             78127000              79497400     1370400
## 23             79497400              86499800     7002400
## 24             86499800              89614400     3114600
## 25             89614400              91523400     1909000
## 26             91523400              94052600     2529200
## 27             94052600              97044400     2991800
## 28             97044400             104643600     7599200
## 29            104643600             109102000     4458400
## 30            109102000             111211000     2109000
## 31            111211000             116150800     4939800
## 
## [[7]]
##    left_boundary_region right_boundary_region region_size
## 1                267000               2576800     2309800
## 2               2576800               4655200     2078400
## 3               4655200              12210800     7555600
## 4              12210800              14104200     1893400
## 5              14104200              19250200     5146000
## 6              19250200              24834800     5584600
## 7              24834800              26606200     1771400
## 8              26606200              33629400     7023200
## 9              33629400              42922200     9292800
## 10             42922200              45501600     2579400
## 11             45501600              47181800     1680200
## 12             47181800              62751600    15569800
## 13             62751600              66362000     3610400
## 14             66362000              67766600     1404600
## 15             67766600              68339200      572600
## 16             68339200              78127000     9787800
## 17             78127000              79497400     1370400
## 18             79497400              86499800     7002400
## 19             86499800              89614400     3114600
## 20             89614400              91523400     1909000
## 21             91523400              97044400     5521000
## 22             97044400             104643600     7599200
## 23            104643600             109102000     4458400
## 24            109102000             111211000     2109000
## 
## [[8]]
##    left_boundary_region right_boundary_region region_size
## 1                267000               2576800     2309800
## 2               2576800               4655200     2078400
## 3               4655200              12210800     7555600
## 4              12210800              24834800    12624000
## 5              24834800              45501600    20666800
## 6              45501600              47181800     1680200
## 7              47181800              62751600    15569800
## 8              62751600              66362000     3610400
## 9              66362000              68339200     1977200
## 10             68339200              78127000     9787800
## 11             78127000              89614400    11487400
## 12             89614400              91523400     1909000
## 13             91523400              97044400     5521000
## 14             97044400             104643600     7599200
## 
## [[9]]
##   left_boundary_region right_boundary_region region_size
## 1               267000              45501600    45234600
## 2             45501600              47181800     1680200
## 3             47181800              66362000    19180200
## 4             66362000              68339200     1977200
## 5             68339200              78127000     9787800
## 6             78127000              89614400    11487400
## 
## [[10]]
##   left_boundary_region right_boundary_region region_size
## 1               267000              45501600    45234600
## 2             45501600              47181800     1680200
## 3             47181800              89614400    42432600
## 
## [[11]]
##   left_boundary_region right_boundary_region region_size
## 1               267000              47181800    46914800
## 2             47181800              89614400    42432600
region_size_summaries <- lapply(reports, function(df) summary(df$region_size))
region_size_summaries
## [[1]]
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##       0  790600 1370400 1372455 1901200 3002800 
## 
## [[2]]
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  188000 1118950 1632200 1658383 2167250 3400600 
## 
## [[3]]
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  188000 1245500 1790200 1895295 2510600 5156200 
## 
## [[4]]
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  202000 1412400 2093700 2487575 3131200 9610000 
## 
## [[5]]
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
##   355200  1590500  2264300  2759138  3355900 11400200 
## 
## [[6]]
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
##   572600  1901200  2790800  3738187  5042900 11400200 
## 
## [[7]]
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
##   572600  1905100  3362500  4622667  7007600 15569800 
## 
## [[8]]
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
##  1680200  2136250  6538300  7455471 11062500 20666800 
## 
## [[9]]
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
##  1680200  3929850 10637600 14891233 17257000 45234600 
## 
## [[10]]
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
##  1680200 22056400 42432600 29782467 43833600 45234600 
## 
## [[11]]
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
## 42432600 43553150 44673700 44673700 45794250 46914800