Skip to content

Commit 8f4b003

Browse files
committed
Temp fix to strvector rpy2 issue
1 parent 4207377 commit 8f4b003

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

code/aux/aux_functions.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ def read_rFCS(file_path):
3535
''')
3636
fcs_columns = globalenv["marker_names"](raw_FCS)
3737
df_file = globalenv["FF2dframe"](raw_FCS)
38-
if not isinstance(fcs_columns,np.ndarray):
38+
if not isinstance(fcs_columns,np.ndarray): #Error checking for StrVector output from rpy2
3939
print("CALLUM'S ERROR. CONTACT @FerranC96")
4040
print(type(fcs_columns),": ", fcs_columns)
41+
columns_list = []
4142
for i in fcs_columns:
4243
print(i)
43-
bad_flag = 1
44+
columns_list.append(i)
45+
fcs_columns = columns_list
46+
else:
47+
fcs_columns = fcs_columns.tolist()
4448
if not isinstance(df_file,pd.core.frame.DataFrame):
4549
print("CALLUM'S ERROR. CONTACT @FerranC96")
4650
print(type(df_file),": ", df_file)
4751
for i in df_file:
4852
print(i)
49-
bad_flag = 1
50-
if bad_flag ==1:
51-
sys.exit("Bye!")
52-
fcs_columns = fcs_columns.tolist()
5353
original_columns = df_file.columns.values.tolist()
5454
filtered_columns = []
5555
try:

0 commit comments

Comments
 (0)