Skip to content

Commit 58410e0

Browse files
committed
Less restrictive env.
pd append2concat update
1 parent 4244e32 commit 58410e0

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

code/4-dremi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
if num_outliers_total == 0:
146146
df_info_dict[colname_arc] = "-" # this is a placeholder
147147
# Store the info for each marker pair in df_info
148-
df_info = df_info.append(df_info_dict, ignore_index=True)
148+
df_info = pd.concat([df_info, df_info_dict], ignore_index=True)
149149

150150

151151
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Save to file~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

code/aux/aux3_emd.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ def calculate_emd(marker_list, emd_infodict, compare_from, compare_to,
4343
compare_from[marker],
4444
compare_to[marker])
4545
#Add EMD score to the output dataframe
46-
emd_df = emd_df.append(emd_infodict, ignore_index=True)
46+
emd_df = pd.concat([emd_df, pd.DataFrame([emd_infodict])], ignore_index=True)
4747

4848
return emd_df

code/aux/aux_functions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def concatenate_fcs(input_dir):
171171
lambda x: str(fcounter)+"-"+str(x))
172172
except KeyError:
173173
sys.exit("ERROR: Cell_Index missing from data. Have you preprocessed it?")
174-
no_arc = no_arc.append(df, ignore_index=True)
174+
no_arc = pd.concat([no_arc, df], ignore_index=True)
175175
return no_arc, filelist
176176

177177
#Function to concatenate all files and save as txt -> DEPRECATE IN THE NEAR FUTURE!
@@ -199,7 +199,7 @@ def concatenate_save(input_dir, output_dir):
199199
df["Sample_ID-Cell_Index"] = df["Cell_Index"].apply(
200200
lambda x: str(fcounter)+"-"+str(x)) #File+ID #This way the cell-index will be preserved after Cytobank upload
201201
# df["Cell_Index"] = df["Cell_Index"].apply(lambda x: str(fcounter)+"-"+str(x)) #File+ID
202-
concat = concat.append(df, ignore_index=True)
202+
concat = pd.concat([concat, df], ignore_index=True)
203203
print("Concatenating...")
204204
concat.to_csv(f'{output_dir}/concat_{name}.txt', index = False, sep = '\t')
205205
print(f"Concatenated file saved as:\nconcat_{name}.txt")

conda_env.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ channels:
33
# - bioconda
44
- conda-forge
55
dependencies:
6-
- python=3.8
7-
- pip=21
8-
- r-base=4.0
6+
- python=3
7+
- pip
8+
- r-base=4
99
- natsort
1010
- numpy #ALLarch
1111
- pandas #ALLarch

0 commit comments

Comments
 (0)