geney 1.2.3__py2.py3-none-any.whl → 1.2.4__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/data_setup.py CHANGED
@@ -7,7 +7,7 @@ from tqdm import tqdm
7
7
  import requests
8
8
  import argparse
9
9
  from sh import gunzip
10
-
10
+ import shutil
11
11
 
12
12
  def download(external_url, local_path):
13
13
  print(f"Grabbing {external_url}")
@@ -94,6 +94,7 @@ def process_transcript(transcript_df, rev, chrm, cons_data):
94
94
  cds_start, cds_end = cds_start[0], cds_end[0]
95
95
  data.update({'TIS': cds_start, 'TTS': cds_end, 'protein_id': transcript.protein_id})
96
96
 
97
+ print(f"{transcript.transcript_id} in cons_data: {transcript.transcript_id in cons_data}")
97
98
  if transcript.transcript_id in cons_data:
98
99
  data.update({'cons_available': True, 'cons_vector': cons_data[transcript.transcript_id]['scores'], 'cons_seq': cons_data[transcript.transcript_id]['seq']})
99
100
 
@@ -104,6 +105,8 @@ def process_transcript(transcript_df, rev, chrm, cons_data):
104
105
 
105
106
 
106
107
  def retrieve_and_parse_ensembl_annotations(local_path, annotations_file, cons_data, gtex_file='', valid_biotypes=('protein_coding')):
108
+ print(cons_data.keys())
109
+
107
110
  if gtex_file:
108
111
  gtex_df = pd.read_csv(gtex_file, delimiter='\t', header=2)
109
112
  gtex_df.Name = gtex_df.apply(lambda row: row.Name.split('.')[0], axis=1)
@@ -225,21 +228,24 @@ def main():
225
228
  'TEMP': os.path.join(args.basepath, args.organism, 'temp')
226
229
  }
227
230
 
231
+ base_path = Path(args.basepath) / args.organism
232
+
228
233
  if config_file.exists():
229
234
  config_data = unload_json(config_file)
230
235
  overwrite = 'y'
231
236
  if args.organism in config_data:
232
237
  overwrite = input("Organism {args.organism} already configured... Overwrite? (y/n)")
238
+
233
239
  if overwrite == 'y':
234
240
  config_data[args.organism] = config_paths
235
241
  dump_json(config_file, config_data)
242
+ shutil.rmtree(base_path)
236
243
  else:
237
244
  raise SystemExit("Exiting configuration.")
238
245
  else:
239
246
  config_data = {args.organism: config_paths}
240
247
  dump_json(config_file, config_data)
241
248
 
242
- base_path = Path(args.basepath) / args.organism
243
249
  if base_path.exists() and len(os.listdir(base_path)) > 0:
244
250
  raise FileExistsError(f"Directory {base_path} not empty.")
245
251
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geney
3
- Version: 1.2.3
3
+ Version: 1.2.4
4
4
  Summary: A Python package for gene expression modeling.
5
5
  Home-page: https://github.com/nicolaslynn/geney
6
6
  Author: Nicolas Lynn
@@ -17,7 +17,7 @@ Requires-Dist: numpy ==1.26.4
17
17
  Requires-Dist: pandas ==2.2.1
18
18
  Requires-Dist: networkx ==3.2.1
19
19
  Requires-Dist: viennarna ==2.6.4
20
- Requires-Dist: tqdm ==4.66.1
20
+ Requires-Dist: tqdm >=4.66.1
21
21
  Requires-Dist: spliceai ==1.3.1
22
22
  Requires-Dist: scikit-learn ==1.0.2
23
23
  Requires-Dist: biopython ==1.81
@@ -4,7 +4,7 @@ geney/__init__.py,sha256=r-Yvpo_Tc236DcsqsFyexT21iVoYCVl9zoJj5pFuWEE,407
4
4
  geney/benchmark_clinvar.py,sha256=LLl77e95Qbg9Kd-m2yL8ilmzubSz9SKogeARwssT4Ks,5532
5
5
  geney/compare_sets.py,sha256=TcgL57V7BUPxBoW9lv3xr8qK2Acmykn85Ev3avicQr8,2977
6
6
  geney/config_setup.py,sha256=VA6mhVGMRadwlpEx4m1wrssmDM8qpfKT21MAijIwjyQ,428
7
- geney/data_setup.py,sha256=mV_sSCMT8C41q_PD_G34MIBvsBKA0Czrpw17-DcYmT4,12052
7
+ geney/data_setup.py,sha256=LTiJMYPgv9KnIgUNw-D57Fu4nxL4OojXMpmdhE8QSYU,12228
8
8
  geney/gtex.py,sha256=asL2lHyU5KsbWpV096vkf1Ka7hSo_RRfZqw7p5nERmE,1919
9
9
  geney/gtex_utils.py,sha256=asL2lHyU5KsbWpV096vkf1Ka7hSo_RRfZqw7p5nERmE,1919
10
10
  geney/immune_utils.py,sha256=ZRni5ttrhpYBnmNr0d0ZatIbNPYs4nmQuoUO00SpsS4,5271
@@ -45,7 +45,7 @@ geney/translation_initiation/resources/kozak_pssm.json,sha256=pcd0Olziutq-6H3mFW
45
45
  geney/translation_initiation/resources/tis_regressor_model.joblib,sha256=IXb4DUDhJ5rBDKcqMk9zE3ECTZZcdj7Jixz3KpoZ7OA,2592025
46
46
  geney/translation_termination/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
47
  geney/translation_termination/tts_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
- geney-1.2.3.dist-info/METADATA,sha256=K6ufQEQw0PTbczOxkWFW26U4URgwy92Q9Aqp8BhsKIA,1198
49
- geney-1.2.3.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
50
- geney-1.2.3.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
51
- geney-1.2.3.dist-info/RECORD,,
48
+ geney-1.2.4.dist-info/METADATA,sha256=0oE3AHzIGNnpkmPiPK0wXpDRuxZbA6ZcdvpOloz82bQ,1198
49
+ geney-1.2.4.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
50
+ geney-1.2.4.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
51
+ geney-1.2.4.dist-info/RECORD,,
File without changes