DeepRank / DeepRank-Mut

Deep learning framework to predict functional effects of missense variants in human
Apache License 2.0
1 stars 0 forks source link

testing DeepRank-Mut #33

Open imerelli opened 10 months ago

imerelli commented 10 months ago

Hi, I'm trying to use DeepRank-Mut. The first problem is that I don't get how to run the tests, because in the documentation it is stated to enter in the test directory and run pytest, but this command is not valid.

However, from the root directory I can tun the test scripts that are in the test directory. Here is the output. While test/test_tools.py and test/test_atomic_features.py provide an output, test/test_generate.py and test/test_learn.py do not provide any output. Is this excepted? There is something that I can do differently?

( deeprank ) $ python test/test_atomic_features.py 
test/test_atomic_features.py:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
/opt/tools/deg/miniforge3/envs/deeprank/lib/python3.8/site-packages/pdb2sql/pdb2sqlcore.py:263: UserWarning: Missing chainID and set it with segID
  warnings.warn("Missing chainID and set it with segID")
AtomicFeature coulomb and vdw exported to file ./atomic_pair_interaction.dat
.
----------------------------------------------------------------------
Ran 1 test in 1.645s

OK

( deeprank ) $ python test/test_generate.py 

( deeprank ) $ python test/test_learn.py 

( deeprank ) $ python test/test_tools.py 
/opt/tools/deg/DeepRank-mut/deeprank/tools/sasa.py:109: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  assert len(resA[:, 0].astype(np.int).tolist()) == len(
/opt/tools/deg/DeepRank-mut/deeprank/tools/sasa.py:110: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  np.unique(resA[:, 0].astype(np.int)).tolist())
/opt/tools/deg/DeepRank-mut/deeprank/tools/sasa.py:111: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  assert len(resB[:, 0].astype(np.int).tolist()) == len(
/opt/tools/deg/DeepRank-mut/deeprank/tools/sasa.py:112: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  np.unique(resB[:, 0].astype(np.int)).tolist())
/opt/tools/deg/DeepRank-mut/deeprank/tools/sasa.py:115: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  self.xyz[chain1] = resA[:, 2:].astype(np.float)
/opt/tools/deg/DeepRank-mut/deeprank/tools/sasa.py:116: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  self.xyz[chain2] = resB[:, 2:].astype(np.float)
/opt/tools/deg/DeepRank-mut/deeprank/tools/sasa.py:61: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  resSeqA = np.unique(resA[:, 0].astype(np.int))
/opt/tools/deg/DeepRank-mut/deeprank/tools/sasa.py:62: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  resSeqB = np.unique(resB[:, 0].astype(np.int))
.
----------------------------------------------------------------------
Ran 1 test in 0.412s

OK
imerelli commented 9 months ago

Ok, it works! Very last question. How can I interpret these results? A low number in the "output" column in comparion with the "target" colum means that the variant is pathogenic?

cat output-test-epoch-0.csv entry,output,target 1CR4:A:173:Phenylalanine->Arginine-m4136553106469056122,"[-2.9982943534851074, 3.1880407333374023]",-1 1CR4:A:171:Phenylalanine->Lysine-m5928231148893208810,"[-6.950150489807129, 5.13400936126709]",-1 1CR4:A:173:Phenylalanine->Arginine-m4136553106469056122,"[-2.9982943534851074, 3.1880407333374023]",-1 1CR4:A:171:Phenylalanine->Lysine-m5928231148893208810,"[-6.950150489807129, 5.13400936126709]",-1

cbaakman commented 9 months ago

The target is set to -1, because it's unknown. When you run binary classification mode, two numbers are output: one for benign (left) and one for pathogenic (right) The highest number of the two wins and displays the output class.

I'm sorry that we didn't make a better output exporter for this. I hope you can work with this format.

imerelli commented 9 months ago

So, the attached examples are to be considered pathogenic because the right column is higher than the left column. Right?

cbaakman commented 9 months ago

exactly.