Giter VIP home page Giter VIP logo

Comments (3)

wdecoster avatar wdecoster commented on August 16, 2024

Hi,

That makes no sense at all to me :) Would it be possible to confirm that the problem is still there with version 0.21.0?
I haven't been spending much time on methplotlib recently, but I hope to change that soon.

Wouter

from methplotlib.

TaniaChP79 avatar TaniaChP79 commented on August 16, 2024

Dear Wouter,
Thanks so much for answers me back. the problem got fix adding the bed file to the test script.
Nonetheless, I am having another error when I do try to run call and frequencies on the script as you suggested on the test script:
methplotlib -m ACTB_calls.tsv meth_freq.tsv
-n calls frequencies
-w chr7:5,525,542-5,543,028
-g g38-locus.gtf
-b DNase_cluster.bed
--simplify \

I have this error:

_**Traceback (most recent call last):
File "/Applic.HPC/Easybuild/skylake/2022a/software/SciPy-bundle/2022.05-foss-2022a/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: '51 False
84 False
193 False
244 False
376 False
...
12160 True
12218 False
12328 True
12430 True
12473 True
Name: log_lik_ratio, Length: 25502, dtype: bool' is an invalid key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Applic.HPC/Easybuild/skylake/2022a/software/SciPy-bundle/2022.05-foss-2022a/lib/python3.10/site-packages/pandas/core/series.py", line 1085, in setitem
self._set_with_engine(key, value)
File "/Applic.HPC/Easybuild/skylake/2022a/software/SciPy-bundle/2022.05-foss-2022a/lib/python3.10/site-packages/pandas/core/series.py", line 1146, in _set_with_engine
loc = self.index.get_loc(key)
File "/Applic.HPC/Easybuild/skylake/2022a/software/SciPy-bundle/2022.05-foss-2022a/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3628, in get_loc
self._check_indexing_error(key)
File "/Applic.HPC/Easybuild/skylake/2022a/software/SciPy-bundle/2022.05-foss-2022a/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 5637, in _check_indexing_error
raise InvalidIndexError(key)
pandas.errors.InvalidIndexError: 51 False
84 False
193 False
244 False
376 False
...
12160 True
12218 False
12328 True
12430 True
12473 True
Name: log_lik_ratio, Length: 25502, dtype: bool

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Applic.HPC/Easybuild/skylake/2022a/software/methplotlib/0.20.1-foss-2022a/bin/methplotlib", line 8, in
sys.exit(main())
File "/Applic.HPC/Easybuild/skylake/2022a/software/methplotlib/0.20.1-foss-2022a/lib/python3.10/site-packages/methplotlib/methplotlib.py", line 26, in main
meth_browser(meth_data=meth_data,
File "/Applic.HPC/Easybuild/skylake/2022a/software/methplotlib/0.20.1-foss-2022a/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 "/Applic.HPC/Easybuild/skylake/2022a/software/methplotlib/0.20.1-foss-2022a/lib/python3.10/site-packages/methplotlib/plots.py", line 106, in methylation
make_per_read_meth_traces_llr(table=meth.table,
File "/Applic.HPC/Easybuild/skylake/2022a/software/methplotlib/0.20.1-foss-2022a/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 "/Applic.HPC/Easybuild/skylake/2022a/software/methplotlib/0.20.1-foss-2022a/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 "/Applic.HPC/Easybuild/skylake/2022a/software/SciPy-bundle/2022.05-foss-2022a/lib/python3.10/site-packages/pandas/core/series.py", line 1127, in setitem
self._set_values(indexer, value)
File "/Applic.HPC/Easybuild/skylake/2022a/software/SciPy-bundle/2022.05-foss-2022a/lib/python3.10/site-packages/pandas/core/series.py", line 1185, in _set_values
self._mgr = self.mgr.setitem(indexer=key, value=value)
File "/Applic.HPC/Easybuild/skylake/2022a/software/SciPy-bundle/2022.05-foss-2022a/lib/python3.10/site-packages/pandas/core/internals/managers.py", line 337, in setitem
return self.apply("setitem", indexer=indexer, value=value)
File "/Applic.HPC/Easybuild/skylake/2022a/software/SciPy-bundle/2022.05-foss-2022a/lib/python3.10/site-packages/pandas/core/internals/managers.py", line 304, in apply
applied = getattr(b, f)(kwargs)
File "/Applic.HPC/Easybuild/skylake/2022a/software/SciPy-bundle/2022.05-foss-2022a/lib/python3.10/site-packages/pandas/core/internals/blocks.py", line 957, in setitem
values[indexer] = value
ValueError: shape mismatch: value array of shape (9792,1) could not be broadcast to indexing result of shape (9792,) "

Sorry to keep bothering you but I really want to use your software to plot my methylation data.

Best,

Tania

from methplotlib.

TaniaChP79 avatar TaniaChP79 commented on August 16, 2024

Dear Wouter,
I fix the problem adding --binary to the script.
Best,

Tania

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.