-
Notifications
You must be signed in to change notification settings - Fork 0
/
do_it.py
49 lines (31 loc) · 1.12 KB
/
do_it.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import sys
sys.path.append('/sw/bioinfo/Chromium-cellranger/7.1.0/bianca/lib/python/')
from cellranger import *
import sys
sys.path.append('/sw/bioinfo/Chromium-cellranger/7.1.0/bianca/lib/python/')
# sys.path.append('/home/richel/GitHubs/cellranger/lib/python')
from cellranger import *
exit()
# From https://stackoverflow.com/a/54956419
import importlib
pkg = importlib.import_module('~/GitHubs/cellranger/lib/python/cellranger')
# check if it's all there..
print(dir(pkg))
sys.modules[module_name] = module
import cellranger.matrix as cr_matrix
exit()
quit()
# from ../cellranger/lib/python import cellranger
# # From https://stackoverflow.com/a/55187291
# import os
# cwd = os.getcwd()
# new_dir = '/sw/bioinfo/Chromium-cellranger/7.1.0/bianca/lib/python/cellranger/'
# list_dir = os.listdir(new_dir) # Find all matching
# os.chdir(new_dir)
# for i in range(len(list_dir)): # Import all of them (or index them in some way)
# module = list_dir[i][0:-3] # Filter off the '.py' file extension
# from module import *
# os.chdir(cwd)
# Back to what the user needs
import cellranger
import cellranger.matrix as cr_matrix