LL_net.trans_reg(GRNdir,method,outdir)
TypeError Traceback (most recent call last)
Cell In[42], line 4
1 # trans-regulatory network
2 # The output is 'cell_population_trans_regulatory.txt', a matrix of the trans-regulatory score.
----> 4 LL_net.trans_reg(GRNdir,method,outdir)
TypeError: trans_reg() missing 1 required positional argument: 'genome'
LL_net.trans_reg(GRNdir,method,genome,outdir)
Generate trans-regulatory netowrk ...
0%| | 0/23 [00:00<?, ?it/s]
FileNotFoundError Traceback (most recent call last)
Cell In[43], line 1
----> 1 LL_net.trans_reg(GRNdir,method,genome,outdir)
File ~/miniconda3/envs/LINGER/lib/python3.10/site-packages/LingerGRN/LL_net.py:1093, in trans_reg(GRNdir, method, outdir, genome)
1091 for i in tqdm(range(23)):
1092 chrN=chrom[i]
-> 1093 temp=trans_shap(chrN,outdir)
1094 S=pd.concat([S,temp],axis=0,join='outer')
1095 elif method=='scNN':
File ~/miniconda3/envs/LINGER/lib/python3.10/site-packages/LingerGRN/LL_net.py:646, in trans_shap(chr, outdir)
644 TF_1=[]
645 score_1=[]
--> 646 data_merge_temp,geneName,REindex,TFindex,shap_all,TFName,REName=load_shap(chr,outdir)
647 from tqdm import tqdm
648 for j in tqdm(range(data_merge_temp.shape[0])):
File ~/miniconda3/envs/LINGER/lib/python3.10/site-packages/LingerGRN/LL_net.py:582, in load_shap(chr, outdir)
580 import csv
581 #print('loading shapley value '+chr+' ...')
--> 582 shap_all=torch.load(outdir+"shap_"+chr+".pt")
583 import pandas as pd
584 idx_file=outdir+'index.txt'
File ~/miniconda3/envs/LINGER/lib/python3.10/site-packages/torch/serialization.py:986, in load(f, map_location, pickle_module, weights_only, mmap, **pickle_load_args)
983 if 'encoding' not in pickle_load_args.keys():
984 pickle_load_args['encoding'] = 'utf-8'
--> 986 with _open_file_like(f, 'rb') as opened_file:
987 if _is_zipfile(opened_file):
988 # The zipfile reader is going to advance the current file position.
989 # If we want to actually tail call to torch.jit.load, we need to
990 # reset back to the original position.
991 orig_position = opened_file.tell()
File ~/miniconda3/envs/LINGER/lib/python3.10/site-packages/torch/serialization.py:435, in _open_file_like(name_or_buffer, mode)
433 def _open_file_like(name_or_buffer, mode):
434 if _is_path(name_or_buffer):
--> 435 return _open_file(name_or_buffer, mode)
436 else:
437 if 'w' in mode:
File ~/miniconda3/envs/LINGER/lib/python3.10/site-packages/torch/serialization.py:416, in _open_file.init(self, name, mode)
415 def init(self, name, mode):
--> 416 super().init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'hg38shap_chr1.pt'
LL_net.trans_reg(GRNdir,method,outdir)TypeError Traceback (most recent call last)
Cell In[42], line 4
1 # trans-regulatory network
2 # The output is 'cell_population_trans_regulatory.txt', a matrix of the trans-regulatory score.
----> 4 LL_net.trans_reg(GRNdir,method,outdir)
TypeError: trans_reg() missing 1 required positional argument: 'genome'
LL_net.trans_reg(GRNdir,method,genome,outdir)Generate trans-regulatory netowrk ...
0%| | 0/23 [00:00<?, ?it/s]
FileNotFoundError Traceback (most recent call last)
Cell In[43], line 1
----> 1 LL_net.trans_reg(GRNdir,method,genome,outdir)
File ~/miniconda3/envs/LINGER/lib/python3.10/site-packages/LingerGRN/LL_net.py:1093, in trans_reg(GRNdir, method, outdir, genome)
1091 for i in tqdm(range(23)):
1092 chrN=chrom[i]
-> 1093 temp=trans_shap(chrN,outdir)
1094 S=pd.concat([S,temp],axis=0,join='outer')
1095 elif method=='scNN':
File ~/miniconda3/envs/LINGER/lib/python3.10/site-packages/LingerGRN/LL_net.py:646, in trans_shap(chr, outdir)
644 TF_1=[]
645 score_1=[]
--> 646 data_merge_temp,geneName,REindex,TFindex,shap_all,TFName,REName=load_shap(chr,outdir)
647 from tqdm import tqdm
648 for j in tqdm(range(data_merge_temp.shape[0])):
File ~/miniconda3/envs/LINGER/lib/python3.10/site-packages/LingerGRN/LL_net.py:582, in load_shap(chr, outdir)
580 import csv
581 #print('loading shapley value '+chr+' ...')
--> 582 shap_all=torch.load(outdir+"shap_"+chr+".pt")
583 import pandas as pd
584 idx_file=outdir+'index.txt'
File ~/miniconda3/envs/LINGER/lib/python3.10/site-packages/torch/serialization.py:986, in load(f, map_location, pickle_module, weights_only, mmap, **pickle_load_args)
983 if 'encoding' not in pickle_load_args.keys():
984 pickle_load_args['encoding'] = 'utf-8'
--> 986 with _open_file_like(f, 'rb') as opened_file:
987 if _is_zipfile(opened_file):
988 # The zipfile reader is going to advance the current file position.
989 # If we want to actually tail call to torch.jit.load, we need to
990 # reset back to the original position.
991 orig_position = opened_file.tell()
File ~/miniconda3/envs/LINGER/lib/python3.10/site-packages/torch/serialization.py:435, in _open_file_like(name_or_buffer, mode)
433 def _open_file_like(name_or_buffer, mode):
434 if _is_path(name_or_buffer):
--> 435 return _open_file(name_or_buffer, mode)
436 else:
437 if 'w' in mode:
File ~/miniconda3/envs/LINGER/lib/python3.10/site-packages/torch/serialization.py:416, in _open_file.init(self, name, mode)
415 def init(self, name, mode):
--> 416 super().init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'hg38shap_chr1.pt'