Downloading Files

In [16]:
lwd="/Volumes/Bay3\ scratch/BiGo_manny"
In [17]:
cd {lwd}
/Volumes/Bay3 scratch/BiGo_manny

In []:
#quality trimmed fastq files
!wget http://eagle.fish.washington.edu/trilobite/Crassostrea_gigas_HTSdata/BiGo_larvae_cc/BiGo_lar_fastq.tgz
In [3]:
ls
BiGo_lar_fastq.tgz

In [5]:
!tar xvzf BiGo_lar_fastq.tgz
x CgM1_R1a.fastq
x CgM1_R2a.fastq
x CgM3_R1a.fastq
x CgM3_R2a.fastq
x CgT1D3_R1a.fastq
x CgT1D3_R2a.fastq
x CgT1D5_R1a.fastq
x CgT1D5_R2a.fastq
x CgT3D3_R1a.fastq
x CgT3D3_R2a.fastq
x CgT3D5_R1a.fastq
x CgT3D5_R2a.fastq

In [6]:
#oyster genome 
!wget http://eagle.fish.washington.edu/trilobite/Crassostrea_gigas_ensembl_tracks/Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa
--2014-07-08 10:20:04--  http://eagle.fish.washington.edu/trilobite/Crassostrea_gigas_ensembl_tracks/Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa
Resolving eagle.fish.washington.edu... 128.95.149.81
Connecting to eagle.fish.washington.edu|128.95.149.81|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 567608307 (541M) [text/plain]
Saving to: `Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa'

100%[======================================>] 567,608,307 10.7M/s   in 51s     

2014-07-08 10:20:56 (10.5 MB/s) - `Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa' saved [567608307/567608307]


Running BSMAP

In [7]:
#setting some variables for files but also  

#location of BSMAP (if not in PATH)
bsmaploc="/Volumes/Bay3/Software/BSMAP/bsmap-2.74/"

Another option is running BSMAP on iPlant

In [10]:
lib="CgM1"
In [13]:
! {bsmaploc}bsmap \
-a {lib}_R1a.fastq \
-b {lib}_R2a.fastq \
-d Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa \
-o bsmap_out_{lib}.sam \
-p 2

BSMAP v2.74
Start at:  Tue Jul  8 10:32:57 2014

Input reference file: Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa 	(format: FASTA)
Load in 7658 db seqs, total size 557717710 bp. 13 secs passed
total_kmers: 43046721
Create seed table. 56 secs passed
max number of mismatches: read_length * 8% 	max gap size: 0
kmer cut-off ratio: 5e-07
max multi-hits: 100	max Ns: 5	seed size: 16	index interval: 4
quality cutoff: 0	base quality char: '!'
min fragment size:28	max fragemt size:500
start from read #1	end at read #4294967295
additional alignment: T in reads => C in reference
mapping strand (read_1): ++,-+
mapping strand (read_2): +-,--
Pair-end alignment(2 threads)
Input read file #1: CgM1_R1a.fastq 	(format: FASTQ)
Input read file #2: CgM1_R2a.fastq 	(format: FASTQ)
Output file: bsmap_out_CgM1.sam	 (format: SAM)
Thread #1: 	50000 read pairs finished. 79 secs passed
Thread #0: 	100000 read pairs finished. 80 secs passed
Thread #1: 	150000 read pairs finished. 103 secs passed
Thread #0: 	200000 read pairs finished. 104 secs passed
Thread #1: 	250000 read pairs finished. 126 secs passed
Thread #0: 	300000 read pairs finished. 127 secs passed
Thread #1: 	350000 read pairs finished. 151 secs passed
Thread #0: 	400000 read pairs finished. 152 secs passed
Thread #1: 	450000 read pairs finished. 174 secs passed
Thread #0: 	500000 read pairs finished. 175 secs passed
Thread #1: 	550000 read pairs finished. 202 secs passed
Thread #0: 	600000 read pairs finished. 204 secs passed
Thread #1: 	650000 read pairs finished. 228 secs passed
Thread #0: 	700000 read pairs finished. 230 secs passed
Thread #1: 	750000 read pairs finished. 260 secs passed
Thread #0: 	800000 read pairs finished. 262 secs passed
Thread #1: 	850000 read pairs finished. 295 secs passed
Thread #0: 	900000 read pairs finished. 296 secs passed
Thread #1: 	950000 read pairs finished. 323 secs passed
Thread #0: 	1000000 read pairs finished. 325 secs passed
Thread #1: 	1050000 read pairs finished. 407 secs passed
Thread #0: 	1100000 read pairs finished. 421 secs passed
Thread #1: 	1150000 read pairs finished. 444 secs passed
Thread #0: 	1200000 read pairs finished. 444 secs passed
Thread #1: 	1250000 read pairs finished. 465 secs passed
Thread #0: 	1300000 read pairs finished. 466 secs passed
Thread #1: 	1350000 read pairs finished. 486 secs passed
Thread #0: 	1400000 read pairs finished. 487 secs passed
Thread #1: 	1450000 read pairs finished. 507 secs passed
Thread #0: 	1500000 read pairs finished. 508 secs passed
Thread #1: 	1550000 read pairs finished. 529 secs passed
Thread #0: 	1600000 read pairs finished. 530 secs passed
Thread #1: 	1650000 read pairs finished. 550 secs passed
Thread #0: 	1700000 read pairs finished. 551 secs passed
Thread #1: 	1750000 read pairs finished. 571 secs passed
Thread #0: 	1800000 read pairs finished. 572 secs passed
Thread #1: 	1850000 read pairs finished. 592 secs passed
Thread #0: 	1900000 read pairs finished. 593 secs passed
Thread #1: 	1950000 read pairs finished. 613 secs passed
Thread #0: 	2000000 read pairs finished. 614 secs passed
Thread #1: 	2050000 read pairs finished. 635 secs passed
Thread #0: 	2100000 read pairs finished. 635 secs passed
Thread #1: 	2150000 read pairs finished. 656 secs passed
Thread #0: 	2200000 read pairs finished. 657 secs passed
Thread #1: 	2250000 read pairs finished. 678 secs passed
Thread #0: 	2300000 read pairs finished. 678 secs passed
Thread #1: 	2350000 read pairs finished. 699 secs passed
Thread #0: 	2400000 read pairs finished. 700 secs passed
Thread #1: 	2450000 read pairs finished. 721 secs passed
Thread #0: 	2500000 read pairs finished. 721 secs passed
Thread #1: 	2550000 read pairs finished. 744 secs passed
Thread #0: 	2600000 read pairs finished. 746 secs passed
Thread #1: 	2650000 read pairs finished. 766 secs passed
Thread #0: 	2700000 read pairs finished. 767 secs passed
Thread #1: 	2750000 read pairs finished. 788 secs passed
Thread #0: 	2800000 read pairs finished. 789 secs passed
Thread #1: 	2850000 read pairs finished. 810 secs passed
Thread #0: 	2900000 read pairs finished. 811 secs passed
Thread #1: 	2950000 read pairs finished. 831 secs passed
Thread #0: 	3000000 read pairs finished. 832 secs passed
Thread #1: 	3050000 read pairs finished. 852 secs passed
Thread #0: 	3100000 read pairs finished. 853 secs passed
Thread #1: 	3150000 read pairs finished. 873 secs passed
Thread #0: 	3200000 read pairs finished. 874 secs passed
Thread #1: 	3250000 read pairs finished. 895 secs passed
Thread #0: 	3300000 read pairs finished. 895 secs passed
Thread #1: 	3350000 read pairs finished. 916 secs passed
Thread #0: 	3400000 read pairs finished. 917 secs passed
Thread #1: 	3450000 read pairs finished. 937 secs passed
Thread #0: 	3500000 read pairs finished. 937 secs passed
Thread #1: 	3550000 read pairs finished. 958 secs passed
Thread #0: 	3600000 read pairs finished. 958 secs passed
Thread #1: 	3650000 read pairs finished. 979 secs passed
Thread #0: 	3700000 read pairs finished. 981 secs passed
Thread #1: 	3750000 read pairs finished. 1002 secs passed
Thread #0: 	3800000 read pairs finished. 1003 secs passed
Thread #1: 	3850000 read pairs finished. 1024 secs passed
Thread #0: 	3900000 read pairs finished. 1025 secs passed
Thread #1: 	3950000 read pairs finished. 1045 secs passed
Thread #0: 	4000000 read pairs finished. 1046 secs passed
Thread #1: 	4050000 read pairs finished. 1067 secs passed
Thread #0: 	4100000 read pairs finished. 1068 secs passed
Thread #1: 	4150000 read pairs finished. 1090 secs passed
Thread #0: 	4200000 read pairs finished. 1090 secs passed
Thread #1: 	4250000 read pairs finished. 1112 secs passed
Thread #0: 	4300000 read pairs finished. 1113 secs passed
Thread #1: 	4350000 read pairs finished. 1134 secs passed
Thread #0: 	4400000 read pairs finished. 1135 secs passed
Thread #1: 	4450000 read pairs finished. 1156 secs passed
Thread #0: 	4500000 read pairs finished. 1156 secs passed
Thread #1: 	4550000 read pairs finished. 1177 secs passed
Thread #0: 	4600000 read pairs finished. 1178 secs passed
Thread #1: 	4650000 read pairs finished. 1198 secs passed
Thread #0: 	4700000 read pairs finished. 1199 secs passed
Thread #1: 	4750000 read pairs finished. 1219 secs passed
Thread #0: 	4800000 read pairs finished. 1219 secs passed
Thread #1: 	4850000 read pairs finished. 1240 secs passed
Thread #0: 	4900000 read pairs finished. 1241 secs passed
Thread #1: 	4950000 read pairs finished. 1261 secs passed
Thread #0: 	5000000 read pairs finished. 1262 secs passed
Thread #1: 	5050000 read pairs finished. 1285 secs passed
Thread #0: 	5100000 read pairs finished. 1286 secs passed
Thread #1: 	5150000 read pairs finished. 1312 secs passed
Thread #0: 	5200000 read pairs finished. 1313 secs passed
Thread #1: 	5250000 read pairs finished. 1335 secs passed
Thread #0: 	5300000 read pairs finished. 1335 secs passed
Thread #1: 	5350000 read pairs finished. 1359 secs passed
Thread #0: 	5400000 read pairs finished. 1359 secs passed
Thread #1: 	5450000 read pairs finished. 1380 secs passed
Thread #0: 	5500000 read pairs finished. 1380 secs passed
Thread #1: 	5550000 read pairs finished. 1402 secs passed
Thread #0: 	5600000 read pairs finished. 1402 secs passed
Thread #1: 	5650000 read pairs finished. 1423 secs passed
Thread #0: 	5700000 read pairs finished. 1424 secs passed
Thread #1: 	5750000 read pairs finished. 1446 secs passed
Thread #0: 	5800000 read pairs finished. 1447 secs passed
Thread #1: 	5850000 read pairs finished. 1468 secs passed
Thread #0: 	5900000 read pairs finished. 1469 secs passed
Thread #1: 	5950000 read pairs finished. 1490 secs passed
Thread #0: 	6000000 read pairs finished. 1491 secs passed
Thread #1: 	6050000 read pairs finished. 1511 secs passed
Thread #0: 	6100000 read pairs finished. 1512 secs passed
Thread #1: 	6150000 read pairs finished. 1533 secs passed
Thread #0: 	6200000 read pairs finished. 1534 secs passed
Thread #1: 	6250000 read pairs finished. 1555 secs passed
Thread #0: 	6300000 read pairs finished. 1556 secs passed
Thread #1: 	6350000 read pairs finished. 1576 secs passed
Thread #0: 	6400000 read pairs finished. 1578 secs passed
Thread #1: 	6450000 read pairs finished. 1598 secs passed
Thread #0: 	6500000 read pairs finished. 1599 secs passed
Thread #1: 	6550000 read pairs finished. 1624 secs passed
Thread #0: 	6600000 read pairs finished. 1625 secs passed
Thread #1: 	6650000 read pairs finished. 1645 secs passed
Thread #0: 	6700000 read pairs finished. 1646 secs passed
Thread #1: 	6750000 read pairs finished. 1666 secs passed
Thread #0: 	6800000 read pairs finished. 1667 secs passed
Thread #1: 	6850000 read pairs finished. 1687 secs passed
Thread #0: 	6900000 read pairs finished. 1689 secs passed
Thread #1: 	6950000 read pairs finished. 1709 secs passed
Thread #0: 	7000000 read pairs finished. 1710 secs passed
Thread #1: 	7050000 read pairs finished. 1730 secs passed
Thread #0: 	7100000 read pairs finished. 1731 secs passed
Thread #1: 	7150000 read pairs finished. 1751 secs passed
Thread #0: 	7200000 read pairs finished. 1752 secs passed
Thread #1: 	7250000 read pairs finished. 1773 secs passed
Thread #0: 	7300000 read pairs finished. 1774 secs passed
Thread #1: 	7350000 read pairs finished. 1795 secs passed
Thread #0: 	7400000 read pairs finished. 1795 secs passed
Thread #1: 	7450000 read pairs finished. 1816 secs passed
Thread #0: 	7500000 read pairs finished. 1817 secs passed
Thread #1: 	7550000 read pairs finished. 1837 secs passed
Thread #0: 	7600000 read pairs finished. 1838 secs passed
Thread #1: 	7650000 read pairs finished. 1859 secs passed
Thread #0: 	7700000 read pairs finished. 1859 secs passed
Thread #1: 	7750000 read pairs finished. 1880 secs passed
Thread #0: 	7800000 read pairs finished. 1881 secs passed
Thread #1: 	7850000 read pairs finished. 1901 secs passed
Thread #0: 	7900000 read pairs finished. 1902 secs passed
Thread #1: 	7950000 read pairs finished. 1923 secs passed
Thread #0: 	8000000 read pairs finished. 1924 secs passed
Thread #1: 	8050000 read pairs finished. 1944 secs passed
Thread #0: 	8100000 read pairs finished. 1945 secs passed
Thread #1: 	8150000 read pairs finished. 1965 secs passed
Thread #0: 	8200000 read pairs finished. 1966 secs passed
Thread #0: 	8297202 read pairs finished. 1986 secs passed
Thread #1: 	8250000 read pairs finished. 1987 secs passed
Total number of aligned reads: 
pairs:       3832546 (46%)
single a:    1591687 (19%)
single b:    1349271 (16%)
Done.
Finished at Tue Jul  8 11:06:04 2014
Total time consumed:  1987 secs

