-
Notifications
You must be signed in to change notification settings - Fork 51
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
Issue with cooltools.api.snipping.pileup() compatibility with bioframe/core/construction.py", line 150 #462
Comments
not quite clear what is going on here-- can you:
thanks! |
Hi, I was able to get the pileup to work after making a view_df with cooltools on genomic elements that are not CTCF, but when I do use CTCF, I always get the error
I tried clustering the CTCF sites by the resolution, but the error persisted |
views are generally used for specifying things like chromosomes or chromosome arms-- see cell [7] of the tutorial: https://cooltools.readthedocs.io/en/latest/notebooks/pileup_CTCF.html its not clear what your ctcf data frame is: does it have chrom, start, end, as in the tutorial? |
Yes, it does. File /data/bianchiah/mymamba/envs/mambamatrix2/lib/python3.8/site-packages/cooltools/api/snipping.py:986, in pileup(clr, features_df, view_df, expected_df, expected_value_col, flank, min_diag, clr_weight_name, nproc) File /data/bianchiah/mymamba/envs/mambamatrix2/lib/python3.8/site-packages/cooltools/api/snipping.py:275, in _pileup(features, data_select, data_snip, map) IndexError: boolean index did not match indexed array along dimension 0; dimension is 121 but corresponding boolean dimension is 4 |
I wonder if some of your snips are going out of bounds-- perhaps you can check if all of your sites are greater than the flank distance from chromosome starts/ends? |
Hi There,
I am attempting to call cooltools.api.snipping.pileup(clr,features_df=peak_df , flank=300_000), where :
peak_df = pd.read_csv(f"ctcf.enhancer.promoters/{peak}.bed", sep="\t", names=['chrom', "start", "end"]), as per the cooltools feature_df requirements. I am not passing in a view_df, but when the API attempts to construct one, I get an error :
File "conda/envs/matrix/lib/python3.8/site-packages/bioframe/core/construction.py", line 229, in make_viewframe
view_df = from_any(regions, name_col=view_name_col, cols=cols)
File "conda/envs/matrix/lib/python3.8/site-packages/bioframe/core/construction.py", line 150, in from_any
raise ValueError(f"Unknown input format: {type(regions)}")
ValueError: Unknown input format: <class 'NoneType'>
The text was updated successfully, but these errors were encountered: