geney 1.1.7__py2.py3-none-any.whl → 1.1.9__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/netchop.py CHANGED
@@ -8,7 +8,6 @@ class NetChop(object):
8
8
  """
9
9
  Wrapper around netChop tool. Assumes netChop is in your PATH.
10
10
  """
11
-
12
11
  def predict_epitopes(self, sequences, threshold, min_len=8):
13
12
  """
14
13
  Return netChop predictions for each position in each sequence.
@@ -26,22 +25,22 @@ class NetChop(object):
26
25
  the cleavage probability for each position in the sequence.
27
26
  """
28
27
  with tempfile.NamedTemporaryFile(dir=config_setup['NETCHOP'], suffix=".fsa", mode="w") as input_fd:
29
- print(f"Writing to {input_fd.name}...")
28
+ # temp_file = config_setup['NETCHOP'] / 'netchop_input.fsa'
29
+ # with open(temp_file, 'w') as input_fd:
30
30
  for (i, sequence) in enumerate(sequences):
31
- print(f"\tseq{i}: {sequence}")
32
- input_fd.write("> %d\n" % i)
33
- input_fd.write(sequence)
34
- input_fd.write("\n")
35
- input_fd.flush()
31
+ _ = input_fd.write("> %d\n" % i)
32
+ _ = input_fd.write(sequence)
33
+ _ = input_fd.write("\n")
34
+ # input_fd.flush()
35
+ # print(str(temp_file))
36
36
 
37
37
  try:
38
- output = subprocess.check_output(["netChop", input_fd.name])
38
+ output = subprocess.check_output(["netChop", str(input_fd.name)])
39
39
  except subprocess.CalledProcessError as e:
40
40
  logging.error("Error calling netChop: %s:\n%s" % (e, e.output))
41
41
  raise
42
42
 
43
43
  parsed = self.parse_netchop(output)
44
-
45
44
  assert len(parsed) == len(sequences), \
46
45
  "Expected %d results but got %d" % (
47
46
  len(sequences), len(parsed))
@@ -51,7 +50,6 @@ class NetChop(object):
51
50
  proteosome = self.chop_protein(seq, [s > threshold for s in scores])
52
51
  filtered_proteosomes.append([e for e in proteosome if len(e) > min_len])
53
52
  return filtered_proteosomes
54
-
55
53
  @staticmethod
56
54
  def parse_netchop(netchop_output):
57
55
  """
@@ -70,7 +68,6 @@ class NetChop(object):
70
68
  scores[-1].append(score)
71
69
  line = next(line_iterator)
72
70
  return scores
73
-
74
71
  def chop_protein(self, seq, pos):
75
72
  # Generate subsequences using list comprehension and slicing
76
73
  start = 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geney
3
- Version: 1.1.7
3
+ Version: 1.1.9
4
4
  Summary: A Python package for gene expression modeling.
5
5
  Home-page: https://github.com/nicolaslynn/geney
6
6
  Author: Nicolas Lynn
@@ -7,7 +7,7 @@ geney/config_setup.py,sha256=SePeooA4RWAtR_KAT1-W1hkD3MT5tH6YMyp80t_RNPQ,385
7
7
  geney/data_setup.py,sha256=DZeksRPr2ZT7bszMo33W0r3OwmqHokVXtZ4gx5Lu_Mo,10725
8
8
  geney/gtex.py,sha256=asL2lHyU5KsbWpV096vkf1Ka7hSo_RRfZqw7p5nERmE,1919
9
9
  geney/gtex_utils.py,sha256=asL2lHyU5KsbWpV096vkf1Ka7hSo_RRfZqw7p5nERmE,1919
10
- geney/netchop.py,sha256=h6hRkfYvmkU-ZI9Zeg5mW1fGUN4e97-Ar4r7aSGx7UE,2981
10
+ geney/netchop.py,sha256=dYnhcc5p0ZBmVyEYl1Y0v7ImgM0MkTJ32eqbkH8Wabk,3050
11
11
  geney/oncosplice.py,sha256=Fyc_UtAhV3Pv0vk8V55rO_jnb2Dwj5sW98KVwP3PHwU,68964
12
12
  geney/oncosplice_pipeline.py,sha256=hpGqFHOdn8i8tvvs1-t3-G9Ko18zInwoDXBJbbrfbC4,68036
13
13
  geney/performance_utils.py,sha256=FQt7rA4r-Wuq3kceCxsSuMfj3wU1tMG8QnbL59aBohs,4700
@@ -43,7 +43,7 @@ geney/translation_initiation/resources/kozak_pssm.json,sha256=pcd0Olziutq-6H3mFW
43
43
  geney/translation_initiation/resources/tis_regressor_model.joblib,sha256=IXb4DUDhJ5rBDKcqMk9zE3ECTZZcdj7Jixz3KpoZ7OA,2592025
44
44
  geney/translation_termination/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
45
  geney/translation_termination/tts_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
- geney-1.1.7.dist-info/METADATA,sha256=-arp47Qb2ah8D5x0TTBDaeUNu3kFwhmzwwBdiz5J0L8,1130
47
- geney-1.1.7.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
48
- geney-1.1.7.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
49
- geney-1.1.7.dist-info/RECORD,,
46
+ geney-1.1.9.dist-info/METADATA,sha256=UhLRy4eXmizPtS10lnyzeZ7FG_4_zFOzf8Tw2t8xNV8,1130
47
+ geney-1.1.9.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
48
+ geney-1.1.9.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
49
+ geney-1.1.9.dist-info/RECORD,,
File without changes