In [16]:
lib="CgT1D3"
In [17]:
! {bsmaploc}bsmap \
-a {lib}_R1a.fastq \
-b {lib}_R2a.fastq \
-d Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa \
-o bsmap_out_{lib}.sam \
-p 2 \
;

BSMAP v2.74
Start at:  Tue Jul  8 11:56:33 2014

Input reference file: Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa 	(format: FASTA)
Load in 7658 db seqs, total size 557717710 bp. 13 secs passed
total_kmers: 43046721
Create seed table. 69 secs passed
max number of mismatches: read_length * 8% 	max gap size: 0
kmer cut-off ratio: 5e-07
max multi-hits: 100	max Ns: 5	seed size: 16	index interval: 4
quality cutoff: 0	base quality char: '!'
min fragment size:28	max fragemt size:500
start from read #1	end at read #4294967295
additional alignment: T in reads => C in reference
mapping strand (read_1): ++,-+
mapping strand (read_2): +-,--
Pair-end alignment(2 threads)
Input read file #1: CgT1D3_R1a.fastq 	(format: FASTQ)
Input read file #2: CgT1D3_R2a.fastq 	(format: FASTQ)
Output file: bsmap_out_CgT1D3.sam	 (format: SAM)
Thread #1: 	100000 read pairs finished. 104 secs passed
Thread #0: 	50000 read pairs finished. 106 secs passed
Thread #1: 	150000 read pairs finished. 139 secs passed
Thread #0: 	200000 read pairs finished. 139 secs passed
Thread #1: 	250000 read pairs finished. 160 secs passed
Thread #0: 	300000 read pairs finished. 161 secs passed
Thread #1: 	350000 read pairs finished. 182 secs passed
Thread #0: 	400000 read pairs finished. 182 secs passed
Thread #1: 	450000 read pairs finished. 203 secs passed
Thread #0: 	500000 read pairs finished. 203 secs passed
Thread #1: 	550000 read pairs finished. 226 secs passed
Thread #0: 	600000 read pairs finished. 229 secs passed
Thread #1: 	650000 read pairs finished. 252 secs passed
Thread #0: 	700000 read pairs finished. 256 secs passed
Thread #1: 	750000 read pairs finished. 276 secs passed
Thread #0: 	800000 read pairs finished. 278 secs passed
Thread #1: 	850000 read pairs finished. 301 secs passed
Thread #0: 	900000 read pairs finished. 302 secs passed
Thread #1: 	950000 read pairs finished. 323 secs passed
Thread #0: 	1000000 read pairs finished. 324 secs passed
Thread #1: 	1050000 read pairs finished. 345 secs passed
Thread #0: 	1100000 read pairs finished. 346 secs passed
Thread #1: 	1150000 read pairs finished. 374 secs passed
Thread #0: 	1200000 read pairs finished. 375 secs passed
Thread #1: 	1250000 read pairs finished. 407 secs passed
Thread #0: 	1300000 read pairs finished. 408 secs passed
Thread #1: 	1350000 read pairs finished. 440 secs passed
Thread #0: 	1400000 read pairs finished. 440 secs passed
Thread #1: 	1450000 read pairs finished. 462 secs passed
Thread #0: 	1500000 read pairs finished. 463 secs passed
Thread #1: 	1550000 read pairs finished. 487 secs passed
Thread #0: 	1600000 read pairs finished. 488 secs passed
Thread #1: 	1650000 read pairs finished. 515 secs passed
Thread #0: 	1700000 read pairs finished. 516 secs passed
Thread #1: 	1750000 read pairs finished. 544 secs passed
Thread #0: 	1800000 read pairs finished. 544 secs passed
Thread #1: 	1850000 read pairs finished. 578 secs passed
Thread #0: 	1900000 read pairs finished. 578 secs passed
Thread #1: 	1950000 read pairs finished. 601 secs passed
Thread #0: 	2000000 read pairs finished. 602 secs passed
Thread #1: 	2050000 read pairs finished. 630 secs passed
Thread #0: 	2100000 read pairs finished. 631 secs passed
Thread #1: 	2150000 read pairs finished. 658 secs passed
Thread #0: 	2200000 read pairs finished. 660 secs passed
Thread #1: 	2250000 read pairs finished. 682 secs passed
Thread #0: 	2300000 read pairs finished. 684 secs passed
Thread #1: 	2350000 read pairs finished. 707 secs passed
Thread #0: 	2400000 read pairs finished. 707 secs passed
Thread #1: 	2450000 read pairs finished. 731 secs passed
Thread #0: 	2500000 read pairs finished. 732 secs passed
Thread #1: 	2550000 read pairs finished. 766 secs passed
Thread #0: 	2600000 read pairs finished. 767 secs passed
Thread #1: 	2650000 read pairs finished. 793 secs passed
Thread #0: 	2700000 read pairs finished. 794 secs passed
Thread #1: 	2750000 read pairs finished. 818 secs passed
Thread #0: 	2800000 read pairs finished. 819 secs passed
Thread #1: 	2850000 read pairs finished. 841 secs passed
Thread #0: 	2900000 read pairs finished. 842 secs passed
Thread #1: 	2950000 read pairs finished. 862 secs passed
Thread #0: 	3000000 read pairs finished. 863 secs passed
Thread #1: 	3050000 read pairs finished. 887 secs passed
Thread #0: 	3100000 read pairs finished. 887 secs passed
Thread #1: 	3150000 read pairs finished. 909 secs passed
Thread #0: 	3200000 read pairs finished. 910 secs passed
Thread #1: 	3250000 read pairs finished. 930 secs passed
Thread #0: 	3300000 read pairs finished. 931 secs passed
Thread #1: 	3350000 read pairs finished. 952 secs passed
Thread #0: 	3400000 read pairs finished. 953 secs passed
Thread #1: 	3450000 read pairs finished. 982 secs passed
Thread #0: 	3500000 read pairs finished. 986 secs passed
Thread #1: 	3550000 read pairs finished. 1015 secs passed
Thread #0: 	3600000 read pairs finished. 1017 secs passed
Thread #1: 	3650000 read pairs finished. 1041 secs passed
Thread #0: 	3700000 read pairs finished. 1042 secs passed
Thread #1: 	3750000 read pairs finished. 1063 secs passed
Thread #0: 	3800000 read pairs finished. 1065 secs passed
Thread #1: 	3850000 read pairs finished. 1086 secs passed
Thread #0: 	3900000 read pairs finished. 1087 secs passed
Thread #1: 	3950000 read pairs finished. 1108 secs passed
Thread #0: 	4000000 read pairs finished. 1109 secs passed
Thread #1: 	4050000 read pairs finished. 1130 secs passed
Thread #0: 	4100000 read pairs finished. 1131 secs passed
Thread #1: 	4150000 read pairs finished. 1152 secs passed
Thread #0: 	4200000 read pairs finished. 1153 secs passed
Thread #1: 	4250000 read pairs finished. 1174 secs passed
Thread #0: 	4300000 read pairs finished. 1175 secs passed
Thread #1: 	4350000 read pairs finished. 1196 secs passed
Thread #0: 	4400000 read pairs finished. 1197 secs passed
Thread #1: 	4450000 read pairs finished. 1217 secs passed
Thread #0: 	4500000 read pairs finished. 1218 secs passed
Thread #1: 	4550000 read pairs finished. 1239 secs passed
Thread #0: 	4600000 read pairs finished. 1239 secs passed
Thread #1: 	4650000 read pairs finished. 1261 secs passed
Thread #0: 	4700000 read pairs finished. 1261 secs passed
Thread #1: 	4750000 read pairs finished. 1287 secs passed
Thread #0: 	4800000 read pairs finished. 1287 secs passed
Thread #1: 	4850000 read pairs finished. 1315 secs passed
Thread #0: 	4900000 read pairs finished. 1316 secs passed
Thread #1: 	4950000 read pairs finished. 1337 secs passed
Thread #0: 	5000000 read pairs finished. 1339 secs passed
Thread #1: 	5050000 read pairs finished. 1360 secs passed
Thread #0: 	5100000 read pairs finished. 1361 secs passed
Thread #1: 	5150000 read pairs finished. 1382 secs passed
Thread #0: 	5200000 read pairs finished. 1383 secs passed
Thread #1: 	5250000 read pairs finished. 1405 secs passed
Thread #0: 	5300000 read pairs finished. 1405 secs passed
Thread #1: 	5350000 read pairs finished. 1426 secs passed
Thread #0: 	5400000 read pairs finished. 1427 secs passed
Thread #0: 	5465974 read pairs finished. 1434 secs passed
Thread #1: 	5450000 read pairs finished. 1448 secs passed
Total number of aligned reads: 
pairs:       2625402 (48%)
single a:    1124227 (21%)
single b:    885757 (16%)
Done.
Finished at Tue Jul  8 12:20:41 2014
Total time consumed:  1448 secs

In [19]:
lib="CgT1D5"
In [20]:
! {bsmaploc}bsmap \
-a {lib}_R1a.fastq \
-b {lib}_R2a.fastq \
-d Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa \
-o bsmap_out_{lib}.sam \
-p 4 ; \

BSMAP v2.74
Start at:  Tue Jul  8 12:26:49 2014

Input reference file: Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa 	(format: FASTA)
Load in 7658 db seqs, total size 557717710 bp. 13 secs passed
total_kmers: 43046721
Create seed table. 56 secs passed
max number of mismatches: read_length * 8% 	max gap size: 0
kmer cut-off ratio: 5e-07
max multi-hits: 100	max Ns: 5	seed size: 16	index interval: 4
quality cutoff: 0	base quality char: '!'
min fragment size:28	max fragemt size:500
start from read #1	end at read #4294967295
additional alignment: T in reads => C in reference
mapping strand (read_1): ++,-+
mapping strand (read_2): +-,--
Pair-end alignment(4 threads)
Input read file #1: CgT1D5_R1a.fastq 	(format: FASTQ)
Input read file #2: CgT1D5_R2a.fastq 	(format: FASTQ)
Output file: bsmap_out_CgT1D5.sam	 (format: SAM)
Thread #3: 	150000 read pairs finished. 105 secs passed
Thread #0: 	100000 read pairs finished. 106 secs passed
Thread #2: 	200000 read pairs finished. 106 secs passed
Thread #1: 	50000 read pairs finished. 107 secs passed
Thread #3: 	250000 read pairs finished. 150 secs passed
Thread #0: 	300000 read pairs finished. 151 secs passed
Thread #2: 	350000 read pairs finished. 152 secs passed
Thread #1: 	400000 read pairs finished. 152 secs passed
Thread #3: 	450000 read pairs finished. 203 secs passed
Thread #1: 	600000 read pairs finished. 206 secs passed
Thread #2: 	550000 read pairs finished. 207 secs passed
Thread #0: 	500000 read pairs finished. 210 secs passed
Thread #3: 	650000 read pairs finished. 245 secs passed
Thread #1: 	700000 read pairs finished. 250 secs passed
Thread #2: 	750000 read pairs finished. 250 secs passed
Thread #0: 	800000 read pairs finished. 253 secs passed
Thread #3: 	850000 read pairs finished. 284 secs passed
Thread #1: 	900000 read pairs finished. 288 secs passed
Thread #2: 	950000 read pairs finished. 289 secs passed
Thread #0: 	1000000 read pairs finished. 290 secs passed
Thread #3: 	1050000 read pairs finished. 323 secs passed
Thread #1: 	1100000 read pairs finished. 328 secs passed
Thread #2: 	1150000 read pairs finished. 328 secs passed
Thread #0: 	1200000 read pairs finished. 331 secs passed
Thread #3: 	1250000 read pairs finished. 362 secs passed
Thread #1: 	1300000 read pairs finished. 365 secs passed
Thread #2: 	1350000 read pairs finished. 368 secs passed
Thread #0: 	1400000 read pairs finished. 369 secs passed
Thread #3: 	1450000 read pairs finished. 400 secs passed
Thread #1: 	1500000 read pairs finished. 402 secs passed
Thread #2: 	1550000 read pairs finished. 405 secs passed
Thread #0: 	1600000 read pairs finished. 407 secs passed
Thread #3: 	1650000 read pairs finished. 454 secs passed
Thread #1: 	1700000 read pairs finished. 457 secs passed
Thread #2: 	1750000 read pairs finished. 460 secs passed
Thread #0: 	1800000 read pairs finished. 463 secs passed
Thread #1: 	1900000 read pairs finished. 502 secs passed
Thread #3: 	1850000 read pairs finished. 503 secs passed
Thread #2: 	1950000 read pairs finished. 503 secs passed
Thread #0: 	2000000 read pairs finished. 505 secs passed
Thread #1: 	2050000 read pairs finished. 544 secs passed
Thread #3: 	2100000 read pairs finished. 545 secs passed
Thread #2: 	2150000 read pairs finished. 545 secs passed
Thread #0: 	2200000 read pairs finished. 545 secs passed
Thread #1: 	2250000 read pairs finished. 587 secs passed
Thread #3: 	2300000 read pairs finished. 588 secs passed
Thread #2: 	2350000 read pairs finished. 589 secs passed
Thread #0: 	2400000 read pairs finished. 590 secs passed
Thread #1: 	2450000 read pairs finished. 627 secs passed
Thread #3: 	2500000 read pairs finished. 628 secs passed
Thread #2: 	2550000 read pairs finished. 630 secs passed
Thread #0: 	2600000 read pairs finished. 631 secs passed
Thread #1: 	2650000 read pairs finished. 675 secs passed
Thread #3: 	2700000 read pairs finished. 678 secs passed
Thread #2: 	2750000 read pairs finished. 683 secs passed
Thread #0: 	2800000 read pairs finished. 686 secs passed
Thread #1: 	2850000 read pairs finished. 734 secs passed
Thread #3: 	2900000 read pairs finished. 736 secs passed
Thread #2: 	2950000 read pairs finished. 740 secs passed
Thread #0: 	3000000 read pairs finished. 741 secs passed
Thread #1: 	3050000 read pairs finished. 792 secs passed
Thread #3: 	3100000 read pairs finished. 792 secs passed
Thread #2: 	3150000 read pairs finished. 797 secs passed
Thread #0: 	3200000 read pairs finished. 799 secs passed
Thread #1: 	3250000 read pairs finished. 841 secs passed
Thread #3: 	3300000 read pairs finished. 842 secs passed
Thread #2: 	3350000 read pairs finished. 846 secs passed
Thread #0: 	3400000 read pairs finished. 848 secs passed
Thread #3: 	3500000 read pairs finished. 891 secs passed
Thread #1: 	3450000 read pairs finished. 892 secs passed
Thread #2: 	3550000 read pairs finished. 895 secs passed
Thread #0: 	3600000 read pairs finished. 897 secs passed
Thread #1: 	3700000 read pairs finished. 941 secs passed
Thread #3: 	3650000 read pairs finished. 942 secs passed
Thread #2: 	3750000 read pairs finished. 945 secs passed
Thread #0: 	3800000 read pairs finished. 947 secs passed
Thread #1: 	3850000 read pairs finished. 992 secs passed
Thread #3: 	3900000 read pairs finished. 992 secs passed
Thread #2: 	3950000 read pairs finished. 994 secs passed
Thread #0: 	4000000 read pairs finished. 996 secs passed
Thread #1: 	4050000 read pairs finished. 1038 secs passed
Thread #3: 	4100000 read pairs finished. 1039 secs passed
Thread #2: 	4150000 read pairs finished. 1041 secs passed
Thread #0: 	4200000 read pairs finished. 1043 secs passed
Thread #1: 	4250000 read pairs finished. 1085 secs passed
Thread #3: 	4300000 read pairs finished. 1086 secs passed
Thread #2: 	4350000 read pairs finished. 1088 secs passed
Thread #0: 	4400000 read pairs finished. 1091 secs passed
Thread #1: 	4450000 read pairs finished. 1132 secs passed
Thread #3: 	4500000 read pairs finished. 1133 secs passed
Thread #2: 	4550000 read pairs finished. 1134 secs passed
Thread #0: 	4600000 read pairs finished. 1138 secs passed
Thread #1: 	4650000 read pairs finished. 1178 secs passed
Thread #3: 	4700000 read pairs finished. 1180 secs passed
Thread #2: 	4750000 read pairs finished. 1181 secs passed
Thread #0: 	4800000 read pairs finished. 1185 secs passed
Thread #1: 	4850000 read pairs finished. 1241 secs passed
Thread #3: 	4900000 read pairs finished. 1244 secs passed
Thread #2: 	4950000 read pairs finished. 1246 secs passed
Thread #0: 	5000000 read pairs finished. 1255 secs passed
Thread #1: 	5050000 read pairs finished. 1341 secs passed
Thread #3: 	5100000 read pairs finished. 1343 secs passed
Thread #2: 	5150000 read pairs finished. 1343 secs passed
Thread #0: 	5200000 read pairs finished. 1348 secs passed
Thread #1: 	5250000 read pairs finished. 1410 secs passed
Thread #2: 	5350000 read pairs finished. 1415 secs passed
Thread #3: 	5300000 read pairs finished. 1416 secs passed
Thread #0: 	5400000 read pairs finished. 1422 secs passed
Thread #1: 	5450000 read pairs finished. 1541 secs passed
Thread #2: 	5500000 read pairs finished. 1549 secs passed
Thread #3: 	5550000 read pairs finished. 1551 secs passed
Thread #0: 	5600000 read pairs finished. 1559 secs passed
Thread #1: 	5650000 read pairs finished. 1701 secs passed
Thread #2: 	5700000 read pairs finished. 1709 secs passed
Thread #3: 	5750000 read pairs finished. 1711 secs passed
Thread #0: 	5800000 read pairs finished. 1720 secs passed
Thread #1: 	5850000 read pairs finished. 1872 secs passed
Thread #2: 	5900000 read pairs finished. 1881 secs passed
Thread #3: 	5950000 read pairs finished. 1883 secs passed
Thread #0: 	6000000 read pairs finished. 1892 secs passed
Thread #1: 	6050000 read pairs finished. 2016 secs passed
Thread #2: 	6100000 read pairs finished. 2018 secs passed
Thread #3: 	6150000 read pairs finished. 2021 secs passed
Thread #0: 	6200000 read pairs finished. 2025 secs passed
Thread #3: 	6327160 read pairs finished. 2053 secs passed
Thread #1: 	6250000 read pairs finished. 2079 secs passed
Thread #2: 	6300000 read pairs finished. 2081 secs passed
Total number of aligned reads: 
pairs:       2608088 (41%)
single a:    1736286 (27%)
single b:    1343344 (21%)
Done.
Finished at Tue Jul  8 13:01:31 2014
Total time consumed:  2082 secs

In [21]:
lib="CgM3"
In [22]:
! {bsmaploc}bsmap \
-a {lib}_R1a.fastq \
-b {lib}_R2a.fastq \
-d Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa \
-o bsmap_out_{lib}.sam \
-p 4 \

BSMAP v2.74
Start at:  Tue Jul  8 13:01:33 2014

Input reference file: Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa 	(format: FASTA)
Load in 7658 db seqs, total size 557717710 bp. 22 secs passed
total_kmers: 43046721
Create seed table. 78 secs passed
max number of mismatches: read_length * 8% 	max gap size: 0
kmer cut-off ratio: 5e-07
max multi-hits: 100	max Ns: 5	seed size: 16	index interval: 4
quality cutoff: 0	base quality char: '!'
min fragment size:28	max fragemt size:500
start from read #1	end at read #4294967295
additional alignment: T in reads => C in reference
mapping strand (read_1): ++,-+
mapping strand (read_2): +-,--
Pair-end alignment(4 threads)
Input read file #1: CgM3_R1a.fastq 	(format: FASTQ)
Input read file #2: CgM3_R2a.fastq 	(format: FASTQ)
Output file: bsmap_out_CgM3.sam	 (format: SAM)
Thread #2: 	200000 read pairs finished. 142 secs passed
Thread #0: 	150000 read pairs finished. 143 secs passed
Thread #1: 	100000 read pairs finished. 143 secs passed
Thread #3: 	50000 read pairs finished. 144 secs passed
Thread #2: 	250000 read pairs finished. 218 secs passed
Thread #0: 	300000 read pairs finished. 219 secs passed
Thread #1: 	350000 read pairs finished. 222 secs passed
Thread #3: 	400000 read pairs finished. 223 secs passed
Thread #2: 	450000 read pairs finished. 311 secs passed
Thread #0: 	500000 read pairs finished. 313 secs passed
Thread #1: 	550000 read pairs finished. 316 secs passed
Thread #3: 	600000 read pairs finished. 316 secs passed
Thread #2: 	650000 read pairs finished. 384 secs passed
Thread #0: 	700000 read pairs finished. 384 secs passed
Thread #3: 	800000 read pairs finished. 386 secs passed
Thread #1: 	750000 read pairs finished. 387 secs passed
Thread #2: 	850000 read pairs finished. 499 secs passed
Thread #0: 	900000 read pairs finished. 502 secs passed
Thread #3: 	950000 read pairs finished. 527 secs passed
Thread #1: 	1000000 read pairs finished. 536 secs passed
Thread #0: 	1100000 read pairs finished. 650 secs passed
Thread #2: 	1050000 read pairs finished. 654 secs passed
Thread #3: 	1150000 read pairs finished. 667 secs passed
Thread #1: 	1200000 read pairs finished. 677 secs passed
Thread #0: 	1250000 read pairs finished. 777 secs passed
Thread #2: 	1300000 read pairs finished. 779 secs passed
Thread #3: 	1350000 read pairs finished. 784 secs passed
Thread #1: 	1400000 read pairs finished. 792 secs passed
Thread #0: 	1450000 read pairs finished. 874 secs passed
Thread #2: 	1500000 read pairs finished. 877 secs passed
Thread #3: 	1550000 read pairs finished. 881 secs passed
Thread #1: 	1600000 read pairs finished. 891 secs passed
Thread #0: 	1650000 read pairs finished. 974 secs passed
Thread #2: 	1700000 read pairs finished. 976 secs passed
Thread #3: 	1750000 read pairs finished. 980 secs passed
Thread #1: 	1800000 read pairs finished. 993 secs passed
Thread #0: 	1850000 read pairs finished. 1072 secs passed
Thread #2: 	1900000 read pairs finished. 1072 secs passed
Thread #3: 	1950000 read pairs finished. 1076 secs passed
Thread #1: 	2000000 read pairs finished. 1091 secs passed
Thread #0: 	2050000 read pairs finished. 1170 secs passed
Thread #2: 	2100000 read pairs finished. 1173 secs passed
Thread #3: 	2150000 read pairs finished. 1177 secs passed
Thread #1: 	2200000 read pairs finished. 1188 secs passed
Thread #0: 	2250000 read pairs finished. 1259 secs passed
Thread #2: 	2300000 read pairs finished. 1260 secs passed
Thread #3: 	2350000 read pairs finished. 1264 secs passed
Thread #1: 	2400000 read pairs finished. 1277 secs passed
Thread #0: 	2450000 read pairs finished. 1342 secs passed
Thread #2: 	2500000 read pairs finished. 1344 secs passed
Thread #3: 	2550000 read pairs finished. 1347 secs passed
Thread #1: 	2600000 read pairs finished. 1360 secs passed
Thread #0: 	2650000 read pairs finished. 1445 secs passed
Thread #2: 	2700000 read pairs finished. 1448 secs passed
Thread #3: 	2750000 read pairs finished. 1455 secs passed
Thread #1: 	2800000 read pairs finished. 1479 secs passed
Thread #0: 	2850000 read pairs finished. 1570 secs passed
Thread #2: 	2900000 read pairs finished. 1571 secs passed
Thread #3: 	2950000 read pairs finished. 1576 secs passed
Thread #1: 	3000000 read pairs finished. 1591 secs passed
Thread #0: 	3050000 read pairs finished. 1655 secs passed
Thread #2: 	3100000 read pairs finished. 1656 secs passed
Thread #3: 	3150000 read pairs finished. 1659 secs passed
Thread #1: 	3200000 read pairs finished. 1676 secs passed
Thread #0: 	3250000 read pairs finished. 1738 secs passed
Thread #2: 	3300000 read pairs finished. 1740 secs passed
Thread #3: 	3350000 read pairs finished. 1744 secs passed
Thread #1: 	3400000 read pairs finished. 1762 secs passed
Thread #0: 	3450000 read pairs finished. 1838 secs passed
Thread #2: 	3500000 read pairs finished. 1841 secs passed
Thread #3: 	3550000 read pairs finished. 1846 secs passed
Thread #1: 	3600000 read pairs finished. 1868 secs passed
Thread #0: 	3650000 read pairs finished. 1959 secs passed
Thread #2: 	3700000 read pairs finished. 1973 secs passed
Thread #3: 	3750000 read pairs finished. 1983 secs passed
Thread #1: 	3800000 read pairs finished. 2001 secs passed
Thread #0: 	3850000 read pairs finished. 2072 secs passed
Thread #2: 	3900000 read pairs finished. 2081 secs passed
Thread #3: 	3950000 read pairs finished. 2088 secs passed
Thread #1: 	4000000 read pairs finished. 2105 secs passed
Thread #0: 	4050000 read pairs finished. 2166 secs passed
Thread #2: 	4100000 read pairs finished. 2178 secs passed
Thread #3: 	4150000 read pairs finished. 2184 secs passed
Thread #1: 	4200000 read pairs finished. 2202 secs passed
Thread #0: 	4250000 read pairs finished. 2268 secs passed
Thread #2: 	4300000 read pairs finished. 2278 secs passed
Thread #3: 	4350000 read pairs finished. 2285 secs passed
Thread #1: 	4400000 read pairs finished. 2304 secs passed
Thread #0: 	4450000 read pairs finished. 2366 secs passed
Thread #2: 	4500000 read pairs finished. 2376 secs passed
Thread #3: 	4550000 read pairs finished. 2382 secs passed
Thread #1: 	4600000 read pairs finished. 2404 secs passed
Thread #0: 	4650000 read pairs finished. 2469 secs passed
Thread #2: 	4700000 read pairs finished. 2477 secs passed
Thread #3: 	4750000 read pairs finished. 2481 secs passed
Thread #1: 	4800000 read pairs finished. 2506 secs passed
Thread #0: 	4850000 read pairs finished. 2587 secs passed
Thread #2: 	4900000 read pairs finished. 2605 secs passed
Thread #3: 	4950000 read pairs finished. 2611 secs passed
Thread #1: 	5000000 read pairs finished. 2635 secs passed
Thread #0: 	5050000 read pairs finished. 2704 secs passed
Thread #2: 	5100000 read pairs finished. 2716 secs passed
Thread #3: 	5150000 read pairs finished. 2721 secs passed
Thread #1: 	5200000 read pairs finished. 2747 secs passed
Thread #0: 	5250000 read pairs finished. 2810 secs passed
Thread #2: 	5300000 read pairs finished. 2824 secs passed
Thread #3: 	5350000 read pairs finished. 2830 secs passed
Thread #1: 	5400000 read pairs finished. 2869 secs passed
Thread #0: 	5450000 read pairs finished. 2956 secs passed
Thread #2: 	5500000 read pairs finished. 2974 secs passed
Thread #3: 	5550000 read pairs finished. 2978 secs passed
Thread #1: 	5600000 read pairs finished. 3023 secs passed
Thread #0: 	5650000 read pairs finished. 3109 secs passed
Thread #2: 	5700000 read pairs finished. 3122 secs passed
Thread #3: 	5750000 read pairs finished. 3124 secs passed
Thread #1: 	5800000 read pairs finished. 3164 secs passed
Thread #0: 	5850000 read pairs finished. 3254 secs passed
Thread #2: 	5900000 read pairs finished. 3269 secs passed
Thread #3: 	5950000 read pairs finished. 3270 secs passed
Thread #1: 	6000000 read pairs finished. 3306 secs passed
Thread #0: 	6050000 read pairs finished. 3391 secs passed
Thread #3: 	6150000 read pairs finished. 3403 secs passed
Thread #2: 	6100000 read pairs finished. 3404 secs passed
Thread #1: 	6200000 read pairs finished. 3439 secs passed
Thread #0: 	6250000 read pairs finished. 3500 secs passed
Thread #3: 	6300000 read pairs finished. 3512 secs passed
Thread #2: 	6350000 read pairs finished. 3514 secs passed
Thread #1: 	6400000 read pairs finished. 3549 secs passed
Thread #0: 	6450000 read pairs finished. 3588 secs passed
Thread #3: 	6500000 read pairs finished. 3594 secs passed
Thread #2: 	6550000 read pairs finished. 3596 secs passed
Thread #1: 	6600000 read pairs finished. 3613 secs passed
Thread #0: 	6650000 read pairs finished. 3667 secs passed
Thread #3: 	6700000 read pairs finished. 3672 secs passed
Thread #2: 	6750000 read pairs finished. 3674 secs passed
Thread #1: 	6800000 read pairs finished. 3712 secs passed
Thread #0: 	6850000 read pairs finished. 3749 secs passed
Thread #3: 	6900000 read pairs finished. 3761 secs passed
Thread #2: 	6950000 read pairs finished. 3766 secs passed
Thread #1: 	7000000 read pairs finished. 3824 secs passed
Thread #0: 	7050000 read pairs finished. 3907 secs passed
Thread #3: 	7100000 read pairs finished. 3916 secs passed
Thread #2: 	7150000 read pairs finished. 3924 secs passed
Thread #1: 	7200000 read pairs finished. 3976 secs passed
Thread #0: 	7250000 read pairs finished. 4060 secs passed
Thread #3: 	7300000 read pairs finished. 4068 secs passed
Thread #2: 	7350000 read pairs finished. 4073 secs passed
Thread #1: 	7400000 read pairs finished. 4140 secs passed
Thread #0: 	7450000 read pairs finished. 4238 secs passed
Thread #3: 	7500000 read pairs finished. 4247 secs passed
Thread #2: 	7550000 read pairs finished. 4252 secs passed
Thread #1: 	7600000 read pairs finished. 4308 secs passed
Thread #0: 	7650000 read pairs finished. 4369 secs passed
Thread #3: 	7700000 read pairs finished. 4379 secs passed
Thread #2: 	7750000 read pairs finished. 4384 secs passed
Thread #1: 	7800000 read pairs finished. 4429 secs passed
Thread #0: 	7850000 read pairs finished. 4500 secs passed
Thread #3: 	7900000 read pairs finished. 4513 secs passed
Thread #2: 	7950000 read pairs finished. 4521 secs passed
Thread #1: 	8000000 read pairs finished. 4554 secs passed
Thread #3: 	8078115 read pairs finished. 4564 secs passed
Thread #0: 	8050000 read pairs finished. 4580 secs passed
Total number of aligned reads: 
pairs:       4380128 (54%)
single a:    1426879 (18%)
single b:    1168161 (14%)
Done.
Finished at Tue Jul  8 14:17:54 2014
Total time consumed:  4581 secs

In [23]:
lib="CgT3D3"
In [24]:
! {bsmaploc}bsmap \
-a {lib}_R1a.fastq \
-b {lib}_R2a.fastq \
-d Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa \
-o bsmap_out_{lib}.sam \
-p 4 \

BSMAP v2.74
Start at:  Tue Jul  8 14:17:56 2014

Input reference file: Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa 	(format: FASTA)
Load in 7658 db seqs, total size 557717710 bp. 21 secs passed
total_kmers: 43046721
Create seed table. 112 secs passed
max number of mismatches: read_length * 8% 	max gap size: 0
kmer cut-off ratio: 5e-07
max multi-hits: 100	max Ns: 5	seed size: 16	index interval: 4
quality cutoff: 0	base quality char: '!'
min fragment size:28	max fragemt size:500
start from read #1	end at read #4294967295
additional alignment: T in reads => C in reference
mapping strand (read_1): ++,-+
mapping strand (read_2): +-,--
Pair-end alignment(4 threads)
Input read file #1: CgT3D3_R1a.fastq 	(format: FASTQ)
Input read file #2: CgT3D3_R2a.fastq 	(format: FASTQ)
Output file: bsmap_out_CgT3D3.sam	 (format: SAM)
Thread #3: 	200000 read pairs finished. 205 secs passed
Thread #2: 	150000 read pairs finished. 206 secs passed
Thread #1: 	100000 read pairs finished. 206 secs passed
Thread #0: 	50000 read pairs finished. 208 secs passed
Thread #3: 	250000 read pairs finished. 306 secs passed
Thread #2: 	300000 read pairs finished. 307 secs passed
Thread #1: 	350000 read pairs finished. 309 secs passed
Thread #0: 	400000 read pairs finished. 311 secs passed
Thread #3: 	450000 read pairs finished. 407 secs passed
Thread #2: 	500000 read pairs finished. 409 secs passed
Thread #1: 	550000 read pairs finished. 410 secs passed
Thread #0: 	600000 read pairs finished. 414 secs passed
Thread #3: 	650000 read pairs finished. 498 secs passed
Thread #2: 	700000 read pairs finished. 500 secs passed
Thread #1: 	750000 read pairs finished. 501 secs passed
Thread #0: 	800000 read pairs finished. 504 secs passed
Thread #3: 	850000 read pairs finished. 588 secs passed
Thread #2: 	900000 read pairs finished. 589 secs passed
Thread #1: 	950000 read pairs finished. 589 secs passed
Thread #0: 	1000000 read pairs finished. 602 secs passed
Thread #1: 	1150000 read pairs finished. 638 secs passed
Thread #2: 	1100000 read pairs finished. 640 secs passed
Thread #3: 	1050000 read pairs finished. 643 secs passed
Thread #0: 	1200000 read pairs finished. 645 secs passed
Thread #1: 	1250000 read pairs finished. 690 secs passed
Thread #2: 	1300000 read pairs finished. 691 secs passed
Thread #3: 	1350000 read pairs finished. 694 secs passed
Thread #0: 	1400000 read pairs finished. 696 secs passed
Thread #1: 	1450000 read pairs finished. 737 secs passed
Thread #2: 	1500000 read pairs finished. 738 secs passed
Thread #3: 	1550000 read pairs finished. 741 secs passed
Thread #0: 	1600000 read pairs finished. 744 secs passed
Thread #1: 	1650000 read pairs finished. 802 secs passed
Thread #2: 	1700000 read pairs finished. 805 secs passed
Thread #3: 	1750000 read pairs finished. 808 secs passed
Thread #0: 	1800000 read pairs finished. 812 secs passed
Thread #1: 	1850000 read pairs finished. 867 secs passed
Thread #2: 	1900000 read pairs finished. 870 secs passed
Thread #3: 	1950000 read pairs finished. 872 secs passed
Thread #0: 	2000000 read pairs finished. 874 secs passed
Thread #1: 	2050000 read pairs finished. 922 secs passed
Thread #2: 	2100000 read pairs finished. 926 secs passed
Thread #3: 	2150000 read pairs finished. 926 secs passed
Thread #0: 	2200000 read pairs finished. 930 secs passed
Thread #1: 	2250000 read pairs finished. 1066 secs passed
Thread #2: 	2300000 read pairs finished. 1076 secs passed
Thread #3: 	2350000 read pairs finished. 1080 secs passed
Thread #0: 	2400000 read pairs finished. 1089 secs passed
Thread #1: 	2450000 read pairs finished. 1177 secs passed
Thread #2: 	2500000 read pairs finished. 1181 secs passed
Thread #3: 	2550000 read pairs finished. 1183 secs passed
Thread #0: 	2600000 read pairs finished. 1187 secs passed
Thread #1: 	2650000 read pairs finished. 1290 secs passed
Thread #2: 	2700000 read pairs finished. 1295 secs passed
Thread #3: 	2750000 read pairs finished. 1296 secs passed
Thread #0: 	2800000 read pairs finished. 1302 secs passed
Thread #1: 	2850000 read pairs finished. 1373 secs passed
Thread #3: 	2950000 read pairs finished. 1381 secs passed
Thread #2: 	2900000 read pairs finished. 1382 secs passed
Thread #0: 	3000000 read pairs finished. 1386 secs passed
Thread #1: 	3050000 read pairs finished. 1510 secs passed
Thread #3: 	3100000 read pairs finished. 1511 secs passed
Thread #2: 	3150000 read pairs finished. 1511 secs passed
Thread #0: 	3200000 read pairs finished. 1512 secs passed
Thread #1: 	3250000 read pairs finished. 1577 secs passed
Thread #3: 	3300000 read pairs finished. 1578 secs passed
Thread #2: 	3350000 read pairs finished. 1579 secs passed
Thread #0: 	3400000 read pairs finished. 1580 secs passed
Thread #1: 	3450000 read pairs finished. 1641 secs passed
Thread #3: 	3500000 read pairs finished. 1643 secs passed
Thread #2: 	3550000 read pairs finished. 1643 secs passed
Thread #0: 	3600000 read pairs finished. 1644 secs passed
Thread #1: 	3650000 read pairs finished. 1699 secs passed
Thread #3: 	3700000 read pairs finished. 1702 secs passed
Thread #2: 	3750000 read pairs finished. 1703 secs passed
Thread #0: 	3800000 read pairs finished. 1704 secs passed
Thread #1: 	3850000 read pairs finished. 1745 secs passed
Thread #3: 	3900000 read pairs finished. 1753 secs passed
Thread #0: 	4000000 read pairs finished. 1754 secs passed
Thread #2: 	3950000 read pairs finished. 1756 secs passed
Thread #1: 	4050000 read pairs finished. 1793 secs passed
Thread #3: 	4100000 read pairs finished. 1799 secs passed
Thread #0: 	4150000 read pairs finished. 1801 secs passed
Thread #2: 	4200000 read pairs finished. 1802 secs passed
Thread #1: 	4250000 read pairs finished. 1841 secs passed
Thread #3: 	4300000 read pairs finished. 1848 secs passed
Thread #0: 	4350000 read pairs finished. 1849 secs passed
Thread #2: 	4400000 read pairs finished. 1850 secs passed
Thread #1: 	4450000 read pairs finished. 1889 secs passed
Thread #3: 	4500000 read pairs finished. 1895 secs passed
Thread #0: 	4550000 read pairs finished. 1896 secs passed
Thread #2: 	4600000 read pairs finished. 1897 secs passed
Thread #1: 	4650000 read pairs finished. 1934 secs passed
Thread #3: 	4700000 read pairs finished. 1940 secs passed
Thread #0: 	4750000 read pairs finished. 1941 secs passed
Thread #2: 	4800000 read pairs finished. 1942 secs passed
Thread #1: 	4850000 read pairs finished. 1980 secs passed
Thread #3: 	4900000 read pairs finished. 1986 secs passed
Thread #0: 	4950000 read pairs finished. 1986 secs passed
Thread #2: 	5000000 read pairs finished. 1987 secs passed
Thread #1: 	5050000 read pairs finished. 2025 secs passed
Thread #3: 	5100000 read pairs finished. 2031 secs passed
Thread #0: 	5150000 read pairs finished. 2032 secs passed
Thread #2: 	5200000 read pairs finished. 2034 secs passed
Thread #1: 	5250000 read pairs finished. 2071 secs passed
Thread #3: 	5300000 read pairs finished. 2077 secs passed
Thread #0: 	5350000 read pairs finished. 2079 secs passed
Thread #2: 	5400000 read pairs finished. 2081 secs passed
Thread #1: 	5450000 read pairs finished. 2116 secs passed
Thread #3: 	5500000 read pairs finished. 2122 secs passed
Thread #0: 	5550000 read pairs finished. 2125 secs passed
Thread #2: 	5600000 read pairs finished. 2126 secs passed
Thread #1: 	5650000 read pairs finished. 2162 secs passed
Thread #3: 	5700000 read pairs finished. 2169 secs passed
Thread #0: 	5750000 read pairs finished. 2171 secs passed
Thread #2: 	5800000 read pairs finished. 2173 secs passed
Thread #1: 	5850000 read pairs finished. 2207 secs passed
Thread #3: 	5900000 read pairs finished. 2215 secs passed
Thread #0: 	5950000 read pairs finished. 2217 secs passed
Thread #2: 	6000000 read pairs finished. 2218 secs passed
Thread #1: 	6050000 read pairs finished. 2253 secs passed
Thread #3: 	6100000 read pairs finished. 2261 secs passed
Thread #2: 	6200000 read pairs finished. 2265 secs passed
Thread #0: 	6150000 read pairs finished. 2265 secs passed
Thread #1: 	6250000 read pairs finished. 2298 secs passed
Thread #3: 	6300000 read pairs finished. 2306 secs passed
Thread #2: 	6350000 read pairs finished. 2310 secs passed
Thread #0: 	6400000 read pairs finished. 2311 secs passed
Thread #1: 	6450000 read pairs finished. 2344 secs passed
Thread #3: 	6500000 read pairs finished. 2351 secs passed
Thread #2: 	6550000 read pairs finished. 2357 secs passed
Thread #0: 	6600000 read pairs finished. 2359 secs passed
Thread #1: 	6650000 read pairs finished. 2402 secs passed
Thread #3: 	6700000 read pairs finished. 2410 secs passed
Thread #2: 	6750000 read pairs finished. 2415 secs passed
Thread #0: 	6800000 read pairs finished. 2418 secs passed
Thread #1: 	6850000 read pairs finished. 2453 secs passed
Thread #3: 	6900000 read pairs finished. 2461 secs passed
Thread #2: 	6950000 read pairs finished. 2465 secs passed
Thread #0: 	7000000 read pairs finished. 2467 secs passed
Thread #1: 	7050000 read pairs finished. 2501 secs passed
Thread #3: 	7100000 read pairs finished. 2509 secs passed
Thread #2: 	7150000 read pairs finished. 2513 secs passed
Thread #0: 	7200000 read pairs finished. 2515 secs passed
Thread #0: 	7380649 read pairs finished. 2542 secs passed
Thread #1: 	7250000 read pairs finished. 2544 secs passed
Thread #3: 	7300000 read pairs finished. 2549 secs passed
Thread #2: 	7350000 read pairs finished. 2550 secs passed
Total number of aligned reads: 
pairs:       3906464 (53%)
single a:    1418844 (19%)
single b:    1116765 (15%)
Done.
Finished at Tue Jul  8 15:00:26 2014
Total time consumed:  2550 secs

