Comments (8)
Thanks, chromosome selection took also long time but finally worked!
Also, thank you for suggesting another solution.
from chromosight.
Hi,
Indeed, this point and click mode is pretty memory heavy with large genomes, but your usage is correct.
One of the advice would be to use a lower resolution to reduce the size of the matrix, but I realize this is often not desirable.
I have just released a patch (v0.6.0) with an additional --chroms
option which allows you to specify a list of chromosomes. When you use it in point and click mode, it will load each submatrix sequentially, and use much less memory. If you are also interested in interchromosomal contacts, you can also add the --inter
flag. Example usage would be:
chromosight generate-config --click sample.cool --chroms chrom3,chrom5,chrom20 my_config
I'm happy to take any feedback or suggestion :)
Another solution would be to use an agglomerated matrix you generated with another method (e.g. using something like coolpup.py or custom scripts. You could even use a theoretical pattern, here is an example snippet to generate a basic stripe pattern:
import numpy as np
pattern_mat = np.zeros((17, 17))
pattern_mat[8, :] = 1.0
np.savetxt('pattern_stripe.txt', pattern_mat)
Then you could edit the "kernels" entry of your json config file to match the file name:
"kernels": [
"pattern_stripe.txt"
],
If you find a kernel that works well for your pattern, we would be happy to add it to the list of preconfigured kernels.
from chromosight.
Glad to know it worked !
In case that can be helpful, I have added two experimental kernel configurations stripes_left
and stripes_right
.
You should be able to use them by updating chromosight to v1.6.1 via pip.
Cheers,
from chromosight.
Great, thanks.
I will try and let you know the result.
from chromosight.
I tested it and found it works well. I have one question. What does the location of each dot mean? Is it marking the end of stripe?
Thanks.
from chromosight.
With stripes, the dots themselves do not have much meaning unfortunately. A dot represents a region of the matrix that looks especially like a stripe. Most of the time, there will be many dots aligned on a single stripe.
After detecting stripes_left
, here is one way you could extract stripes from dots:
import pandas as pd
from chromosight.utils.detection import remove_neighbours
df = pd.read_csv('stripes_left.tsv', sep='\t')
# stripes_left positions are defined by bin1, but bin2 is arbitrary.
# We set bin2 to bin1 so that stripes dots are on the diagonal at the base of the stripe
df[ 'bin2'] = df['bin1'].copy()
# Filter out dots too close to another dot with a higher score
keep_mask = remove_neighbours(df, win_size=4)
# In the filtered dataframe, chrom1, start1, end1 and bin1 give coordinates of the left stripes
df = df.loc[keep_mask, ]
With stripes_left
, points on the same stripe are aligned on the bin1
axis.
With stripes_right
, they're aligned on the bin2
axis. So for right_stripes
, coordinates of axis 2 are relevant and bin1 should be set to bin2 values.
from chromosight.
Thank you for your kind explanation!
from chromosight.
I'll be closing this for now but feel free to reopen if needed
from chromosight.
Related Issues (20)
- How to compare loops of Hi-C from different conditions like DEG in RNA-Seq? HOT 4
- Questions about resolution in loop json file HOT 2
- Chromosight for single-cell Hi-C HOT 8
- Different number of patterns for the same Hi-C matrix HOT 3
- How to evaluate the detected loops? HOT 4
- Different number of loops on GM12878 Hi-C map HOT 2
- chromosight detects hairpin, the numer is too large HOT 1
- Can chromosight detect loops based on restriction fragments level (1f, 2f, etc) HI-C matrix. HOT 2
- Bus error in chromosight quantify HOT 2
- How does Chromosight compute the Pearson correlation ? HOT 2
- Is there a way to use multiresolution .mcool files directly? HOT 1
- Where do these kernels come from? HOT 5
- Loop score calculation HOT 4
- Pattern = TAD? HOT 1
- Recommend parameters of borders detect HOT 1
- Tuning the parameters (perc-zero, perc-undetected, pearson) for a relatively small dataset HOT 2
- HicMatrix generated cool file not supported - possible solution HOT 6
- Handle variable bin size
- plots appear blurry
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chromosight.