dozmorovlab / TADCompare

Package for analysis and characterization of differential TADs
https://dozmorovlab.github.io/TADCompare/
Other
22 stars 2 forks source link

Using the internal TAD caller of TADCompare on a single sample #23

Open TeiturAK opened 2 weeks ago

TeiturAK commented 2 weeks ago

Hi,

Thank you for this great and simple tool!

I'm working with non-human data that which we have found many TAD callers seem to have a high false positive rate on - judging from how it adds up visually in a genome browser with the actual arrowheads. The internal TAD caller of TADCompare has however seemingly performed well - but, for our analysis we also want to do single sample analysis as we dot not have the same resolution for all our conditions.

So, I am wondering how to go about using TADCompares internal TAD calling algorithm on a single HiC matrix. Intuitively it seems that it would not be harder than just using one matrix as input for both "conditions", but if there is an intended way of running the TAD calling algorithm on just one sample I would of course rather just do that.

Best Teitur

mdozmorov commented 2 weeks ago

Hi Teitur, use our SpectralTAD caller, https://bioconductor.org/packages/SpectralTAD/. We continue using it, it performs well, most recent benchark is in Xu, Jingxuan. “A Comprehensive Benchmarking with Interpretation and Operational Guidance for the Hierarchy of Topologically Associating Domains.” Nature Communications, 2024. https://doi.org/10.1038/s41467-024-48593-7

TeiturAK commented 2 weeks ago

We have been testing SpectalTAD on our data, but not gotten the clear functional signature at the borders that is expected even though we have been testing running it with multiple different settings. Perhaps it is due to the organism we are working with.

The borders identified with the internal TAD caller of TADCompare has given a clear biological signal, that is why we are interested in using it for more than its comparative function.

mdozmorov commented 2 weeks ago

The backbone of TADcompare is the same SpectralTAD algorithm. TADcompare detects differences and they may have relevant biological signature. For SpectralTAD, you may play with its parameters. For human, we use the following:

  # SpectralTAD settings
  qual_filter = TRUE; z_clust = TRUE # Silhouette score filtering
  # qual_filter = FALSE; z_clust = TRUE # Z-score filtering
  # qual_filter = FALSE; z_clust = FALSE # Mixed filtering
  max_tad_size <- 2000000; window_size <- max_tad_size / resolution
  gap_threshold <- 0.8
TeiturAK commented 1 week ago

I understand, but we have gotten drastically different output from comparing regions called with spectralTAD to those called and compared within TADCompare. The majority of the boundaries will be labelled as "complex" when the comparison is done on TADs called with SpectralTAD but will be "unchanged" when when we run TADCompare directly. The latter result is more in line with the other data we have to investigate what happens with the chromatin at the borders.

If it's essentially the SpectralTAD calling algorithm used internally by TADCompare I'm really lost at what could explain this discrepancy. I've been trying to run SpectralTAD with multiple different settings.