snmC-seq2 is an improved technique for single nucleus methylome sequencing. The code used for the manuscript is in this repository.
The scirpt allc2mat.new.py is for calculating bin/gene level methylation ratio. It can be used as
python allc2mat.new.py allc_sample.tsv.gz #cpus regions.bed
It requires the bed file to be sorted, and allc file need to be put in the same directory with allc index file. The output of allc2mat.new.py includes the following two files.
each rows is a region from the input bed file
each columns are
-
mCH basecalls
-
CH basecalls
-
mCH/CH ratio
-
mCG basecalls
-
CG basecalls
-
mCG/CG ratio
each columns are
-
sample name
-
global mCCC basecalls
-
global CCC basecalls
-
global mCH basecalls
-
global CH basecalls
-
global mCG basecalls
-
global CG basecalls
-
global mCCC/CCC ratio
-
global mCH/CH ratio
-
global mCG/CG ratio
Code for clustering and visualization of gene level mCH ratio is in analysis.py, which takes the cell x bin/gene matrix of methylation level as input.