HYsxe / PRINT

32 stars 3 forks source link

get TF binding score for a specific base pair? #10

Closed maxdudek closed 1 year ago

maxdudek commented 1 year ago

Hi,

I understand that by default, getTFBS() will return TF binding scores for 10 bp bins. However, I would like to calculate a binding score for a single base pair, for example at a specific SNP. Is this possible with PRINT? Can I use a bin size of 1 bp?

Also, in general (not sure how easy this would be to implement) it would be nice if PRINT returned footprint scores or TF binding scores in a standard file format like bigWig, so that it would be easier to extract scores for specific coordinates (instead of having to search for the right chunk). I'm sure there's plenty of other things to implement first but just thought I'd throw this request out there because it'd be perfect for what I'm trying to do.

Thanks for your help!

HYsxe commented 1 year ago

Hi Max!

Yes! You might need to go to getTFBS.R and find the function getRegionTFBS and change the default value of the "tileSize" parameter from 10 to 1 (bp). This is good suggestion and I guess in the future we will allow the user to pass an argument to getTFBS.

You also brought up a very good point that having the scores in standard file format is helpful. You can take a look at our updated tutorial and see how you can load the scores into a RangedSummarizedExperiment object using the getTFBindingSE() function. Here you can get all the coordinates using the rowRanges() accessor function and get the site-by-pseudobulk score matrix using the assay() function.

Hope this helps!