-
Notifications
You must be signed in to change notification settings - Fork 12
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
Pileup for telomeres concerning trans chromosomal interactions #150
Comments
Please provide more details - what have you tried, what were the results? |
I tried using cooltools, but not sure how to proceed with coolpuppy. Here is my code:
Read telomere coordinates:
I tried doing this to generate aggregate plot for off-diagonal pileup, as documented here: https://cooltools.readthedocs.io/en/latest/notebooks/pileup_CTCF.html But as I could not get the plot, I went through issues of cooltools so as to raise a new issue (open2c/cooltools#491) and was redirected to coolpuppy from open2c/cooltools#491 (comment) Hence, I went through the docs of https://coolpuppy.readthedocs.io/en/latest/Examples/Walkthrough_API.html#trans-inter-chromosomal-pileups, but I am still not sure how to plot for telomeric regions. |
Well, since your regions are on the edge of the chromosome, you need to basically just pileup all chromosome starts. So You can create a bed file with the first e.g. 100 kbp regions of each chromosome Then use coolpup.py pileup with --trans and without rescaling. |
Apologies if I sound naive, but how to create the bed file? |
It's a simple tab-delimited file with three columns (chrom, start, end). You can use pandas, a text editor, or a spreadsheet editor. |
Or you can keep using the python API, then you can modify the tel_yeast dataframe |
So I need to just save the telomere coordinates as a bed file and input that along with my mcool file to coolpup.py pileup to get the plot using command line? |
This is how the sacCer3_cens data looks like:
|
Sort of - actually there is a trick... you have to provide a file that is shifted by a certain distance from the end of the chromosome (e.g. 100 kb), and use the same distance as the --flank argument. And use |
Should I input the same coordinates for all chromosomes or change according to the chromosome? For eg.,
|
Before you showed coordinates that were all very small and close to 0, why are they much bigger now? |
These are centromeric coordinates.
I showed the left arm telomeric coordinates at the start of my post
|
But you want to pileup telomeres? |
Yes. I want the pileup for telomeres of both left and right arms of the chromosomes. But to plot, I am only doing with left arm first. |
Yeah then just pileup around a fixed distance shifted from 0, e.g. 100 kb or smth... I'm not familiar with yeast data, not sure what would be the best distance. Then you can pileup the right ones the same way, shift from the end of each chromosome by a fixed distance |
I am getting the following error:
The file expected_trans.tsv contains the following:
And the shifted_tels.bed has the following coordinates:
|
I computed the trans expected and reran the command. But still the same error: This is the trans file output:
Error:
My mistake, I reran the command with proper file and it worked, but when I ran plotpup.py, it says there are nans or zero values present:
|
/usr/lib/python3/dist-packages/scipy/init.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.26.4 I wonder whether it can cause issues... Can you share the shifted_tels.bed file? |
I will try and upgrade numpy version. |
I downgraded numpy version but still no windows were generated, and thank you so much taking time out in helping me solve my query Phlya!! |
You have starts set to 9000, but it should be 90000. |
As an alternative, you can set start to 0, end to e.g. 99,000, and then use --rescale --rescale-size 99 --rescale-flank 0 |
Okay, I tried by changing the 9000 to 90000 and I did get two plots (attached herewith), I will try the second method and let you know, thanks again!! |
Perfect! No need to try the other method if this worked IMO, the first one should be faster and maybe a little more precise. |
Okay, thanks a lot, I will need to do a bit of trial and error for understanding if I am doing the analysis correctly, but I understood the approach. Have a great day ahead, I am closing this issue for now, if I have any further queries I will reopen this, hope that is fine with you!! |
@Brahmandam-Gayatri Hi Gayatri, did you figured this out. I am also having the same issue with the telomeric coordinates of yeast, instead of signal being aggregated at the centre, its aggregated at the corner like this: Thanks! |
Hello,
Thank you for developing coolpuppy for pileup analysis. I want to plot an aggregate heatmap for yeast data using telomeric coordinates and I am unable to do so.
chrom start end
chrIX 1 7784
chrV 1 6473
chrXIII 1 6344
chrXVI 1 7223
chrIII 1 1098
chrVI 1 5530
chrXII 1 12085
chrVIII 1 5505
chrXV 1 847
chrII 1 6608
chrXIV 1 7428
chrI 1 801
chrVII 1 781
chrX 1 7767
chrXI 1 807
chrIV 1 904
In general, the plot looks similar to the aggregate plot of centromeres, but here the aggregate signal is observed at the corners in place of center. Any suggestions are highly appreciated!!
The text was updated successfully, but these errors were encountered: