geney 1.1.13__py2.py3-none-any.whl → 1.1.15__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of geney might be problematic. Click here for more details.
- geney/immune_utils.py +12 -14
- geney/oncosplice.py +2 -1042
- geney/oncosplice_mouse.py +277 -0
- {geney-1.1.13.dist-info → geney-1.1.15.dist-info}/METADATA +4 -1
- {geney-1.1.13.dist-info → geney-1.1.15.dist-info}/RECORD +7 -6
- {geney-1.1.13.dist-info → geney-1.1.15.dist-info}/WHEEL +0 -0
- {geney-1.1.13.dist-info → geney-1.1.15.dist-info}/top_level.txt +0 -0
geney/immune_utils.py
CHANGED
|
@@ -2,6 +2,8 @@ import subprocess
|
|
|
2
2
|
import logging
|
|
3
3
|
import tempfile
|
|
4
4
|
from geney import config_setup
|
|
5
|
+
import re
|
|
6
|
+
from io import StringIO
|
|
5
7
|
import pandas as pd
|
|
6
8
|
|
|
7
9
|
|
|
@@ -37,17 +39,17 @@ class NetChop(object):
|
|
|
37
39
|
logging.error("Error calling netChop: %s:\n%s" % (e, e.output))
|
|
38
40
|
raise
|
|
39
41
|
parsed = self.parse_netchop(output)
|
|
40
|
-
return parsed
|
|
42
|
+
# return parsed
|
|
41
43
|
#
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
assert len(parsed) == len(sequences), \
|
|
45
|
+
"Expected %d results but got %d" % (
|
|
46
|
+
len(sequences), len(parsed))
|
|
47
|
+
assert [len(x) for x in parsed] == [len(x) for x in sequences]
|
|
48
|
+
filtered_proteosomes = []
|
|
49
|
+
for scores, seq in list(zip(parsed, sequences)):
|
|
50
|
+
proteosome = self.chop_protein(seq, [s > threshold for s in scores])
|
|
51
|
+
filtered_proteosomes.append([e for e in proteosome if len(e) > min_len])
|
|
52
|
+
return filtered_proteosomes
|
|
51
53
|
@staticmethod
|
|
52
54
|
def parse_netchop(netchop_output):
|
|
53
55
|
"""
|
|
@@ -99,10 +101,6 @@ class NetChop(object):
|
|
|
99
101
|
return pd.DataFrame(cut_sequences)
|
|
100
102
|
|
|
101
103
|
|
|
102
|
-
import re
|
|
103
|
-
import StringIO
|
|
104
|
-
import pandas as pd
|
|
105
|
-
|
|
106
104
|
def run_mhc(sequences):
|
|
107
105
|
with tempfile.NamedTemporaryFile(dir='/tamir2/nicolaslynn/temp', suffix=".pep", mode="w") as input_fd:
|
|
108
106
|
for (i, sequence) in enumerate(sequences):
|