Read in Bismark alignments

file.list=list("/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt2/zr2096_1_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt2/zr2096_2_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt2/zr2096_3_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt2/zr2096_4_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt2/zr2096_5_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt2/zr2096_6_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt2/zr2096_7_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt2/zr2096_8_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt2/zr2096_9_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt2/zr2096_10_dedup.sorted.bam")

file.list2=list("/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt3/zr2096_1_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt3/zr2096_2_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt3/zr2096_3_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt3/zr2096_4_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt3/zr2096_5_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt3/zr2096_6_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt3/zr2096_7_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt3/zr2096_8_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt3/zr2096_9_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt3/zr2096_10_dedup.sorted.bam")


file.list3=list("/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt4/zr2096_1_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt4/zr2096_2_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt4/zr2096_3_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt4/zr2096_4_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt4/zr2096_5_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt4/zr2096_6_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt4/zr2096_7_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt4/zr2096_8_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt4/zr2096_9_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt4/zr2096_10_dedup.sorted.bam")


file.list4=list("/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt5/zr2096_1_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt5/zr2096_2_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt5/zr2096_3_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt5/zr2096_4_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt5/zr2096_5_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt5/zr2096_6_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt5/zr2096_7_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt5/zr2096_8_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt5/zr2096_9_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt5/zr2096_10_dedup.sorted.bam")


file.list5=list("/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt6/zr2096_1_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt6/zr2096_2_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt6/zr2096_3_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt6/zr2096_4_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt6/zr2096_5_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt6/zr2096_6_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt6/zr2096_7_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt6/zr2096_8_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt6/zr2096_9_dedup.sorted.bam",
               "/Volumes/web/metacarcinus/Cvirginica/Bismark_attempt6/zr2096_10_dedup.sorted.bam")

Read methylation calls from Bismark alignments

