timoast / sinto

Tools for single-cell data processing
https://timoast.github.io/sinto/
MIT License
118 stars 25 forks source link

Normalizing the signal - creating a bigwig #5

Closed gouthamatla closed 4 years ago

gouthamatla commented 4 years ago

Hi,

This is a very useful tool.

I am wondering what would be the best way to nomalize the data to visualize on UCSC genome browser. I saw that CoveragePlot in Signac considers total number of reads per clusters and the total number of cells per cluster. I would like to know whats the best way to get the scaling factor which then can be used to normalize the bedGraph file.

genomeCoverageBed -ibam cluster_bam.bam -bg | awk -v OFS="\t" '{ $4=$4*scaling_factor; print}' > cluster_bam.bg

Then use 'bedGraphToBigWig' to make a bigWig.

timoast commented 4 years ago

I suggest using deepTools bamCoverage and using the RPKM normalization option. You won't be able to recreate exactly the tracks that Signac produces just by using coverage from the bam file, but it should look similar.

gouthamatla commented 4 years ago

Thanks for the quick reply.