Skip to content

Commit 6796df0

Browse files
author
Jan Ludwiczak
committed
Update to version 1.1
1 parent eaf7830 commit 6796df0

File tree

13 files changed

+50
-42
lines changed

13 files changed

+50
-42
lines changed

pipred.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
import argparse
22
from Bio import SeqIO
33
import os
4+
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
5+
46
import sys
57
import random
68
import numpy as np
79
from utils import enc_seq_onehot, enc_pssm, is_fasta, get_pssm_sequence, PiPred_Model, decode,exit
8-
import keras.backend as K
10+
import tensorflow as tf
11+
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
12+
import tensorflow.keras.backend as K
13+
14+
915

10-
# cx_freeze specific
11-
if getattr(sys, 'frozen', False):
12-
my_loc = os.path.dirname(os.path.abspath(sys.executable))
13-
else:
14-
my_loc = os.path.dirname(os.path.realpath(__file__))
16+
my_loc = os.path.dirname(os.path.abspath(__file__))
1517

16-
#my_loc = os.path.dirname(os.path.abspath(__file__))
1718
parser = argparse.ArgumentParser(description='PiPred')
1819
parser.add_argument('-i',
1920
help='Input file with sequence in fasta format.',
@@ -60,7 +61,7 @@
6061
print("ERROR: Sequence identifiers in the fasta file are not unique!")
6162
exit()
6263
# Check sequence length and presence of non standard residues
63-
aa1 = "ACDEFGHIKLMNPQRSTVWY"
64+
aa1 = "ACDEFGHIKLMNPQRSTVWYX"
6465
for entry, seq in zip(entries, sequences):
6566
if not (len(seq) >= 25 and len(seq) <= 700):
6667
print('ERROR: Not accepted sequence length (ID %s - %s). Only sequences between 30 and 700 residues are accepted!' % (
@@ -104,11 +105,10 @@
104105
enc_sequences.append(np.concatenate((enc_seq_onehot(seq, pad_length=700),
105106
enc_pssm(pssm_fn, pad_length=700)), axis=1))
106107

107-
# Create model (supress warnings).
108-
stderr = sys.stderr
109-
sys.stderr = open(os.devnull, 'w')
108+
# Create model
110109
model = PiPred_Model()
111-
sys.stderr = stderr
110+
111+
112112
enc_sequences = np.asarray(enc_sequences)
113113

114114

requirements.txt

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
1-
biopython==1.70
2-
bleach==1.5.0
3-
enum34==1.1.6
4-
h5py==2.7.1
5-
html5lib==0.9999999
6-
Keras==2.2.0
7-
Markdown==2.6.11
8-
numpy==1.14.3
9-
protobuf==3.6.0
10-
PyYAML==3.12
11-
scipy==1.1.0
12-
six==1.11.0
13-
setuptools==39.1.0
14-
tensorflow==1.10.0
15-
tensorflow-tensorboard==0.4.0
16-
Werkzeug==0.14.1
1+
absl-py==0.11.0
2+
astor==0.8.1
3+
biopython==1.78
4+
cached-property==1.5.2
5+
gast==0.2.2
6+
google-pasta==0.2.0
7+
grpcio==1.33.2
8+
h5py==2.10.0
9+
importlib-metadata==3.1.0
10+
joblib==0.17.0
11+
Keras-Applications==1.0.8
12+
Keras-Preprocessing==1.1.2
13+
Markdown==3.3.3
14+
numpy==1.18.5
15+
opt-einsum==3.3.0
16+
pandas==1.1.4
17+
protobuf==3.14.0
18+
python-dateutil==2.8.1
19+
pytz==2020.4
20+
scikit-learn==0.23.2
21+
scipy==1.5.4
22+
six==1.15.0
23+
tensorboard==1.15.0
24+
tensorflow-estimator==1.15.1
25+
tensorflow-gpu==1.15.4
26+
termcolor==1.1.0
27+
threadpoolctl==2.1.0
28+
Werkzeug==1.0.1
29+
wrapt==1.12.1
30+
zipp==3.4.0

0 commit comments

Comments
 (0)