Ns126:Calendar/NOTES/2015-8-31

From ZhangLabWiki
Revision as of 01:03, 23 October 2015 by >Shicheng (→‎methyhaplotype to matrix)
Jump to navigation Jump to search


Compare methylation haplotype region with Hic Data

  • liftover epigenetic annotation from hg18 to hg19
./liftOver Hic.topological.domain.hESC.hg18.bed hg18ToHg19.over.chain Hic.topological.domain.hESC.hg19.bed tmp
./liftOver Hic.topological.domain.IMR90.hg18.bed  hg18ToHg19.over.chain Hic.topological.domain.IMR90.hg19.bed tmp
./liftOver Hic.boundary.IMR90.hg18.bed hg18ToHg19.over.chain Hic.boundary.IMR90.hg19.bed tmp
./liftOver Hic.boundary.hESC.hg18.bed hg18ToHg19.over.chain Hic.boundary.hESC.hg19.bed tmp
./liftOver Hic.common.boundary.hESC.IMR90.hg18.bed hg18ToHg19.over.chain Hic.common.boundary.hESC.IMR90.hg19.bed tmp
/home/sguo/monod/phase2/high.gsi.genome.cor.txt


Compare the cluster analysis with raw methylation signal

Achieve raw methylFreq files

  • I found the overlapped CpG sites between methylation haplotype and raw methylFreq (depth>5) was only 49. The reason when we calculate the methylation haplotype we did not get rid of low coverage reads. Therefore, I need collect the raw methylation methylFreq file and merage them again without low coverage reads discarding.
  • After discussing with Dinh, the methylFreq files of 106 samples were collected (10 N37, 36 Salk, 57 MONOD and 3 Heyn2013Age)
  • 651 CpG sites were found overlapped with 180 high GSI methylation haplotype regions. among them, 35 sites were found have more than 30% missing value and then were filtered in the further analysis.
  • the heatmap based on raw methylation signals were as the following(right). File:Heatmap.RawSignal.High.GSI.R.txt

File:GSI.RRBS.BSPP.WGBS.RawSignal.png

Comare MHL and Average methylation level

  • Bam to methyhaplotype
  • I found a problem, I do not know why non-CG would occur in methyhplot and why position would occur multiple time. You can try the following command:
grep chr6:53658269-53659397 /home/kunzhang/CpgMIP/MONOD/Data/150209_SN216/BSPP/mld_block_stringent_hapInfo/NC-23.WGBS_BSPP.mld_blocks_r2-0.5.hapInfo.txt


cd /home/kunzhang/CpgMIP/MONOD/Data/1407-combined_RRBS/mld_blocks_stringent_hapInfo 
head 6-P-10.mld_blocks_r2-0.5.hapInfo.txt
chr10:100027865-100027869    TTT    2    100027865,100027867,100027869
chr10:100027897-100027992    TTTTT    17    100027957,100027961,100027981,100027988,100027992
chr10:100027897-100027992    GTTTT    1    100027927,100027930,100027938,100027944,100027957
chr10:100027897-100027992    TTTTTTTTT    15 100027908,100027918,100027922,100027925,100027927,100027930,100027938,100027944,100027957
chr10:100027897-100027992    TTT    2    100027897,100027899,100027908
chr10:100174838-100174961    TTT    2    100174838,100174852,100174875
chr10:100227297-100227560    TTTTT    10    100227438,100227445,100227449,100227466,100227488
chr10:100227297-100227560    TCTCT    1    100227438,100227445,100227449,100227466,100227488
chr10:100227297-100227560    TTTT    4    100227445,100227449,100227466,100227488
chr10:100227297-100227560    TTTTC    1    100227438,100227445,100227449,100227466,100227488
cd /media/Ext12T/DD_Ext12T/RRBS_MONOD/Bam_Merged/ 
samtools view 6-P-10.merged.bam chr10:100027865-100027869
cd /media/Ext12T/DD_Ext12T/RRBS_MONOD/Bam_Merged/ 
samtools view 6-P-1.merged.bam chr10:101089382-101089519 | less -S
cd /home/kunzhang/CpgMIP/MONOD/Data/1407-combined_RRBS/mld_blocks_stringent_hapInfo 
head

Update new MHL

Code and Data

Code: File:Get methHap load matrix 01Oct2015.txt
All WGBS data: /home/kunzhang/CpgMIP/MONOD/Data/WGBS_data/mld_block_hapInfo_July2015/All_chromosomes_combined/WGBS_methHap_load_matrix_Oct2015.txt
All RRBS data:/home/kunzhang/CpgMIP/MONOD/Data/1407-combined_RRBS/mld_blocks_hapInfo_July2015/RRBS_methHap_load_matrix_Oct2015.txt
All WGBS-SeqCap data: /home/kunzhang/CpgMIP/MONOD/Data/150209_SN216/SeqCap/mld_blocks_July2015/WGBS_SeqCap_methHap_load_matrix_Oct2015.txt
  • methylation block regions (bed files for each chrosome and complete regions)
