Commit 24c3a66f authored by Bharath Ramsundar's avatar Bharath Ramsundar
Browse files

Merge pull request #60 from rbharath/travis

[WIP] First version of travis build.
parents 1129ab9b d9739cdf
Loading
Loading
Loading
Loading

.travis.yml

0 → 100644
+31 −0
Original line number Diff line number Diff line
language: python
python:
  # We don't actually use the Travis Python, but this keeps it organized.
  - "2.7"
install:
  - sudo apt-get update
  - wget http://repo.continuum.io/archive/Anaconda2-2.4.1-Linux-x86_64.sh -O anaconda.sh;
  - bash anaconda.sh -b -p $HOME/anaconda
  - export PATH="$HOME/anaconda/bin:$PATH"
  - hash -r
  - conda config --set always_yes yes --set changeps1 no
  - conda update -q conda
  # Useful for debugging any issues with conda
  - conda info -a

  # Replace dep1 dep2 ... with your dependencies
  #- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION dep1 dep2 ...
  - conda install -c omnia rdkit
  - conda install -c omnia openbabel
  - conda install joblib
  - pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
  - pushd .
  - cd ~/
  - git clone https://github.com/pandegroup/keras.git
  - cd keras/
  - python setup.py install
  - popd
  - python setup.py develop

script:
  - nosetests -v deepchem 
+0 −12
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@ Requirements
* [sklearn](https://github.com/scikit-learn/scikit-learn.git)
* [numpy](https://store.continuum.io/cshop/anaconda/)
* [keras](keras.io)
* [vs-utils] (https://github.com/pandegroup/vs-utils.git)

Linux (64-bit) Installation 
------------------
@@ -46,17 +45,6 @@ Cd into the keras directory and execute
python setup.py install
```

###vs_utils
Clone the vs_utils git repository
```bash
git clone https://github.com/pandegroup/vs-utils.git
```

Cd into the vs-utils directory and execute
```bash
python setup.py develop
```

###deepchem
Clone the deep_chem git repository
```bash
+138 −138
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ import numpy as np
from rdkit import Chem

from deepchem.featurizers import Featurizer
from vs_utils.utils import pad_array
from deepchem.utils import pad_array


class CoulombMatrix(Featurizer):
+4 −7
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ from deepchem.featurizers.basic import SimpleDescriptors
from deepchem.utils.save import save_to_disk
from deepchem.utils.save import load_from_disk
from deepchem.utils.save import load_pandas_from_disk
from vs_utils.utils import ScaffoldGenerator
from deepchem.utils import ScaffoldGenerator
from deepchem.featurizers.nnscore import NNScoreComplexFeaturizer
import multiprocessing as mp
from functools import partial
@@ -137,19 +137,17 @@ class DataFeaturizer(object):
    """Featurize provided file and write to specified location."""
    input_type = _get_input_type(input_file)

    print("Loading raw samples now.")
    raw_df = load_pandas_from_disk(input_file)
    fields = raw_df.keys()
    print("Loaded raw data frame from file.")
    def process_raw_sample_helper(row, fields, input_type):
      return self._process_raw_sample(input_type, row, fields)
    process_raw_sample_helper_partial = partial(process_raw_sample_helper,
                                                fields=fields,
                                                input_type=input_type)

    processed_rows = raw_df.apply(process_raw_sample_helper_partial, axis=1)
    print("finished processing rows")
    raw_df = pd.DataFrame.from_records(processed_rows)
    #processed_rows = raw_df.apply(process_raw_sample_helper_partial, axis=1)
    raw_df = raw_df.apply(process_raw_sample_helper_partial, axis=1, reduce=False)
    #raw_df = pd.DataFrame.from_records(processed_rows)

    nb_sample = raw_df.shape[0]
    interval_points = np.linspace(
@@ -174,7 +172,6 @@ class DataFeaturizer(object):
    if input_type == "csv":
      for ind, field in enumerate(fields):
        data[field] = _process_field(row[ind])
      return data
    elif input_type in ["pandas-pickle", "pandas-joblib"]:
      for field in fields:
        data[field] = _process_field(row[field])
+71 −0
Original line number Diff line number Diff line
COMPND    3bwf ligand 
AUTHOR    GENERATED BY OPEN BABEL 2.3.90
ATOM      1  O9  DWC A   1      21.431 -40.526   0.720  1.00  0.00           O  
ATOM      2  C1  DWC A   1      20.612 -39.592   0.816  1.00  0.00           C  
ATOM      3  C2  DWC A   1      20.061 -38.848  -0.214  1.00  0.00           C  
ATOM      4  C3  DWC A   1      20.231 -38.935  -1.628  1.00  0.00           C  
ATOM      5  C4  DWC A   1      21.064 -39.820  -2.345  1.00  0.00           C  
ATOM      6  C5  DWC A   1      21.120 -39.762  -3.756  1.00  0.00           C  
ATOM      7  C6  DWC A   1      20.335 -38.834  -4.470  1.00  0.00           C  
ATOM      8  C7  DWC A   1      19.504 -38.047  -2.409  1.00  0.00           C  
ATOM      9  N21 DWC A   1      19.551 -37.958  -3.803  1.00  0.00           N1+
ATOM     10  C22 DWC A   1      18.649 -37.145  -1.784  1.00  0.00           C  
ATOM     11  N19 DWC A   1      17.939 -36.271  -2.545  1.00  0.00           N  
ATOM     12  C17 DWC A   1      16.057 -36.612  -4.980  1.00  0.00           C  
ATOM     13  C16 DWC A   1      16.639 -37.866  -5.401  1.00  0.00           C  
ATOM     14  C14 DWC A   1      17.577 -37.591  -6.456  1.00  0.00           C  
ATOM     15  C13 DWC A   1      17.573 -36.175  -6.677  1.00  0.00           C  
ATOM     16  C12 DWC A   1      16.641 -35.570  -5.768  1.00  0.00           C  
ATOM     17  C10 DWC A   1      19.500 -35.179  -4.711  1.00  0.00           C  
ATOM     18  O11 DWC A   1      20.260 -34.371  -4.788  1.00  0.00           O  
ATOM     19  N20 DWC A   1      20.115 -39.153   2.031  1.00  0.00           N  
ATOM     20  C31 DWC A   1      19.232 -38.135   1.781  1.00  0.00           C  
ATOM     21  O8  DWC A   1      18.639 -37.550   2.679  1.00  0.00           O  
ATOM     22  C30 DWC A   1      19.172 -37.914   0.402  1.00  0.00           C  
ATOM     23  C29 DWC A   1      18.446 -37.006  -0.417  1.00  0.00           C  
ATOM     24  C28 DWC A   1      17.527 -35.968  -0.291  1.00  0.00           C  
ATOM     25  C23 DWC A   1      17.214 -35.545  -1.610  1.00  0.00           C  
ATOM     26  C24 DWC A   1      16.282 -34.531  -1.835  1.00  0.00           C  
ATOM     27  C25 DWC A   1      15.704 -33.894  -0.738  1.00  0.00           C  
ATOM     28  C26 DWC A   1      15.988 -34.299   0.589  1.00  0.00           C  
ATOM     29  O15 DWC A   1      15.362 -33.685   1.644  1.00  0.00           O  
ATOM     30  C27 DWC A   1      16.897 -35.365   0.812  1.00  0.00           C  
ATOM     31 OS   DWC A   1      18.233 -36.554  -4.619  1.00  0.00          Os  
ATOM     32  H   DWC A   1      20.353 -39.509   2.917  1.00  0.00           H  
ATOM     33  H   DWC A   1      14.763 -32.982   1.488  1.00  0.00           H  
CONECT    1    2                                                      
CONECT    2    1    3   19                                            
CONECT    3    2    4   22                                            
CONECT    4    3    5    8                                            
CONECT    5    4    6                                                 
CONECT    6    5    7                                                 
CONECT    7    6    9                                                 
CONECT    8    4    9   10                                            
CONECT    9    7    8   31                                            
CONECT   10    8   11   23                                            
CONECT   11   10   25   31                                            
CONECT   12   13   16   31                                            
CONECT   13   12   14   31                                            
CONECT   14   13   15   31                                            
CONECT   15   14   16   31                                            
CONECT   16   12   15   31                                            
CONECT   17   18   31                                                 
CONECT   18   17                                                      
CONECT   19    2   20   32                                            
CONECT   20   19   21   22                                            
CONECT   21   20                                                      
CONECT   22    3   20   23                                            
CONECT   23   10   22   24                                            
CONECT   24   23   25   30                                            
CONECT   25   11   24   26                                            
CONECT   26   25   27                                                 
CONECT   27   26   28                                                 
CONECT   28   27   29   30                                            
CONECT   29   28   33                                                 
CONECT   30   24   28                                                 
CONECT   31    9   11   12   13                                       
CONECT   31   14   15   16   17                                       
CONECT   32   19                                                      
CONECT   33   29                                                      
MASTER        0    0    0    0    0    0    0    0   33    0   33    0
END
Loading