myobj <- processBismarkAln(location = file.list, sample.id = list("1","2","3","4","5","6","7","8","9","10"), 
                          assembly = "v3", read.context="CpG", mincov=3, treatment = c(0,0,0,0,0,1,1,1,1,1))
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 8472
## average conversion rate = 85.098248191209
## total otherC considered (Forward) (>95% C+T): 4443
## average conversion rate (Forward) = 85.331866600223
## total otherC considered (Reverse) (>95% C+T): 4029
## average conversion rate (Reverse) = 84.840624316488
## 
## Reading methylation percentage per base for sample: 1 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 28890
## average conversion rate = 95.13767350629
## total otherC considered (Forward) (>95% C+T): 14479
## average conversion rate (Forward) = 95.450457117656
## total otherC considered (Reverse) (>95% C+T): 14411
## average conversion rate (Reverse) = 94.823413988631
## 
## Reading methylation percentage per base for sample: 2 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 53572
## average conversion rate = 97.239665401605
## total otherC considered (Forward) (>95% C+T): 26892
## average conversion rate (Forward) = 97.396019519669
## total otherC considered (Reverse) (>95% C+T): 26680
## average conversion rate (Reverse) = 97.082068889499
## 
## Reading methylation percentage per base for sample: 3 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 28929
## average conversion rate = 97.178933218768
## total otherC considered (Forward) (>95% C+T): 14565
## average conversion rate (Forward) = 97.245052869922
## total otherC considered (Reverse) (>95% C+T): 14364
## average conversion rate (Reverse) = 97.111888334399
## 
## Reading methylation percentage per base for sample: 4 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 29738
## average conversion rate = 97.105311541008
## total otherC considered (Forward) (>95% C+T): 15217
## average conversion rate (Forward) = 97.227462476773
## total otherC considered (Reverse) (>95% C+T): 14521
## average conversion rate (Reverse) = 96.977305839643
## 
## Reading methylation percentage per base for sample: 5 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 31545
## average conversion rate = 97.249809836417
## total otherC considered (Forward) (>95% C+T): 15913
## average conversion rate (Forward) = 97.276180088159
## total otherC considered (Reverse) (>95% C+T): 15632
## average conversion rate (Reverse) = 97.222965554433
## 
## Reading methylation percentage per base for sample: 6 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 32083
## average conversion rate = 96.828393166697
## total otherC considered (Forward) (>95% C+T): 16004
## average conversion rate (Forward) = 97.248540565949
## total otherC considered (Reverse) (>95% C+T): 16079
## average conversion rate (Reverse) = 96.410205532042
## 
## Reading methylation percentage per base for sample: 7 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 24285
## average conversion rate = 96.200383196059
## total otherC considered (Forward) (>95% C+T): 12898
## average conversion rate (Forward) = 96.093353567574
## total otherC considered (Reverse) (>95% C+T): 11387
## average conversion rate (Reverse) = 96.321615140224
## 
## Reading methylation percentage per base for sample: 8 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 46048
## average conversion rate = 97.093875611919
## total otherC considered (Forward) (>95% C+T): 23707
## average conversion rate (Forward) = 97.090763091309
## total otherC considered (Reverse) (>95% C+T): 22341
## average conversion rate (Reverse) = 97.097178441968
## 
## Reading methylation percentage per base for sample: 9 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 43557
## average conversion rate = 97.252504740045
## total otherC considered (Forward) (>95% C+T): 21992
## average conversion rate (Forward) = 97.281477903285
## total otherC considered (Reverse) (>95% C+T): 21565
## average conversion rate (Reverse) = 97.222957890707
## 
## Reading methylation percentage per base for sample: 10
myobj2 <- processBismarkAln(location = file.list2, sample.id = list("1","2","3","4","5","6","7","8","9","10"), 
                            assembly = "v3", read.context="CpG", mincov=3, treatment = c(0,0,0,0,0,1,1,1,1,1))
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 2894
## average conversion rate = 97.719913120742
## total otherC considered (Forward) (>95% C+T): 1549
## average conversion rate (Forward) = 97.736020166621
## total otherC considered (Reverse) (>95% C+T): 1345
## average conversion rate (Reverse) = 97.70136307311
## 
## Reading methylation percentage per base for sample: 1 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 15169
## average conversion rate = 97.376996845147
## total otherC considered (Forward) (>95% C+T): 7483
## average conversion rate (Forward) = 97.328896863491
## total otherC considered (Reverse) (>95% C+T): 7686
## average conversion rate (Reverse) = 97.423826426558
## 
## Reading methylation percentage per base for sample: 2 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 29850
## average conversion rate = 97.763265877251
## total otherC considered (Forward) (>95% C+T): 15049
## average conversion rate (Forward) = 97.840125404246
## total otherC considered (Reverse) (>95% C+T): 14801
## average conversion rate (Reverse) = 97.685118520873
## 
## Reading methylation percentage per base for sample: 3 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 16031
## average conversion rate = 97.580085011405
## total otherC considered (Forward) (>95% C+T): 7882
## average conversion rate (Forward) = 97.587057103231
## total otherC considered (Reverse) (>95% C+T): 8149
## average conversion rate (Reverse) = 97.573341358468
## 
## Reading methylation percentage per base for sample: 4 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 15752
## average conversion rate = 97.70477323661
## total otherC considered (Forward) (>95% C+T): 8152
## average conversion rate (Forward) = 97.700466037071
## total otherC considered (Reverse) (>95% C+T): 7600
## average conversion rate (Reverse) = 97.709393274854
## 
## Reading methylation percentage per base for sample: 5 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 16861
## average conversion rate = 97.787211519938
## total otherC considered (Forward) (>95% C+T): 8595
## average conversion rate (Forward) = 97.754150025529
## total otherC considered (Reverse) (>95% C+T): 8266
## average conversion rate (Reverse) = 97.821588914621
## 
## Reading methylation percentage per base for sample: 6 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 16771
## average conversion rate = 97.362043028771
## total otherC considered (Forward) (>95% C+T): 8365
## average conversion rate (Forward) = 97.801788231458
## total otherC considered (Reverse) (>95% C+T): 8406
## average conversion rate (Reverse) = 96.924442669446
## 
## Reading methylation percentage per base for sample: 7 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 13479
## average conversion rate = 97.568783978755
## total otherC considered (Forward) (>95% C+T): 7012
## average conversion rate (Forward) = 97.585272803827
## total otherC considered (Reverse) (>95% C+T): 6467
## average conversion rate (Reverse) = 97.550905574332
## 
## Reading methylation percentage per base for sample: 8 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 24306
## average conversion rate = 97.462126498019
## total otherC considered (Forward) (>95% C+T): 12433
## average conversion rate (Forward) = 97.440906382166
## total otherC considered (Reverse) (>95% C+T): 11873
## average conversion rate (Reverse) = 97.48434747843
## 
## Reading methylation percentage per base for sample: 9 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 25056
## average conversion rate = 97.657380355406
## total otherC considered (Forward) (>95% C+T): 12472
## average conversion rate (Forward) = 97.809845543107
## total otherC considered (Reverse) (>95% C+T): 12584
## average conversion rate (Reverse) = 97.506272136954
## 
## Reading methylation percentage per base for sample: 10
myobj3 <- processBismarkAln(location = file.list3, sample.id = list("1","2","3","4","5","6","7","8","9","10"), 
                            assembly = "v3", read.context="CpG", mincov=3, treatment = c(0,0,0,0,0,1,1,1,1,1))
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 73072
## average conversion rate = 60.806748497465
## total otherC considered (Forward) (>95% C+T): 37065
## average conversion rate (Forward) = 60.708637461686
## total otherC considered (Reverse) (>95% C+T): 36007
## average conversion rate (Reverse) = 60.907742347027
## 
## Reading methylation percentage per base for sample: 1 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 54107
## average conversion rate = 82.708426563959
## total otherC considered (Forward) (>95% C+T): 27254
## average conversion rate (Forward) = 82.688923269279
## total otherC considered (Reverse) (>95% C+T): 26853
## average conversion rate (Reverse) = 82.728221104353
## 
## Reading methylation percentage per base for sample: 2 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 74469
## average conversion rate = 96.129256015826
## total otherC considered (Forward) (>95% C+T): 37543
## average conversion rate (Forward) = 96.272867589874
## total otherC considered (Reverse) (>95% C+T): 36926
## average conversion rate (Reverse) = 95.983244822508
## 
## Reading methylation percentage per base for sample: 3 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 42839
## average conversion rate = 92.422122567724
## total otherC considered (Forward) (>95% C+T): 21366
## average conversion rate (Forward) = 92.42817761649
## total otherC considered (Reverse) (>95% C+T): 21473
## average conversion rate (Reverse) = 92.416097691278
## 
## Reading methylation percentage per base for sample: 4 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 45025
## average conversion rate = 93.0445914743
## total otherC considered (Forward) (>95% C+T): 22752
## average conversion rate (Forward) = 92.93450954005
## total otherC considered (Reverse) (>95% C+T): 22273
## average conversion rate (Reverse) = 93.15704081512
## 
## Reading methylation percentage per base for sample: 5 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 44791
## average conversion rate = 95.542923288726
## total otherC considered (Forward) (>95% C+T): 22774
## average conversion rate (Forward) = 95.546743031473
## total otherC considered (Reverse) (>95% C+T): 22017
## average conversion rate (Reverse) = 95.538972213588
## 
## Reading methylation percentage per base for sample: 6 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 48440
## average conversion rate = 94.901017598817
## total otherC considered (Forward) (>95% C+T): 24358
## average conversion rate (Forward) = 95.195309615995
## total otherC considered (Reverse) (>95% C+T): 24082
## average conversion rate (Reverse) = 94.603352747293
## 
## Reading methylation percentage per base for sample: 7 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 46914
## average conversion rate = 83.823024903805
## total otherC considered (Forward) (>95% C+T): 24353
## average conversion rate (Forward) = 84.299860043955
## total otherC considered (Reverse) (>95% C+T): 22561
## average conversion rate (Reverse) = 83.308315176041
## 
## Reading methylation percentage per base for sample: 8 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 69080
## average conversion rate = 95.852680440487
## total otherC considered (Forward) (>95% C+T): 35804
## average conversion rate (Forward) = 95.850571315225
## total otherC considered (Reverse) (>95% C+T): 33276
## average conversion rate (Reverse) = 95.854949797407
## 
## Reading methylation percentage per base for sample: 9 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 60129
## average conversion rate = 96.190525827281
## total otherC considered (Forward) (>95% C+T): 30208
## average conversion rate (Forward) = 96.337261427844
## total otherC considered (Reverse) (>95% C+T): 29921
## average conversion rate (Reverse) = 96.042382749783
## 
## Reading methylation percentage per base for sample: 10
myobj4 <- processBismarkAln(location = file.list4, sample.id = list("1","2","3","4","5","6","7","8","9","10"), 
                            assembly = "v3", read.context="CpG", mincov=3, treatment = c(0,0,0,0,0,1,1,1,1,1))
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 7068
## average conversion rate = 89.927679484819
## total otherC considered (Forward) (>95% C+T): 3633
## average conversion rate (Forward) = 90.743992709815
## total otherC considered (Reverse) (>95% C+T): 3435
## average conversion rate (Reverse) = 89.064312397073
## 
## Reading methylation percentage per base for sample: 1 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 25154
## average conversion rate = 96.326667201053
## total otherC considered (Forward) (>95% C+T): 12566
## average conversion rate (Forward) = 96.433191220579
## total otherC considered (Reverse) (>95% C+T): 12588
## average conversion rate (Reverse) = 96.220329353153
## 
## Reading methylation percentage per base for sample: 2 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 49927
## average conversion rate = 97.2646244777
## total otherC considered (Forward) (>95% C+T): 25207
## average conversion rate (Forward) = 97.454965119307
## total otherC considered (Reverse) (>95% C+T): 24720
## average conversion rate (Reverse) = 97.070534002255
## 
## Reading methylation percentage per base for sample: 3 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 26039
## average conversion rate = 97.001591064591
## total otherC considered (Forward) (>95% C+T): 13135
## average conversion rate (Forward) = 97.140994766553
## total otherC considered (Reverse) (>95% C+T): 12904
## average conversion rate (Reverse) = 96.859691837585
## 
## Reading methylation percentage per base for sample: 4 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 27724
## average conversion rate = 97.099173545438
## total otherC considered (Forward) (>95% C+T): 14143
## average conversion rate (Forward) = 97.200472237858
## total otherC considered (Reverse) (>95% C+T): 13581
## average conversion rate (Reverse) = 96.993682977226
## 
## Reading methylation percentage per base for sample: 5 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 28864
## average conversion rate = 97.026595597636
## total otherC considered (Forward) (>95% C+T): 14655
## average conversion rate (Forward) = 97.022467856792
## total otherC considered (Reverse) (>95% C+T): 14209
## average conversion rate (Reverse) = 97.030852902308
## 
## Reading methylation percentage per base for sample: 6 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 30108
## average conversion rate = 96.715845891902
## total otherC considered (Forward) (>95% C+T): 15003
## average conversion rate (Forward) = 97.17552409682
## total otherC considered (Reverse) (>95% C+T): 15105
## average conversion rate (Reverse) = 96.259271770195
## 
## Reading methylation percentage per base for sample: 7 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 22550
## average conversion rate = 96.503289147413
## total otherC considered (Forward) (>95% C+T): 12049
## average conversion rate (Forward) = 96.576800335618
## total otherC considered (Reverse) (>95% C+T): 10501
## average conversion rate (Reverse) = 96.418941341806
## 
## Reading methylation percentage per base for sample: 8 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 42542
## average conversion rate = 97.063233036838
## total otherC considered (Forward) (>95% C+T): 21871
## average conversion rate (Forward) = 97.117176288092
## total otherC considered (Reverse) (>95% C+T): 20671
## average conversion rate (Reverse) = 97.006158253413
## 
## Reading methylation percentage per base for sample: 9 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 40881
## average conversion rate = 97.241749763193
## total otherC considered (Forward) (>95% C+T): 20607
## average conversion rate (Forward) = 97.308786477109
## total otherC considered (Reverse) (>95% C+T): 20274
## average conversion rate (Reverse) = 97.173611972739
## 
## Reading methylation percentage per base for sample: 10
myobj5 <- processBismarkAln(location = file.list5, sample.id = list("1","2","3","4","5","6","7","8","9","10"), 
                            assembly = "v3", read.context="CpG", mincov=3, treatment = c(0,0,0,0,0,1,1,1,1,1))
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 701
## average conversion rate = 86.277426805244
## total otherC considered (Forward) (>95% C+T): 208
## average conversion rate (Forward) = 92.251602564103
## total otherC considered (Reverse) (>95% C+T): 493
## average conversion rate (Reverse) = 83.75688206317
## 
## Reading methylation percentage per base for sample: 1 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 2068
## average conversion rate = 92.093930811291
## total otherC considered (Forward) (>95% C+T): 965
## average conversion rate (Forward) = 96.979738166267
## total otherC considered (Reverse) (>95% C+T): 1103
## average conversion rate (Reverse) = 87.81940307099
## 
## Reading methylation percentage per base for sample: 2 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 5309
## average conversion rate = 95.879084246094
## total otherC considered (Forward) (>95% C+T): 2661
## average conversion rate (Forward) = 97.551333275685
## total otherC considered (Reverse) (>95% C+T): 2648
## average conversion rate (Reverse) = 94.198625534712
## 
## Reading methylation percentage per base for sample: 3 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 2213
## average conversion rate = 95.352262212859
## total otherC considered (Forward) (>95% C+T): 1148
## average conversion rate (Forward) = 94.2636921731
## total otherC considered (Reverse) (>95% C+T): 1065
## average conversion rate (Reverse) = 96.525669166514
## 
## Reading methylation percentage per base for sample: 4 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 2180
## average conversion rate = 95.391437308869
## total otherC considered (Forward) (>95% C+T): 1113
## average conversion rate (Forward) = 97.565139263252
## total otherC considered (Reverse) (>95% C+T): 1067
## average conversion rate (Reverse) = 93.124023742581
## 
## Reading methylation percentage per base for sample: 5 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 2466
## average conversion rate = 93.098648107772
## total otherC considered (Forward) (>95% C+T): 1075
## average conversion rate (Forward) = 91.42015503876
## total otherC considered (Reverse) (>95% C+T): 1391
## average conversion rate (Reverse) = 94.395830026671
## 
## Reading methylation percentage per base for sample: 6 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 2810
## average conversion rate = 93.988990941838
## total otherC considered (Forward) (>95% C+T): 1315
## average conversion rate (Forward) = 95.624906567872
## total otherC considered (Reverse) (>95% C+T): 1495
## average conversion rate (Reverse) = 92.550041745694
## 
## Reading methylation percentage per base for sample: 7 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 2239
## average conversion rate = 94.651628580838
## total otherC considered (Forward) (>95% C+T): 1313
## average conversion rate (Forward) = 94.112172206232
## total otherC considered (Reverse) (>95% C+T): 926
## average conversion rate (Reverse) = 95.416538105523
## 
## Reading methylation percentage per base for sample: 8 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 3718
## average conversion rate = 95.618416550081
## total otherC considered (Forward) (>95% C+T): 1623
## average conversion rate (Forward) = 96.768566778081
## total otherC considered (Reverse) (>95% C+T): 2095
## average conversion rate (Reverse) = 94.727393246957
## 
## Reading methylation percentage per base for sample: 9 
## 
## Conversion Statistics:
## 
## total otherC considered (>95% C+T): 3260
## average conversion rate = 96.772041183084
## total otherC considered (Forward) (>95% C+T): 1671
## average conversion rate (Forward) = 97.459484129143
## total otherC considered (Reverse) (>95% C+T): 1589
## average conversion rate (Reverse) = 96.04912289305
## 
## Reading methylation percentage per base for sample: 10

calculate region coverage

tiles <- tileMethylCounts(myobj,win.size=1000,step.size=1000)
tiles2 <- tileMethylCounts(myobj2,win.size=1000,step.size=1000)
tiles3 <- tileMethylCounts(myobj3,win.size=1000,step.size=1000)
tiles4 <- tileMethylCounts(myobj4,win.size=1000,step.size=1000)
tiles5 <- tileMethylCounts(myobj5,win.size=1000,step.size=1000)

find regions covered by all samples for each analysis

mmeth <- unite(tiles, min.per.group = 1L)
mmeth2 <- unite(tiles2, min.per.group = 1L)
mmeth3 <- unite(tiles3, min.per.group = 1L)
mmeth4 <- unite(tiles4, min.per.group = 1L)
mmeth5 <- unite(tiles5, min.per.group = 1L)

make data frames for each analysis with chromosome positions, region start site (bp), and region end site (bp)

RegionsCovered <- getData(mmeth)[,1:3]
RegionsCovered2 <- getData(mmeth2)[,1:3]
RegionsCovered3 <- getData(mmeth3)[,1:3]
RegionsCovered4 <- getData(mmeth4)[,1:3]
RegionsCovered5 <- getData(mmeth5)[,1:3]

calculate sum of total coverage across all samples for each analysis

RegionsCovered$cov_sum <- rowSums(getData(mmeth)[,grep("coverage", colnames(getData(mmeth)))], na.rm = TRUE)
RegionsCovered2$cov_sum <- rowSums(getData(mmeth2)[,grep("coverage", colnames(getData(mmeth2)))], na.rm = TRUE)
RegionsCovered3$cov_sum <- rowSums(getData(mmeth3)[,grep("coverage", colnames(getData(mmeth3)))], na.rm = TRUE)
RegionsCovered4$cov_sum <- rowSums(getData(mmeth4)[,grep("coverage", colnames(getData(mmeth4)))], na.rm = TRUE)
RegionsCovered5$cov_sum <- rowSums(getData(mmeth5)[,grep("coverage", colnames(getData(mmeth5)))], na.rm = TRUE)

create a column with analysis name (AS = alignment score parameter(1.2=0,-1.2;0.6 = 0,-0.6; 2 = 0,-2), I = minimum insert size (bp))

RegionsCovered$par <- "AS1.2"
RegionsCovered2$par <- "AS0.6"
RegionsCovered3$par <- "AS2"
RegionsCovered4$par <- "AS1.2I60"
RegionsCovered5$par <- "AS1.2I150"

create a table with total coverage in all analyses for plotting

allRegionsCovered <- rbind(RegionsCovered,RegionsCovered2, RegionsCovered3, RegionsCovered4, RegionsCovered5)

plot the read coverage across all chromosome positions

plot the log10 read coverage across all chromosome positions

plot % methylation per region

getMethylationStats(tiles[[1]],plot = TRUE, both.strands = FALSE)

getMethylationStats(tiles[[2]],plot = TRUE, both.strands = FALSE)

getMethylationStats(tiles[[3]],plot = TRUE, both.strands = FALSE)

getMethylationStats(tiles[[4]],plot = TRUE, both.strands = FALSE)

getMethylationStats(tiles[[5]],plot = TRUE, both.strands = FALSE)

getMethylationStats(tiles[[6]],plot = TRUE, both.strands = FALSE)

getMethylationStats(tiles[[7]],plot = TRUE, both.strands = FALSE)

getMethylationStats(tiles[[8]],plot = TRUE, both.strands = FALSE)

getMethylationStats(tiles[[9]],plot = TRUE, both.strands = FALSE)

getMethylationStats(tiles[[10]],plot = TRUE, both.strands = FALSE)

plot read coverage per region

getCoverageStats(tiles[[1]],plot = TRUE, both.strands = FALSE)

getCoverageStats(tiles[[2]],plot = TRUE, both.strands = FALSE)

getCoverageStats(tiles[[3]],plot = TRUE, both.strands = FALSE)

getCoverageStats(tiles[[4]],plot = TRUE, both.strands = FALSE)

getCoverageStats(tiles[[5]],plot = TRUE, both.strands = FALSE)

getCoverageStats(tiles[[6]],plot = TRUE, both.strands = FALSE)

getCoverageStats(tiles[[7]],plot = TRUE, both.strands = FALSE)

getCoverageStats(tiles[[8]],plot = TRUE, both.strands = FALSE)

getCoverageStats(tiles[[9]],plot = TRUE, both.strands = FALSE)

getCoverageStats(tiles[[10]],plot = TRUE, both.strands = FALSE)