/home/k4zhang/my_oasis_tscc/MONOD/All_WGBS_pooled/WGBS_pooled_mappable_bins.all_autosomes.mld_blocks_r2-0.5.bed
/home/k4zhang/my_oasis_tscc/MONOD/All_WGBS_pooled/WGBS_pooled_mappable_bins.chr*.mld_blocks_r2-0.5.bed
  • specific loop in the pbs script
cd /oasis/tscc/scratch/k4zhang/MONOD/hESC_WGBS
/home/k4zhang/bin/mergedBam2hapInfo_WGBS_25Jun15.pl /home/k4zhang/my_oasis_tscc/MONOD/All_WGBS_pooled/WGBS_pooled_mappable_bins.chr2.mld_blocks_r2-0.5.bed  /home/k4zhang/my_oasis_tscc/MONOD/hESC_WGBS/BAMfiles/methylC-seq_h1_r2.chr2.rmdup.bam > methylC-seq_h1_r2.chr2.hapInfo.txt
cd /oasis/tscc/scratch/k4zhang/MONOD/Ecker_Tissue_WGBS
/home/k4zhang/bin/mergedBam2hapInfo_WGBS_25Jun15.pl /home/k4zhang/my_oasis_tscc/MONOD/All_WGBS_pooled/WGBS_pooled_mappable_bins.chr10.mld_blocks_r2-0.5.bed  /home/k4zhang/my_oasis_tscc/MONOD/Ecker_Tissue_WGBS/BAMfiles/STL001BL-01.chr10.sorted.clipped.bam > STL001BL-01.chr10.hapInfo.txt
cd /oasis/tscc/scratch/k4zhang/MONOD/N37_WGBS
/home/k4zhang/bin/mergedBam2hapInfo_WGBS_25Jun15.pl /home/k4zhang/my_oasis_tscc/MONOD/All_WGBS_pooled/WGBS_pooled_mappable_bins.chrX.mld_blocks_r2-0.5.bed  /home/k4zhang/my_oasis_tscc/MONOD/N37_WGBS/BAMfiles/Indx22.chrX.rmdup.bam > N37-Stomach.chrX.hapInfo.txt
cd /oasis/tscc/scratch/k4zhang/MONOD/tumor_WGBS
/home/k4zhang/bin/mergedBam2hapInfo_WGBS_25Jun15.pl /home/k4zhang/my_oasis_tscc/MONOD/All_WGBS_pooled/WGBS_pooled_mappable_bins.chr8.mld_blocks_r2-0.5.bed  /home/k4zhang/my_oasis_tscc/MONOD/tumor_WGBS/BAMfiles/HCT116.chr8.sorted.clipped.bam > HCT116.chr8.hapInfo.txt
  • the summarized samples are as the following:
/home/k4zhang/my_oasis_tscc/MONOD/All_WGBS_pooled/WGBS_pooled_mappable_bins.chr1.mld_blocks_r2-0.5.bed
/home/k4zhang/my_oasis_tscc/MONOD/N37_WGBS/N37_10_tissue_sampleInfo_WGBS-pooled-mld-blocks.txt
/home/k4zhang/my_oasis_tscc/MONOD/tumor_WGBS/tumor_WGBS_sample_info_WGBS-pooled-mld-blocks.txt
/home/k4zhang/my_oasis_tscc/MONOD/hESC_WGBS/H1ESC_sampleInfo_WGBS-pooled-mld-blocks.txt
/home/k4zhang/my_oasis_tscc/MONOD/RRBS_merge/1407_RRBS_merbed_sampleInfo__WGBS-pooled-mld-blocks.txt
/home/k4zhang/my_oasis_tscc/MONOD/SeqCap/WGBS_SeqCap_plasma_sample_info.txt
/home/k4zhang/my_oasis_tscc/MONOD/whole_blood_WGBS/TSCC_whole_blood_WGBS_sampleInfo_WGBS-pooled-mld-blocks.txt
/home/k4zhang/my_oasis_tscc/MONOD/Ecker_Tissue_WGBS/Ecker_Tissue_WGBS_sampleInfo_WGBS-pooled-mld-blocks.txt
/home/k4zhang/my_oasis_tscc/MONOD/WGBS_BSPP/WGBS_BSPP_sample_info.txt    # remember to delete \n before use
cp /home/k4zhang/my_oasis_tscc/MONOD/All_WGBS_pooled/WGBS_pooled_mappable_bins.chr1.mld_blocks_r2-0.5.bed /home/shg047/monod/haplo 
cp /home/k4zhang/my_oasis_tscc/MONOD/N37_WGBS/N37_10_tissue_sampleInfo_WGBS-pooled-mld-blocks.txt /home/shg047/monod/haplo 
cp /home/k4zhang/my_oasis_tscc/MONOD/tumor_WGBS/tumor_WGBS_sample_info_WGBS-pooled-mld-blocks.txt /home/shg047/monod/haplo
cp /home/k4zhang/my_oasis_tscc/MONOD/hESC_WGBS/H1ESC_sampleInfo_WGBS-pooled-mld-blocks.txt /home/shg047/monod/haplo
cp /home/k4zhang/my_oasis_tscc/MONOD/RRBS_merge/1407_RRBS_merbed_sampleInfo__WGBS-pooled-mld-blocks.txt /home/shg047/monod/haplo
cp /home/k4zhang/my_oasis_tscc/MONOD/SeqCap/WGBS_SeqCap_plasma_sample_info.txt /home/shg047/monod/haplo
cp /home/k4zhang/my_oasis_tscc/MONOD/Ecker_Tissue_WGBS/Ecker_Tissue_WGBS_sampleInfo_WGBS-pooled-mld-blocks.txt /home/shg047/monod/haplo
cp /home/k4zhang/my_oasis_tscc/MONOD/whole_blood_WGBS/TSCC_whole_blood_WGBS_sampleInfo_WGBS-pooled-mld-blocks.txt /home/shg047/monod/haplo
cp /home/k4zhang/my_oasis_tscc/MONOD/WGBS_BSPP/WGBS_BSPP_sample_info.txt /home/shg047/monod/haplo
perl -p -i -e 's/MONOD\n/MONOD/g' WGBS_BSPP_sample_info.txt


methyhaplotype to matrix

  • transfer haplotype result (per chrosome per sample) to genome miner
  • methylation haplotype load (mhl) matrix
cp /home/kunzhang/CpgMIP/MONOD/Data/WGBS_data/mld_block_hapInfo_July2015/All_chromosomes_combined/WGBS_methHap_load_matrix_Oct2015.txt /home/shg047/monod/oct/data/
cp /home/kunzhang/CpgMIP/MONOD/Data/1407-combined_RRBS/mld_blocks_hapInfo_July2015/RRBS_methHap_load_matrix_Oct2015.txt /home/shg047/monod/oct/data/
cp /home/kunzhang/CpgMIP/MONOD/Data/150209_SN216/SeqCap/mld_blocks_July2015/WGBS_SeqCap_methHap_load_matrix_Oct2015.txt  /home/shg047/monod/oct/data/
  • extract absolute methylation levels within above regions(one value in each regions)
  • Bam files: ESC, Ecker, N37, age, Plasma were in the TSCC center
/home/k4zhang/my_oasis_tscc/MONOD/hESC_WGBS/BAMfiles/
/home/k4zhang/my_oasis_tscc/MONOD/Ecker_Tissue_WGBS/BAMfiles
/home/k4zhang/my_oasis_tscc/MONOD/N37_WGBS/BAMfiles
/home/k4zhang/my_oasis_tscc/MONOD/whole_blood_WGBS/BAMfiles/
/home/k4zhang/my_oasis_tscc/MONOD/tumor_WGBS/BAMfiles/
* chr17:16955467-16955609 in Colon_primary_tumor.chr17.sorted.clipped.bam
samtools tview -p chr17:16955467 /home/k4zhang/my_oasis_tscc/MONOD/tumor_WGBS/BAMfiles/Colon_primary_tumor.chr17.sorted.clipped.bam  /home/shg047/db/hg19.fa
* chr11:110910907-110910951 in middle-age.chr11.rmdup.bam
samtools tview -p chr11:110910907 /home/k4zhang/my_oasis_tscc/MONOD/whole_blood_WGBS/BAMfiles/middle-age.chr11.rmdup.bam /home/shg047/db/hg19.fa
* grep chr11:110910907-110910951 in hapInfo files of middle-age.chr11.hapInfo.txt
grep chr11:110910907-110910951 /home/kunzhang/CpgMIP/MONOD/Data/WGBS_data/mld_block_hapInfo_July2015/by_chrosomes/middle-age.chr11.hapInfo.txt
grep chr11:110910907-110910951  /home/shg047/monod/hap/wgbs/All_chromosomes_combined/WB_middle-age.all_chrs.hapInfo.txt