In [25]:
lib="CgT3D5"
In [26]:
! {bsmaploc}bsmap \
-a {lib}_R1a.fastq \
-b {lib}_R2a.fastq \
-d Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa \
-o bsmap_out_{lib}.sam \
-p 4 \

BSMAP v2.74
Start at:  Tue Jul  8 15:00:28 2014

Input reference file: Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa 	(format: FASTA)
Load in 7658 db seqs, total size 557717710 bp. 13 secs passed
total_kmers: 43046721
Create seed table. 59 secs passed
max number of mismatches: read_length * 8% 	max gap size: 0
kmer cut-off ratio: 5e-07
max multi-hits: 100	max Ns: 5	seed size: 16	index interval: 4
quality cutoff: 0	base quality char: '!'
min fragment size:28	max fragemt size:500
start from read #1	end at read #4294967295
additional alignment: T in reads => C in reference
mapping strand (read_1): ++,-+
mapping strand (read_2): +-,--
Pair-end alignment(4 threads)
Input read file #1: CgT3D5_R1a.fastq 	(format: FASTQ)
Input read file #2: CgT3D5_R2a.fastq 	(format: FASTQ)
Output file: bsmap_out_CgT3D5.sam	 (format: SAM)
Thread #2: 	150000 read pairs finished. 97 secs passed
Thread #1: 	100000 read pairs finished. 98 secs passed
Thread #3: 	200000 read pairs finished. 98 secs passed
Thread #0: 	50000 read pairs finished. 99 secs passed
Thread #2: 	250000 read pairs finished. 133 secs passed
Thread #1: 	300000 read pairs finished. 135 secs passed
Thread #3: 	350000 read pairs finished. 136 secs passed
Thread #0: 	400000 read pairs finished. 137 secs passed
Thread #2: 	450000 read pairs finished. 172 secs passed
Thread #1: 	500000 read pairs finished. 175 secs passed
Thread #3: 	550000 read pairs finished. 175 secs passed
Thread #0: 	600000 read pairs finished. 176 secs passed
Thread #2: 	650000 read pairs finished. 216 secs passed
Thread #1: 	700000 read pairs finished. 217 secs passed
Thread #3: 	750000 read pairs finished. 222 secs passed
Thread #0: 	800000 read pairs finished. 227 secs passed
Thread #1: 	900000 read pairs finished. 276 secs passed
Thread #2: 	850000 read pairs finished. 276 secs passed
Thread #3: 	950000 read pairs finished. 278 secs passed
Thread #0: 	1000000 read pairs finished. 282 secs passed
Thread #1: 	1050000 read pairs finished. 314 secs passed
Thread #2: 	1100000 read pairs finished. 314 secs passed
Thread #3: 	1150000 read pairs finished. 316 secs passed
Thread #0: 	1200000 read pairs finished. 320 secs passed
Thread #1: 	1250000 read pairs finished. 352 secs passed
Thread #2: 	1300000 read pairs finished. 353 secs passed
Thread #3: 	1350000 read pairs finished. 354 secs passed
Thread #0: 	1400000 read pairs finished. 358 secs passed
Thread #2: 	1500000 read pairs finished. 391 secs passed
Thread #1: 	1450000 read pairs finished. 391 secs passed
Thread #3: 	1550000 read pairs finished. 392 secs passed
Thread #0: 	1600000 read pairs finished. 396 secs passed
Thread #2: 	1650000 read pairs finished. 428 secs passed
Thread #1: 	1700000 read pairs finished. 429 secs passed
Thread #3: 	1750000 read pairs finished. 431 secs passed
Thread #0: 	1800000 read pairs finished. 434 secs passed
Thread #2: 	1850000 read pairs finished. 466 secs passed
Thread #1: 	1900000 read pairs finished. 468 secs passed
Thread #3: 	1950000 read pairs finished. 469 secs passed
Thread #0: 	2000000 read pairs finished. 473 secs passed
Thread #2: 	2050000 read pairs finished. 504 secs passed
Thread #1: 	2100000 read pairs finished. 506 secs passed
Thread #3: 	2150000 read pairs finished. 507 secs passed
Thread #0: 	2200000 read pairs finished. 513 secs passed
Thread #2: 	2250000 read pairs finished. 543 secs passed
Thread #1: 	2300000 read pairs finished. 545 secs passed
Thread #3: 	2350000 read pairs finished. 546 secs passed
Thread #0: 	2400000 read pairs finished. 551 secs passed
Thread #2: 	2450000 read pairs finished. 581 secs passed
Thread #1: 	2500000 read pairs finished. 582 secs passed
Thread #3: 	2550000 read pairs finished. 584 secs passed
Thread #0: 	2600000 read pairs finished. 589 secs passed
Thread #2: 	2650000 read pairs finished. 620 secs passed
Thread #1: 	2700000 read pairs finished. 621 secs passed
Thread #3: 	2750000 read pairs finished. 622 secs passed
Thread #0: 	2800000 read pairs finished. 627 secs passed
Thread #2: 	2850000 read pairs finished. 657 secs passed
Thread #1: 	2900000 read pairs finished. 658 secs passed
Thread #3: 	2950000 read pairs finished. 662 secs passed
Thread #0: 	3000000 read pairs finished. 670 secs passed
Thread #1: 	3100000 read pairs finished. 695 secs passed
Thread #2: 	3050000 read pairs finished. 696 secs passed
Thread #3: 	3150000 read pairs finished. 699 secs passed
Thread #0: 	3200000 read pairs finished. 707 secs passed
Thread #1: 	3250000 read pairs finished. 732 secs passed
Thread #2: 	3300000 read pairs finished. 733 secs passed
Thread #3: 	3350000 read pairs finished. 735 secs passed
Thread #0: 	3400000 read pairs finished. 743 secs passed
Thread #1: 	3450000 read pairs finished. 768 secs passed
Thread #2: 	3500000 read pairs finished. 768 secs passed
Thread #3: 	3550000 read pairs finished. 771 secs passed
Thread #0: 	3600000 read pairs finished. 779 secs passed
Thread #1: 	3650000 read pairs finished. 804 secs passed
Thread #2: 	3700000 read pairs finished. 805 secs passed
Thread #3: 	3750000 read pairs finished. 807 secs passed
Thread #0: 	3800000 read pairs finished. 816 secs passed
Thread #1: 	3850000 read pairs finished. 840 secs passed
Thread #2: 	3900000 read pairs finished. 841 secs passed
Thread #3: 	3950000 read pairs finished. 843 secs passed
Thread #0: 	4000000 read pairs finished. 852 secs passed
Thread #1: 	4050000 read pairs finished. 877 secs passed
Thread #2: 	4100000 read pairs finished. 878 secs passed
Thread #3: 	4150000 read pairs finished. 879 secs passed
Thread #0: 	4200000 read pairs finished. 887 secs passed
Thread #1: 	4250000 read pairs finished. 914 secs passed
Thread #2: 	4300000 read pairs finished. 914 secs passed
Thread #3: 	4350000 read pairs finished. 915 secs passed
Thread #0: 	4400000 read pairs finished. 923 secs passed
Thread #1: 	4450000 read pairs finished. 950 secs passed
Thread #2: 	4500000 read pairs finished. 952 secs passed
Thread #3: 	4550000 read pairs finished. 952 secs passed
Thread #0: 	4600000 read pairs finished. 960 secs passed
Thread #1: 	4650000 read pairs finished. 988 secs passed
Thread #2: 	4700000 read pairs finished. 990 secs passed
Thread #3: 	4750000 read pairs finished. 990 secs passed
Thread #0: 	4800000 read pairs finished. 997 secs passed
Thread #1: 	4850000 read pairs finished. 1025 secs passed
Thread #2: 	4900000 read pairs finished. 1027 secs passed
Thread #3: 	4950000 read pairs finished. 1028 secs passed
Thread #0: 	5000000 read pairs finished. 1035 secs passed
Thread #1: 	5050000 read pairs finished. 1063 secs passed
Thread #2: 	5100000 read pairs finished. 1065 secs passed
Thread #3: 	5150000 read pairs finished. 1066 secs passed
Thread #0: 	5200000 read pairs finished. 1073 secs passed
Thread #1: 	5250000 read pairs finished. 1101 secs passed
Thread #2: 	5300000 read pairs finished. 1103 secs passed
Thread #3: 	5350000 read pairs finished. 1103 secs passed
Thread #0: 	5400000 read pairs finished. 1110 secs passed
Thread #1: 	5450000 read pairs finished. 1140 secs passed
Thread #2: 	5500000 read pairs finished. 1142 secs passed
Thread #3: 	5550000 read pairs finished. 1142 secs passed
Thread #0: 	5600000 read pairs finished. 1147 secs passed
Thread #1: 	5650000 read pairs finished. 1177 secs passed
Thread #2: 	5700000 read pairs finished. 1179 secs passed
Thread #3: 	5750000 read pairs finished. 1180 secs passed
Thread #0: 	5800000 read pairs finished. 1184 secs passed
Thread #1: 	5850000 read pairs finished. 1214 secs passed
Thread #2: 	5900000 read pairs finished. 1216 secs passed
Thread #3: 	5950000 read pairs finished. 1217 secs passed
Thread #0: 	6000000 read pairs finished. 1223 secs passed
Thread #1: 	6050000 read pairs finished. 1251 secs passed
Thread #2: 	6100000 read pairs finished. 1253 secs passed
Thread #3: 	6150000 read pairs finished. 1253 secs passed
Thread #0: 	6200000 read pairs finished. 1260 secs passed
Thread #1: 	6250000 read pairs finished. 1288 secs passed
Thread #2: 	6300000 read pairs finished. 1290 secs passed
Thread #3: 	6350000 read pairs finished. 1291 secs passed
Thread #0: 	6400000 read pairs finished. 1297 secs passed
Thread #1: 	6450000 read pairs finished. 1327 secs passed
Thread #2: 	6500000 read pairs finished. 1329 secs passed
Thread #3: 	6550000 read pairs finished. 1330 secs passed
Thread #0: 	6600000 read pairs finished. 1336 secs passed
Thread #1: 	6650000 read pairs finished. 1365 secs passed
Thread #2: 	6700000 read pairs finished. 1366 secs passed
Thread #3: 	6750000 read pairs finished. 1367 secs passed
Thread #0: 	6800000 read pairs finished. 1374 secs passed
Thread #1: 	6850000 read pairs finished. 1403 secs passed
Thread #2: 	6900000 read pairs finished. 1403 secs passed
Thread #3: 	6950000 read pairs finished. 1404 secs passed
Thread #0: 	7000000 read pairs finished. 1411 secs passed
Thread #1: 	7050000 read pairs finished. 1440 secs passed
Thread #2: 	7100000 read pairs finished. 1442 secs passed
Thread #3: 	7150000 read pairs finished. 1443 secs passed
Thread #0: 	7200000 read pairs finished. 1449 secs passed
Thread #0: 	7350645 read pairs finished. 1449 secs passed
Thread #1: 	7250000 read pairs finished. 1472 secs passed
Thread #2: 	7300000 read pairs finished. 1473 secs passed
Thread #3: 	7350000 read pairs finished. 1474 secs passed
Total number of aligned reads: 
pairs:       3946673 (54%)
single a:    1329262 (18%)
single b:    1076148 (15%)
Done.
Finished at Tue Jul  8 15:25:02 2014
Total time consumed:  1474 secs

