DNA Methylation at Various Genic Structure Regions

Again, we use intersectBed and groupBy commands to calculate the average methylation values at each designated region.

Intergenic Regions

# Console output

# intersectBed 
chr1    0       1736    chr1    468     469     0
chr1    0       1736    chr1    470     471     0.666667
chr1    0       1736    chr1    483     484     0.5
chr1    0       1736    chr1    488     489     1
chr1    0       1736    chr1    492     493     0.857143

# groupBy
chr1    0       1736    97      0.19548
chr1    20972   24416   27      0
chr1    25944   42911   148     0.10567
chr1    44799   52810   39      0.56999
chr1    53750   58917   21      0.22781
cd ~/

bsub -q 16G -o stdout -e stderr "intersectBed -a Data/gencode.v3c.intergenic.bed.gz -b /work3/NRPB1219/hg18_h1_meth.bedGraph -wa -wb | groupBy -i - -g 1-3 -c 7,7 -o count,mean | awk -F $'\t' 'BEGIN { OFS=FS } { print \$1,\$2,\$3,\$4,sprintf(\"%.4f\",\$5) }' > Output/gencode.v3c.intergenic.h1.meth"

bsub -q 16G -o stdout -e stderr "intersectBed -a Data/gencode.v3c.intergenic.bed.gz -b /work3/NRPB1219/hg18_imr90_meth.bedGraph -wa -wb | groupBy -i - -g 1-3 -c 7,7 -o count,mean | awk -F $'\t' 'BEGIN { OFS=FS } { print \$1,\$2,\$3,\$4,sprintf(\"%.4f\",\$5) }' > Output/gencode.v3c.intergenic.imr90.meth"

Merged Promoter Regions

Merged Exonic Regions

Intronic Regions

UTR Regions

Check output files

Use bjobs to check the all jobs have completed and ls to check the files was in the "Output" folder.

ls -la ~/Output/gencode.v3c.*

Last updated

Was this helpful?