Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triangle fails to plot some off-diagonal contacts #32

Open
auberginekenobi opened this issue Apr 21, 2022 · 3 comments
Open

Triangle fails to plot some off-diagonal contacts #32

auberginekenobi opened this issue Apr 21, 2022 · 3 comments
Labels
good first issue Good for newcomers

Comments

@auberginekenobi
Copy link

Possibly related to #6 (comment) . I successfully called neoloops in my sample using neoloop-caller. Adapting code from this repo's readme, I generated a Triangle plot of my region of interest, which consists of multiple segments of chr8 and chr14:

D458_10k_CNV

Two boxes at the apex of the Triangle are devoid of any Hi-C signal, even though neoloop-caller was able to identify loops in these regions. Looking at the Hi-C map of the locus in Juicebox, I see comparable interaction frequency with chr8 across the two segments of chr14:

juicebox_screenshot

Therefore, my conclusion is that Triangle is failing to plot the off-diagonal Hi-C signal for some SV segment pairs? Any guidance on this issue would be appreciated.

@XiaoTaoWang
Copy link
Owner

Hi, sorry for not making this clearer in the documentation. By default, the plot_loops method perform a pooling algorithm on the input loop calls and only plot the strongest dots if multiple dots cluster in a local area. To switch this option off, just set the parameter "cluster" to "False" when you run plot_loops. Something like this:

>>> vis.plot_loops('K562.neo-loops.txt', face_color='none', marker_size=40, cluster=False)

Let me know if this works. Thanks!

@auberginekenobi
Copy link
Author

Hi Xiaotao, thanks for the response and for this clarification, but I don't think it addresses the issue. I'm quite happy with the neoloop calls; these are far superior to FitHiC or HiCCUPS around this SV. However, the underlying Hi-C contact map seems to have gaps. Note that in the Triangle plot, the red Hi-C signal is entirely absent between the two segments containing MYC and OTX2. However, in the Juicebox visualization, it is quite clear that the red Hi-C signal is comparable in this region to adjacent regions.

@XiaoTaoWang
Copy link
Owner

Oh. NeoLoopFinder does have a procedure to automatically adjust the scale of Hi-C signals between different fragments, based on a regression model. If you prefer plotting the original signals, you can manually set the scale factor to 1 when you initialize the Triangle object. In your case, the command will be something like this:

>>> vis = Triangle(clr, assembly, n_rows=3, figsize=(7, 4.2), track_partition=[5, 0.4, 0.5], correct='sweight', slopes={(0,0):1, (1,1):1, (2,2):1, (3,3):1, (0,1):1, (0,2):1, (0,3):1, (1,2):1, (1,3):1, (2,3):1})

Note that in this mode, you need to specify a value (in this case 1) to each pair of the fragments in the assembly, and the index of the fragment starts from 0.

@XiaoTaoWang XiaoTaoWang added the good first issue Good for newcomers label Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants