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

[Q] Centromere Trans Pileup #157

Open
LucasMcNU opened this issue Oct 29, 2024 · 2 comments
Open

[Q] Centromere Trans Pileup #157

LucasMcNU opened this issue Oct 29, 2024 · 2 comments

Comments

@LucasMcNU
Copy link

LucasMcNU commented Oct 29, 2024

Hi all,
I was wondering if it's possible to reproduce the trans centromeric pileup plots from Figure 1b in this paper with Coolpup. I tried with our data (<5kb resolution, human cells) and it seems that the paucity of contacts at the centromeres from repeat mapping exclusion makes those regions difficult to analyze using pileups (my guess).

I used the centromere/pericentromeric coordinates for hg38 on UCSC. I tried rescaling and plotting the raw pileup, in addition to adding a flanking region. Here is an example of a result:

MB_80kb_trans_cent_pileup

produced with this code (as an example, i've tried a few different things):

condA=MB
res=5
threads=12

coolA=/projects/b1103/HIC_Macquarrie/Lucas/merged_cools/${condA}/${condA}_${res}kb_merged_filt.cool
expA=/projects/b1103/HIC_Macquarrie/Lucas/merged_cools/${condA}/contacts/${condA}.expected.trans.${res}kb.tsv
out_fileA=/projects/b1103/HIC_Macquarrie/Lucas/merged_cools/${condA}/contacts/

dir_ann=/projects/b1103/HIC_Macquarrie/Lucas/annotation/
dir_res=/projects/b1103/HIC_Macquarrie/Lucas/loops/

coolpup.py --nproc $threads $coolA ${dir_ann}mb_centromere_chr2.bed --features_format bedpe --expected $expA rescale --rescale_flank 5000000 --rescale_size 99 --trans --outname ${out_fileA}${condA}_5kb_trans_cent_pileup.clpy
plotpup.py --input_pups ${out_fileA}${condA}_5kb_trans_cent_pileup.clpy --plot_ticks --output ${out_fileA}${condA}_5kb_trans_cent_pileup.png
@LucasMcNU LucasMcNU changed the title Centromere Trans Pileup [Q] Centromere Trans Pileup Oct 29, 2024
@Phlya
Copy link
Member

Phlya commented Oct 29, 2024

This should be totally possible, but the figure in question shows, from what I understand, whole chromosome-chromosome pileups. So with pileups it's a little tricky, since the positions of centromeres vary across chromosomes... You have to create rescaled pileups separately for all arm-arm interactions, and then put them together manually into one matrix. I think this is what was done in the paper, just not using coolpup.py, but @agalitsyna maybe can correct me here.

Probably you can use saddle plots from cooltools instead, might be easier... If you create an artificial track with the coordinate relative to centromere-telomere distance, and use it instead of the eigenvector there.

@LucasMcNU
Copy link
Author

so if I understand right, the centromeric pileups were generated by piling up entire arms separately and then averaging individual pileups for each arm in a single matrix? They used cooltools for that particular plot. I'd love to hear more from @agalitsyna if possible. I've seen some examples of telomeric trans pileups for coolpuppy but has anyone done something similar for centromeres? Thank you again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants