STOmics / SAW

GNU General Public License v3.0
145 stars 34 forks source link

How to get bin1 coordinates of bin50 region? #165

Open tenlives opened 1 week ago

tenlives commented 1 week ago

Hi, thanks for this great tool! I got gef files by SAW, I want to use bin50 files for downstream analysis, how can I get bin50 GEM files with bin50 ID and bin1 coordinates like cellbin.gem files with CellID and bin1 coordinates? Thank you!

Clouate commented 1 week ago

Hi, if you're using SAW v7, you could run singularity exec SAW.sif cellCut view -i input.gef -o output.gem -b 50 to get the bin50 gem file. if it is SAW v8, saw convert gef2gem --gef C04042E2.raw.gef --gem bin50.gem --bin-size 50

However, in SquareBin analysis, there is no bin50 ID column. You could use the bin50 coordinates as the ID of each bin50. At the same time, you could change the binsize parameter of the above command to get the bin1 coordinates corresponding to bin50. For example, for bin1 coordinates x, y, the corresponding bin50 coordinates are x//50*50, y//50*50