Skip to content

Commit 6c146ed

Browse files
committed
Updated file handling
File handling
1 parent b0c2c30 commit 6c146ed

30 files changed

+127
-2230
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.idea/workspace.xml

Lines changed: 11 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ACSNI.egg-info/PKG-INFO

Lines changed: 0 additions & 190 deletions
This file was deleted.

ACSNI.egg-info/SOURCES.txt

Lines changed: 0 additions & 19 deletions
This file was deleted.

ACSNI.egg-info/dependency_links.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

ACSNI.egg-info/requires.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

ACSNI.egg-info/top_level.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

ACSNI/dat.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,30 @@ def get_row_index(x):
3535

3636
return id_name
3737

38+
def parse_exp(x):
39+
"""
40+
Process the expression file
41+
42+
Parameters
43+
----------
44+
x: matrix of expression
45+
46+
Returns
47+
-------
48+
res: results matrix
49+
"""
50+
51+
x1 = get_row_index(x)
52+
x2 = get_col_names(x)
53+
y = pd.DataFrame()
54+
55+
if len(x1) != 1:
56+
sys.exit("ERROR: Please, check the file and try again")
57+
58+
y['name'] = x[x1[0]]
59+
y = pd.concat([y, x[x2]], axis=1)
60+
return y
61+
3862
def remove_unexpressed(df):
3963
"""
4064
Remove unexpressed genes

0 commit comments

Comments
 (0)