reproducing "cis-interaction expectation .npy" data

86 views
Skip to first unread message

Hisashi Miura

unread,
Jun 25, 2022, 4:24:40 AM6/25/22
to Orca Users
Hi,
I would like to reproduce the "cis-interaction expectation .npy" data ("4DNFI643OYP9.rebinned.mcool.expected.res4000.npy")
by myself using the script (process_expectation.py) provided in orca git hub. I generated the input exp. data using .mcool file provided in orca packages & cooltools by the following commands (default commands in cooltool):

$ cooltools compute-expected -o 4DNFI9GMP2J8.rebinned.mcool.expected.res4000 ../resources/4DNFI9GMP2J8.rebinned.mcool::/resolutions/4000
$ cooltools compute-expected -t trans -o 4DNFI9GMP2J8.rebinned.mcool.expected.res4000.trans ../resources/4DNFI9GMP2J8.rebinned.mcool::/resolutions/4000

However, I did not get any results (i.e. empty .npy file) using these output files by process_expectation.py. I guess that do I need the option (i.e. --drop-diags 0) in "cooltools compute-expected" or compute the expectation file for each chromosomal arm by api? If you can provide us with the example script for generating these input files from .mcool, that would be great!

Best regard,
Hisashi

Jian Zhou

unread,
Jul 5, 2022, 12:04:10 AM7/5/22
to Orca Users
Hi Hisashi,

Sorry for late response. I am not receiving email notification from this user group for some reason and I am looking into that.

For your question, maybe you have already resolved it, but yes you need to use `--drop-diags 0` and that's the only option needed. I also use -p 32 to parallelize it but it should not be necessary.

Best,
Jian

Hisashi Miura

unread,
Jul 25, 2022, 10:08:58 PM7/25/22
to Orca Users
Hi Jian,
Thanks for the reply. I was able to reproduce the "cis-interaction expectation.npy" data by `--drop-diags 0`.
Bests,
Hisashi

2022年7月5日火曜日 13:04:10 UTC+9 jzh...@gmail.com:

Mesut Ünal

unread,
Apr 27, 2023, 5:55:10 PM4/27/23
to Orca Users
Hello Orca users,

I am currently experimenting with orca for my studies. I would like to train it with the data I have, so I follow the steps writing under train README. It looks like the commands you discuss here are deprecated.

I'm using cooltools version 0.5.4, and in this version `compute-expected` is changed to `expected-cis` and `-trans` commands. Now it doesn't have the `--drop-diags`, but instead `--ignore-diags` option. I tried the new commands with and without `--ignore-diags 0` option and got the exact same file without any `diags` column. This causes `KeyError: 'diag'` error in `process_expectation.py`  step as `expected.groupby(["diag"]).agg({"n_valid": "sum", "balanced.sum": "sum"})` line doesn't apply anymore. Is there an updated version of the python script? I'd appreciate your help.

P.S.: What pd.read_csv returns is as follows

1   region1 region2  dist  n_valid  count.sum  balanced.sum   count.avg  balanced.avg
0    chr1    chr1     0    54285        NaN           NaN         NaN           NaN
1    chr1    chr1     1    53806        NaN           NaN         NaN           NaN
2    chr1    chr1     2    53739  9314132.0   1762.522873  173.321647      0.032798
3    chr1    chr1     3    53699  5232769.0    988.150333   97.446303      0.018402
4    chr1    chr1     4    53673  3614801.0    679.551476   67.348592      0.012661

Best,
Mesut

Mesut Ünal

unread,
Apr 28, 2023, 12:53:43 PM4/28/23
to Orca Users
Hi again,

I go back to an older cooltools version from 2021 (v 0.4.1) which has the older command `compute-expected`, but I still see `Error: No such option: --drop-diags Did you mean --ignore-diags?` error. I'd appreciate a clarification.

Best,
Mesut

Jian Zhou

unread,
Apr 28, 2023, 4:44:46 PM4/28/23
to Mesut Ünal, Orca Users
HI Mesut,

It was --drop-diags in the earlier versions and I believe the option was changed to --ignore-diags, but i have not tested on newer versions.

Jian

--
You received this message because you are subscribed to the Google Groups "Orca Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orca-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orca-users/925a10f0-f9d9-471a-b883-db4871fb1239n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages