Commit 736d637d by DLA-Ranker

Updates

parent 901a69e1
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.5" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="projectConfiguration" value="Twisted Trial" />
<option name="PROJECT_TEST_RUNNER" value="Twisted Trial" />
</component>
</module>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPep8Inspection" enabled="false" level="WEAK WARNING" enabled_by_default="false">
<option name="ignoredErrors">
<list>
<option value="E111" />
<option value="E114" />
</list>
</option>
</inspection_tool>
</profile>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.5" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/deepScoring.iml" filepath="$PROJECT_DIR$/.idea/deepScoring.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -30,7 +30,7 @@ import scr
from numpy import asarray
from sklearn.preprocessing import OneHotEncoder
import subprocess
import deepScoring.load_data as load
import load_data as load
from sklearn.preprocessing import MinMaxScaler
logging.basicConfig(filename='manager.log', filemode='w', format='%(levelname)s: %(message)s', level=logging.DEBUG)
......
......@@ -11,9 +11,8 @@ import os
import sys
from os import path, remove
#sys.path.insert(1, '../lib/')
#import tools as tl
NACCESS_PATH = 'naccess'
sys.path.insert(1, '../lib/')
import tools as tl
def rimcoresup(rsa_rec,rsa_lig,rsa_complex):
'''INPUT: file rsa da NACCESS.
......@@ -180,11 +179,11 @@ def rimcoresup(rsa_rec,rsa_lig,rsa_complex):
def get_scr(rec, lig, com, name):
#print('rec', path.basename(rec.replace('pdb', 'rsa')))
cmdcompl=NACCESS_PATH + ' ' + com
cmdcompl=tl.NACCESS_PATH + ' ' + com
os.system(cmdcompl)
cmdrec=NACCESS_PATH + ' ' + rec
cmdrec=tl.NACCESS_PATH + ' ' + rec
os.system(cmdrec)
cmdlig=NACCESS_PATH + ' ' + lig
cmdlig=tl.NACCESS_PATH + ' ' + lig
os.system(cmdlig)
# ('GLN', 'B', '44', '55.7', 'receptor')
......
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 7 16:33:47 2020
@author: mohseni
"""
import logging
import numpy as np
import pickle
import shutil
import pypdb
import pandas as pd
import protein as pr
from prody import *
from os import path, mkdir, remove, getenv, listdir, system
from io import StringIO
import urllib
import re
import glob
from subprocess import CalledProcessError, check_call
import traceback
import sys
import gzip
#========================================================
#NACCESS
NACCESS_PATH='naccess'
#========================================================
def save_obj(obj, name):
with open(name + '.pkl', 'wb') as f:
pickle.dump(obj, f, pickle.HIGHEST_PROTOCOL)
def load_obj(name):
with open(name + '.pkl', 'rb') as f:
return pickle.load(f)
def do_processing(cases, function, use_multiprocessing):
if use_multiprocessing:
import multiprocessing
max_cpus = 30
manager = multiprocessing.Manager()
report_dict = manager.dict()
pool = multiprocessing.Pool(processes = min(max_cpus, multiprocessing.cpu_count()))
else:
report_dict = dict()
for args in cases:
args += (report_dict,)
if use_multiprocessing:
pool.apply_async(function, args = args)
else:
function(*args)
if use_multiprocessing:
pool.close()
pool.join()
return dict(report_dict)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment