mtag icon indicating copy to clipboard operation
mtag copied to clipboard

AssertionError: assert DATA_U.shape[0] == np.sum(np.asarray([x.shape[0] for x in comb_flat]))

Open pjordab opened this issue 4 years ago • 9 comments

Dear authors,

I'd like to ask for help for this new issue.

After doing mtag using this script:

~/projects/def-rtadros/tools/mtag/mtag.py --sumstats file1,file2,file3 --out ./mtag_metaformat --n_min 0.0 --force --meta_format --stream_stdout

I got the following error:

There are 72 SNPs present in Traits [0 3 4 5 6 7 8 9] Beginning MTAG calculations... ... Completed MTAG calculations. There are 1796780 SNPs present in Traits [0 1 2 4 7 8 9] Beginning MTAG calculations... ... Completed MTAG calculations.

Traceback (most recent call last): File "/home/pjordab/projects/def-rtadros/tools/mtag/mtag.py", line 1567, in mtag(args) File "/home/pjordab/projects/def-rtadros/tools/mtag/mtag.py", line 1441, in mtag assert DATA_U.shape[0] == np.sum(np.asarray([x.shape[0] for x in comb_flat])) AssertionError Analysis terminated from error at Thu Aug 20 14:00:23 2020

Do you know what could be the cause?

Many thanks for your help!

Paloma

pjordab avatar Aug 20 '20 21:08 pjordab

Hi Paloma,

On your other issue, one of your collaborators mentioned that this error is still a problem. Do you still get this error when you restrict to a smaller set of summary statistics?

On Thu, Aug 20, 2020 at 5:09 PM pjordab [email protected] wrote:

Dear authors,

I'd like to ask for help for this new issue.

After doing mtag using this script:

~/projects/def-rtadros/tools/mtag/mtag.py --sumstats file1,file2,file3 --out ./mtag_metaformat --n_min 0.0 --force --meta_format --stream_stdout

I got the following error:

There are 72 SNPs present in Traits [0 3 4 5 6 7 8 9] Beginning MTAG calculations... ... Completed MTAG calculations. There are 1796780 SNPs present in Traits [0 1 2 4 7 8 9] Beginning MTAG calculations... ... Completed MTAG calculations.

Traceback (most recent call last): File "/home/pjordab/projects/def-rtadros/tools/mtag/mtag.py", line 1567, in mtag(args) File "/home/pjordab/projects/def-rtadros/tools/mtag/mtag.py", line 1441, in mtag assert DATA_U.shape[0] == np.sum(np.asarray([x.shape[0] for x in comb_flat])) AssertionError Analysis terminated from error at Thu Aug 20 14:00:23 2020

Do you know what could be the cause?

Many thanks for your help!

Paloma

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5PFXR4MW73JSPUF2EDSBWGITANCNFSM4QGTGBMQ .

paturley avatar Aug 23 '20 12:08 paturley

Hi Patrick, I'm working with Paloma on this. Yes, this remains an issue for --meta_format. MTAG --meta_format on ≥10 traits results in the A10 error (issue #108 ) MTAG --meta_format on <10 traits results in this Assertion error ("assert DATA_U.shape[0] == np.sum(np.asarray([x.shape[0] for x in comb_flat])). Thanks for your help, Rafik

rafiktadros avatar Aug 23 '20 13:08 rafiktadros

OK. Looks like we didn't test the meta-format options as thoroughly as we should have. :) We'll try to dig into it and figure out what is going wrong as soon as we can. It's a more complicated portion of the code and we have a few other deadlines looming this week, but we'll do our best to resolve this quickly.

On Sun, Aug 23, 2020 at 9:46 AM rafiktadros [email protected] wrote:

Hi Patrick, I'm working with Paloma on this. Yes, this remains an issue for --meta_format. MTAG --meta_format on ≥10 traits results in the A10 error (issue #108 https://github.com/JonJala/mtag/issues/108 ) MTAG --meta_format on <10 traits results in this Assertion error ("assert DATA_U.shape[0] == np.sum(np.asarray([x.shape[0] for x in comb_flat])). Thanks for your help, Rafik

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/107#issuecomment-678776448, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5NXYZUJHTN6IRCZMZDSCEMRVANCNFSM4QGTGBMQ .

paturley avatar Aug 23 '20 13:08 paturley

Great, thanks :)

rafiktadros avatar Aug 23 '20 13:08 rafiktadros

Thank you very much for your responses. Please let us know when the meta-format option is available.

pjordab avatar Sep 08 '20 14:09 pjordab

Hello Paloma,

Sorry this has continued to take time to resolve. A combination of deadlines and covid complications have made it hard to make time to clean up this more complicated part of the code. If this is urgent for you, one option you may consider is running MTAG on subsets of cohorts manually yourself and keeping the estimate that corresponds to the largest sample size. This is approximately what the metaformat option is meant to do in the first place, and it's likely that you could do this by hand more quickly than we could fix and test the code.

Best, Patrick

On Tue, Sep 8, 2020 at 10:50 AM pjordab [email protected] wrote:

Thank you very much for your responses. Please let us know when the meta-format option is available.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/107#issuecomment-688929875, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5PSDFFFDIBCLTZIXGDSEZAD5ANCNFSM4QGTGBMQ .

paturley avatar Sep 08 '20 15:09 paturley

Hi Patrick and developers, Thanks for all your previous answers and help. I have reattempted the same analysis and got the same error when using MTAG on 4 traits with the meta_format option.
Since I find this option of your tool very interesting, I was wondering if you have been able to sort out this part of the code. Thank you very much, Paloma.

pjordab avatar Nov 17 '21 22:11 pjordab

Hi Paloma,

Unfortunately, we have not had time to make these updates to the MTAG software. It's on our todo list, but (perhaps unsurprisingly) the todo list of an academic is very long... Sorry we cannot be of more help.

Best, Patrick

On Wed, Nov 17, 2021 at 4:29 PM pjordab @.***> wrote:

Hi Patrick and developers, Thanks for all your previous answers and help. I have reattempted the same analysis and got the same error when using MTAG on 4 traits with the meta_format option. Since I find this option of your tool very interesting, I was wondering if you have been able to sort out this part of the code. Thank you very much, Paloma.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/107#issuecomment-972160911, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5POVWXKX6N254YZJS3UMQUERANCNFSM4QGTGBMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

paturley avatar Nov 17 '21 22:11 paturley

That's perfectly understandable. Thank you very much!

pjordab avatar Nov 19 '21 17:11 pjordab