Giter VIP home page Giter VIP logo

Comments (17)

wdecoster avatar wdecoster commented on July 17, 2024

Can you upgrade methplotlib to the latest version? Yours is rather outdated, and it is possible that the issue you are reporting is already solved.

from methplotlib.

partha434 avatar partha434 commented on July 17, 2024

Hello,
I tried to upgrade methplotlib, but unfortunately it still shows the old version. I have installed it via conda. On the conda page the version shows 0.20.1, but still I can't install it.

from methplotlib.

wdecoster avatar wdecoster commented on July 17, 2024

I tried to upgrade methplotlib, but unfortunately it still shows the old version.

But the upgrade was successful? Have you earlier installed this with pip? You can try uninstalling with pip and conda first.
You can use which methplotlib to see where it is installed.

but still I can't install it.

You have an error?

from methplotlib.

partha434 avatar partha434 commented on July 17, 2024

I successfully installed methplotlib to 0.20.1.
But I got this error...

methplotlib -m methylation_calls_CpG_sm1.tsv methylation_frequency_sm1.tsv -n calls frequencies -w mtDNA:1-16626 -g /cluster/projects/nn9337k/as1_nanopolish/all_context/sequence.sorted.gtf.gz --simplify -b /cluster/projects/nn9337k/as1/reference.bed

Reading methylation_calls_CpG_sm1.tsv would be faster with bgzip and tabix.
Please index with 'tabix -S1 -s1 -b3 -e4'.

Reading methylation_frequency_sm1.tsv would be faster with bgzip and tabix.
Please index with 'tabix -S1 -s1 -b2 -e3'.
Traceback (most recent call last):
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3621, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 136, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 142, in pandas._libs.index.IndexEngine.get_loc
TypeError: '18971 False
19033 False
19094 False
19156 False
19218 False
...
22888 False
22962 True
23035 False
23109 False
23183 False
Name: log_lik_ratio, Length: 28154, dtype: bool' is an invalid key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/pandas/core/series.py", line 1085, in setitem
self._set_with_engine(key, value)
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/pandas/core/series.py", line 1146, in _set_with_engine
loc = self.index.get_loc(key)
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3628, in get_loc
self._check_indexing_error(key)
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 5637, in _check_indexing_error
raise InvalidIndexError(key)
pandas.errors.InvalidIndexError: 18971 False
19033 False
19094 False
19156 False
19218 False
...
22888 False
22962 True
23035 False
23109 False
23183 False
Name: log_lik_ratio, Length: 28154, dtype: bool

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/bin/methplotlib", line 8, in
sys.exit(main())
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/methplotlib/methplotlib.py", line 26, in main
meth_browser(meth_data=meth_data,
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/methplotlib/methplotlib.py", line 53, in meth_browser
meth_traces = plots.methylation(meth_data, dotsize=dotsize, binary=binary, minqual=minqual)
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/methplotlib/plots.py", line 106, in methylation
make_per_read_meth_traces_llr(table=meth.table,
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/methplotlib/plots.py", line 183, in make_per_read_meth_traces_llr
table.loc[:, "llr_scaled"] = rescale_log_likelihood_ratio(table["log_lik_ratio"].copy())
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/methplotlib/plots.py", line 269, in rescale_log_likelihood_ratio
llr[llr > 0] = scaler.fit_transform(llr[llr > 0].values.reshape(-1, 1)).tolist()
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/pandas/core/series.py", line 1127, in setitem
self._set_values(indexer, value)
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/pandas/core/series.py", line 1185, in _set_values
self._mgr = self._mgr.setitem(indexer=key, value=value)
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/pandas/core/internals/managers.py", line 337, in setitem
return self.apply("setitem", indexer=indexer, value=value)
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/pandas/core/internals/managers.py", line 304, in apply
applied = getattr(b, f)(**kwargs)
File "/cluster/projects/nn9337k/anaconda/envs/methplotlib/lib/python3.10/site-packages/pandas/core/internals/blocks.py", line 959, in setitem
values[indexer] = value
ValueError: shape mismatch: value array of shape (5284,1) could not be broadcast to indexing result of shape (5284,)

from methplotlib.

wdecoster avatar wdecoster commented on July 17, 2024

Could you please share the log file created by methplotlib?

from methplotlib.

partha434 avatar partha434 commented on July 17, 2024

Hello,
I have attached the log file generated from methplotlib.
methplotlib_20220905_0847.log

from methplotlib.

partha434 avatar partha434 commented on July 17, 2024

Dear Wouter,
Any updates related to the above error?
I have checked pip installation with pip check. It also says no broken requirements found.
But still I am getting the above error.

from methplotlib.

wdecoster avatar wdecoster commented on July 17, 2024

Would it be possible to share your input files?

from methplotlib.

partha434 avatar partha434 commented on July 17, 2024

Sure.
Please find the attached files for calls and frequency.
methylation_calls_CpG_sm1.txt
methylation_frequency_sm1.txt

from methplotlib.

wdecoster avatar wdecoster commented on July 17, 2024

It works on my system. Can you try upgrading pandas?

from methplotlib.

partha434 avatar partha434 commented on July 17, 2024

I upgraded pandas to latest version 1.4.4 (earlier version was 1.4.3).
But I got the same error.
Please help.

from methplotlib.

wdecoster avatar wdecoster commented on July 17, 2024

Can you please try to create a conda environment for just methplotlib and see if you have the error if you execute methplotlib there.

conda create -n methplotlib methplotlib
conda activate methplotlib

If you still have the error, please export the environment (conda env export > env.yaml) and share that with me so I can try to reproduce.

from methplotlib.

partha434 avatar partha434 commented on July 17, 2024

Dear Wouter,
I created a new conda environment as per your suggestions. But I am still facing the same error.
Please find the attached env.yaml file (in text here).
Waiting for your kind help.
Thank you so much in advance.
env.txt

from methplotlib.

partha434 avatar partha434 commented on July 17, 2024

Dear Wouter,
I checked my environment with pip check. There is no broken requirements.

from methplotlib.

xiaohuli-45 avatar xiaohuli-45 commented on July 17, 2024

Dear Wouter, I checked my environment with pip check. There is no broken requirements.

Hello, I have encountered a similar problem. May I ask if you have resolved the issue

from methplotlib.

mrmrwinter avatar mrmrwinter commented on July 17, 2024

I am also getting a ery similar error.
Using methplotlib version 0.20.1

from methplotlib.

senukobla avatar senukobla commented on July 17, 2024

I am getting the same error . Any solutions ?

from methplotlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.