Git Product home page Git Product logo

mictools's Introduction

minepy - Maximal Information-based Nonparametric Exploration

Documentation Status

minepy provides a library for the Maximal Information-based Nonparametric Exploration (MIC and MINE family). Key features:

  • APPROX-MIC (the original algorithm, DOI: 10.1126/science.1205438) and MIC_e (DOI: arXiv:1505.02213 and DOI: arXiv:1505.02214) estimators;
  • Total Information Coefficient (TIC, DOI: arXiv:1505.02213) and the Generalized Mean Information Coefficient (GMIC, DOI: arXiv:1308.5712);
  • an ANSI C library
  • a C++ interface;
  • an efficient Python API (Python 2 and 3 compatibility);
  • an efficient MATLAB/OCTAVE API;

minepy is an open-source, GPLv3-licensed software.

The minerva R interface is available at CRAN.

MICtools

The `mine` command-line application is deprecated since version 1.2.2. We suggest to use MICtools, a comprehensive and effective pipeline for TICe and MICe analysis. TICe is used to perform efficiently a high throughput screening of all the possible pairwise relationships assessing their significance, while MICe is used to rank the subset of significant associations on the bases of their strength. Paper, code and documentation.

Docker image

The minepy library is preinstalled in the MICtools Docker image.

Links

Citing minepy

Davide Albanese, Michele Filosi, Roberto Visintainer, Samantha Riccadonna, Giuseppe Jurman and Cesare Furlanello. minerva and minepy: a C engine for the MINE suite and its R, Python and MATLAB wrappers. Bioinformatics (2013) 29(3): 407-408 first published online December 14, 2012 doi:10.1093/bioinformatics/bts707.

Financial Contributions

mictools's People

Contributors

davidealbanese avatar pietrofranceschi avatar vkk800 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mictools's Issues

Multitest correction

Hello,

Thank you very much for all the work on the package minepy and all the tools in mictools

This isa conceptual issue for my own understanding I would say, not code use.

Why do we need to use multitest correction, while we are already testing the TICe against all the resampled TICe pvals?

Is it an addition from the https://academic.oup.com/gigascience/article/7/4/giy032/4958979 to be very conservative? is it also advised in the original procedure from http://jmlr.csail.mit.edu/papers/v17/15-308.html ?

Thank you very much for your help!

Best

Enquiry: Is there any python example in using this package?

Hey, Davidealbanese. Thanks for your awesome work. It seems all the usages in README.rst are written in the format of command lines. May I ask whether there is any python example in using this package? Looking forward to your reply. Thanks in advance! Have a nice day!

mictools in macOS high sierra - Python 3.7

Dear Mr. Davide

I try the datasaurus dataset and it worked perfectly until the end. But when I try to use another dataset from https://data.mendeley.com/datasets/h3cgnj8hft/1, There are problems:

  1. When enter this line command: mictools adjust $ODIR/pval.txt $ODIR the warning shown from numpy, but files pval_adj.txt and pi0_None.png were created.
    Applications/Anaconda/anaconda3/lib/python3.7/site-packages/numpy/lib/arraysetops.py:569: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison mask |= (ar1 == a)
  2. On the next step when enter this line command: mictools strength $X $ODIR/pval_adj.txt $ODIR/strength.txt
    File "/Applications/Anaconda/anaconda3/lib/python3.7/site-packages/scripts/mictools_cmd.py", line 265, in strength thr, alpha, clumps) File "/Applications/Anaconda/anaconda3/lib/python3.7/site-packages/mictools/strength.py", line 119, in strength_cmd c=clumps) File "/Applications/Anaconda/anaconda3/lib/python3.7/site-packages/mictools/strength.py", line 84, in compute_strength mine.compute_score(x, y) File "minepy/mine.pyx", line 84, in minepy.mine.MINE.compute_score ValueError: Buffer has wrong number of dimensions (expected 1, got 2)
    file strenght.txt is empty
    Screen Shot 2020-05-10 at 9 52 18 PM

Thank you for your help.
Jimmy

Warning "Method .as_matrix"

FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.
Xa = X.as_matrix()

AttributeError: module 'mictools' has no attribute 'mergenull'

Hello
When i run: mictools mergenull 00.txt 11.txt uu.txt ( note: 00.txt and 11.txt were generated by 'mictools null …', respectively) , i got the error message: AttributeError: module 'mictools' has no attribute 'mergenull'. Based on Win platform and Linux (py2.7 and 3.7). may I know what is the reason?
Looking forward to your reply,thanks.
Yours
Qiusheng WU

Installing

Hi there,

I've followed the the pip installation instructions, but encountered the following error:

Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-install-nko9_ymy/matplotlib/

Any suggestions?

Cheers,

Siobhan

Exceptions

Hello, I'm following the docker install and usage instructions:

docker pull minepy/mictools
docker run --rm -t -i -v /Users/will/Documents/mictools:/mictools -w /mictools minepy/mictools /bin/bash

But when running any commands, I get this below message:

raceback (most recent call last):
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 655, in _build_master
ws.require(requires)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 963, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 854, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (numpy 1.12.1 (/usr/lib/python3/dist-packages), Requirement.parse('numpy>=1.14'), {'statsmodels'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/mictools", line 6, in
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 3019, in
@_call_aside
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 3003, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 3032, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 657, in _build_master
return cls._build_from_requirements(requires)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 670, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 854, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (numpy 1.12.1 (/usr/lib/python3/dist-packages), Requirement.parse('numpy>=1.14'), {'statsmodels'})

Is this a problem with the python version? I am running 2.7.16, but I thought the docker image included python3?

Thanks for your help!

Error at pval step

Hey,
I'm unsure what the issue is here. I am able to run mictools null just fine, however when I need to run mictools pval I get the following error. Any idea how to fix this? Or is this something I need to take up with my systems administrator?

Error:

`Traceback (most recent call last):
File "/home1/nathanwi/.local/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3790, in get_loc
return self._engine.get_loc(casted_key)
File "index.pyx", line 152, in pandas._libs.index.IndexEngine.get_loc
File "index.pyx", line 181, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 7080, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 7088, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'None'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home1/nathanwi/.local/bin/mictools", line 8, in
sys.exit(cli())
File "/home1/nathanwi/.local/lib/python3.9/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home1/nathanwi/.local/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home1/nathanwi/.local/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home1/nathanwi/.local/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home1/nathanwi/.local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home1/nathanwi/.local/lib/python3.9/site-packages/scripts/mictools_cmd.py", line 177, in pval
mictools.pval.pval_cmd(xvars, null, output, labels, target, yvars, rowwise,
File "/home1/nathanwi/.local/lib/python3.9/site-packages/mictools/pval.py", line 145, in pval_cmd
obs_dist, obs, pval = compute_pval(X=X,
File "/home1/nathanwi/.local/lib/python3.9/site-packages/mictools/pval.py", line 96, in compute_pval
null_dist_cl = null_dist.loc[cl]
File "/home1/nathanwi/.local/lib/python3.9/site-packages/pandas/core/indexing.py", line 1153, in getitem
return self._getitem_axis(maybe_callable, axis=axis)
File "/home1/nathanwi/.local/lib/python3.9/site-packages/pandas/core/indexing.py", line 1393, in _getitem_axis
return self._get_label(key, axis=axis)
File "/home1/nathanwi/.local/lib/python3.9/site-packages/pandas/core/indexing.py", line 1343, in _get_label
return self.obj.xs(label, axis=axis)
File "/home1/nathanwi/.local/lib/python3.9/site-packages/pandas/core/generic.py", line 4228, in xs
loc, new_index = index._get_loc_level(key, level=0)
File "/home1/nathanwi/.local/lib/python3.9/site-packages/pandas/core/indexes/multi.py", line 3175, in _get_loc_level
indexer = self._get_level_indexer(key, level=level)
File "/home1/nathanwi/.local/lib/python3.9/site-packages/pandas/core/indexes/multi.py", line 3276, in _get_level_indexer
idx = self._get_loc_single_level_index(level_index, key)
File "/home1/nathanwi/.local/lib/python3.9/site-packages/pandas/core/indexes/multi.py", line 2865, in _get_loc_single_level_index
return level_index.get_loc(key)
File "/home1/nathanwi/.local/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3797, in get_loc
raise KeyError(key) from err
KeyError: 'None'
`

Minepy in conda

Hello, I am trying to use minepy/mictools in conda but can't seem to get it to run. The commands are below:

conda create --name mictools
conda activate mictools
conda install -c bioconda minepy

When then running any commands such as mictools or minepy on their own, it simply says command not found. Is there something I'm doing wrong?

Sorry if this is a silly question, I cannot find any documentation about using it in conda

Thanks

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.