methratio

In [29]:
lib="CgM1"
In [31]:
!python {bsmaploc}methratio.py \
-d Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa \
-u -z -g \
-o methratio_out_{lib}.txt \
-s {bsmaploc}samtools \
bsmap_out_{lib}.sam \
@ Wed Jul  9 08:48:51 2014: reading reference Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa ...
@ Wed Jul  9 08:49:47 2014: reading bsmap_out_CgM1.sam ...
[samopen] SAM header is present: 7658 sequences.
	@ Wed Jul  9 08:56:56 2014: read 10000000 lines
@ Wed Jul  9 08:57:22 2014: combining CpG methylation from both strands ...
@ Wed Jul  9 08:58:14 2014: writing methratio_out_CgM1.txt ...
@ Wed Jul  9 09:11:18 2014: done.
total 8562355 valid mappings, 48968967 covered cytosines, average coverage: 1.80 fold.

In [32]:
lib="CgT1D3"
In [33]:
!python {bsmaploc}methratio.py \
-d Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa \
-u -z -g \
-o methratio_out_{lib}.txt \
-s {bsmaploc}samtools \
bsmap_out_{lib}.sam \
@ Wed Jul  9 09:11:21 2014: reading reference Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa ...
@ Wed Jul  9 09:12:14 2014: reading bsmap_out_CgT1D3.sam ...
[samopen] SAM header is present: 7658 sequences.
@ Wed Jul  9 09:16:59 2014: combining CpG methylation from both strands ...
@ Wed Jul  9 09:17:36 2014: writing methratio_out_CgT1D3.txt ...
@ Wed Jul  9 09:28:30 2014: done.
total 5964269 valid mappings, 39695564 covered cytosines, average coverage: 1.51 fold.

In [34]:
lib="CgT1D5"
In [35]:
!python {bsmaploc}methratio.py \
-d Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa \
-u -z -g \
-o methratio_out_{lib}.txt \
-s {bsmaploc}samtools \
bsmap_out_{lib}.sam \
@ Wed Jul  9 09:28:32 2014: reading reference Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa ...
@ Wed Jul  9 09:29:25 2014: reading bsmap_out_CgT1D5.sam ...
[samopen] SAM header is present: 7658 sequences.
@ Wed Jul  9 09:35:00 2014: combining CpG methylation from both strands ...
@ Wed Jul  9 09:35:39 2014: writing methratio_out_CgT1D5.txt ...
@ Wed Jul  9 09:49:14 2014: done.
total 6801985 valid mappings, 45492773 covered cytosines, average coverage: 1.54 fold.

In [36]:
lib="CgM3"
In [37]:
!python {bsmaploc}methratio.py \
-d Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa \
-u -z -g \
-o methratio_out_{lib}.txt \
-s {bsmaploc}samtools \
bsmap_out_{lib}.sam \
@ Wed Jul  9 09:49:16 2014: reading reference Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa ...
@ Wed Jul  9 09:50:09 2014: reading bsmap_out_CgM3.sam ...
[samopen] SAM header is present: 7658 sequences.
	@ Wed Jul  9 09:57:03 2014: read 10000000 lines
@ Wed Jul  9 09:58:02 2014: combining CpG methylation from both strands ...
@ Wed Jul  9 09:58:44 2014: writing methratio_out_CgM3.txt ...
@ Wed Jul  9 10:12:52 2014: done.
total 9597901 valid mappings, 53820491 covered cytosines, average coverage: 1.79 fold.

In [38]:
lib="CgT3D3"
In [39]:
!python {bsmaploc}methratio.py \
-d Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa \
-u -z -g \
-o methratio_out_{lib}.txt \
-s {bsmaploc}samtools \
bsmap_out_{lib}.sam \
@ Wed Jul  9 10:12:54 2014: reading reference Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa ...
@ Wed Jul  9 10:13:46 2014: reading bsmap_out_CgT3D3.sam ...
[samopen] SAM header is present: 7658 sequences.
	@ Wed Jul  9 10:21:42 2014: read 10000000 lines
@ Wed Jul  9 10:21:59 2014: combining CpG methylation from both strands ...
@ Wed Jul  9 10:22:41 2014: writing methratio_out_CgT3D3.txt ...
@ Wed Jul  9 10:36:35 2014: done.
total 8688793 valid mappings, 52876971 covered cytosines, average coverage: 1.67 fold.

In [40]:
lib="CgT3D5"
In [41]:
!python {bsmaploc}methratio.py \
-d Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa \
-u -z -g \
-o methratio_out_{lib}.txt \
-s {bsmaploc}samtools \
bsmap_out_{lib}.sam \
@ Wed Jul  9 10:36:37 2014: reading reference Crassostrea_gigas.GCA_000297895.1.22.dna_sm.genome.fa ...
@ Wed Jul  9 10:37:30 2014: reading bsmap_out_CgT3D5.sam ...
[samopen] SAM header is present: 7658 sequences.
	@ Wed Jul  9 10:46:20 2014: read 10000000 lines
@ Wed Jul  9 10:46:33 2014: combining CpG methylation from both strands ...
@ Wed Jul  9 10:47:28 2014: writing methratio_out_CgT3D5.txt ...
@ Wed Jul  9 11:01:13 2014: done.
total 8650035 valid mappings, 52138971 covered cytosines, average coverage: 1.70 fold.

Converting methratio files for methylkit

In [39]:
!cat ./scripts/mr3x.awk
#!/usr/bin/awk -f

!awk {if ($8 >= 3) print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12}
In [40]:
!cat ./scripts/mr_gg.awk.sh
#!/usr/bin/awk -f

BEGIN{ print "chr.Base\tchr\tbase\tstrand\tcoverage\tfreqC\tfreqT" }
{
	if ($3 == "+") {
		strand="F"
 	} else {
		strand="R"
	}

	FC=($7/$8)*100
	FT=(1-($7/$8))*100
	chrbase=$1"."$2
	printf "%s\t%s\t%s\t%s\t%d\t%.2f\t%.2f\n",
		chrbase, $1, $2, strand, $8, FC, FT
}

In [23]:
for i in ("CgM1","CgT1D3","CgT1D5", "CgM3", "CgT3D3", "CgT3D5"):
    !echo {i}
    #!grep "[A-Z][A-Z]CG[A-Z]" <methratio_out_{i}.txt> methratio_out_{i}CG.txt
    !awk -f ./scripts/mr3x.awk methratio_out_{i}CG.txt > mr3x.{i}.txt
  # can delete !tr ' ' "\t" <mr3x.{i}.txt> mr3_{i}.txt
    !awk -f ./scripts/mr_gg.awk.sh mr3x.{i}.txt > mkfmt_{i}.txt
CgM1
CgT1D3
CgT1D5
CgM3
CgT3D3
CgT3D5

Methylkit

In [24]:
%pylab inline
Populating the interactive namespace from numpy and matplotlib

In [25]:
%load_ext rpy2.ipython
In [26]:
%R library(methylKit)
Out[26]:
<StrVector - Python:0x101e61440 / R:0x10df9b148>
[str, str, str, ..., str, str, str]
In [27]:
%R library(data.table)
data.table 1.9.2  For help type: help("data.table")

In [28]:
%R library(GenomicRanges)
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following object is masked from ‘package:stats’:

    xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, as.vector, cbind, colnames,
    duplicated, eval, evalq, Filter, Find, get, intersect, is.unsorted,
    lapply, Map, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, Position, rank, rbind, Reduce, rep.int, rownames,
    sapply, setdiff, sort, table, tapply, union, unique, unlist

Loading required package: IRanges
Loading required package: XVector

Attaching package: ‘GenomicRanges’

The following object is masked from ‘package:data.table’:

    last


In [29]:
ls mkfmt*
mkfmt_CgM1.txt    mkfmt_CgM3.txt    mkfmt_CgT1D3.txt  mkfmt_CgT1D5.txt  mkfmt_CgT3D3.txt  mkfmt_CgT3D5.txt
mkfmt_CgM1txt     mkfmt_CgM3txt     mkfmt_CgT1D3txt   mkfmt_CgT1D5txt   mkfmt_CgT3D3txt   mkfmt_CgT3D5txt

In [34]:
%%R file.list <- list 
('mkfmt_CgM1.txt',
 'mkfmt_CgT1D3.txt',
 'mkfmt_CgT1D5.txt',
 'mkfmt_CgM3.txt',
 'mkfmt_CgT3D3.txt',
 'mkfmt_CgT3D5.txt'
)
In [37]:
%R myobj=read(file.list,sample.id=list("1_sperm","1_72hpf","1_120hpf","2_sperm","2_72hpf","2_120hpf"),assembly="v9",treatment=c(0,0,0,1,1,1))
Out[37]:
<ListVector - Python:0x10ad4cea8 / R:0x111945910>
[ListV..., ListV..., ListV..., ListV..., ListV..., ListV...]
<ListVector - Python:0x10ad4cea8 / R:0x111945910>
[ListV..., ListV..., ListV..., ListV..., ListV..., ListV...]
<ListVector - Python:0x10ad4cea8 / R:0x111945910>
[ListV..., ListV..., ListV..., ListV..., ListV..., ListV...]
<ListVector - Python:0x10ad4cea8 / R:0x111945910>
[ListV..., ListV..., ListV..., ListV..., ListV..., ListV...]
<ListVector - Python:0x10ad4cea8 / R:0x111945910>
[ListV..., ListV..., ListV..., ListV..., ListV..., ListV...]
<ListVector - Python:0x10ad4cea8 / R:0x111945910>
[ListV..., ListV..., ListV..., ListV..., ListV..., ListV...]
<ListVector - Python:0x10ad4cea8 / R:0x111945910>
[ListV..., ListV..., ListV..., ListV..., ListV..., ListV...]
In [38]:
%%R
meth<-unite(myobj)
head(meth)
nrow(meth)
getCorrelation(meth,plot=T)
hc<- clusterSamples(meth, dist="correlation", method="ward", plot=T)
PCA<-PCASamples(meth)
           1_sperm   1_72hpf  1_120hpf   2_sperm   2_72hpf  2_120hpf
1_sperm  1.0000000 0.8206750 0.8113192 0.7849752 0.7860873 0.7850139
1_72hpf  0.8206750 1.0000000 0.8107486 0.8127752 0.8181483 0.8197261
1_120hpf 0.8113192 0.8107486 1.0000000 0.8055833 0.8133956 0.8110224
2_sperm  0.7849752 0.8127752 0.8055833 1.0000000 0.8652725 0.8636885
2_72hpf  0.7860873 0.8181483 0.8133956 0.8652725 1.0000000 0.8623747
2_120hpf 0.7850139 0.8197261 0.8110224 0.8636885 0.8623747 1.0000000

In []: