Skip to content

Commit

Permalink
Add cyto and nuc RNA columns for total RNA in data_script.py
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpopinga authored Oct 7, 2024
1 parent f8e8027 commit 83952fd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions WorkSpace/GregorNeuert/data_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@

# Filter the data based on Condition = '2M_NaCl_Step'
filtered_data = data.loc[data['Condition'].str.contains('2M_NaCl_Step', case=False, na=False),
['Cell_id', 'Condition', 'Replica', 'Conc_mM', 'Time_index_min', 'RNA_STL1_cyto_TS3Full']]
['Cell_id', 'Condition', 'Replica', 'Conc_mM', 'Time_index_min',
'RNA_STL1_cyto_TS3Full', 'RNA_STL1_nuc_TS3Full']]

filtered_data.rename(columns={'Time_index_min': 'time'}, inplace=True)
# Sum 'RNA_STL1_cyto_TS3Full' and 'RNA_STL1_nuc_TS3Full' into new column 'RNA_STL1_total_TS3Full'
filtered_data['RNA_STL1_total_TS3Full'] = filtered_data['RNA_STL1_cyto_TS3Full'] + filtered_data['RNA_STL1_nuc_TS3Full']

# Replace 'Time_index_min' with 'time' to be read by SSIT.m
filtered_data.rename(columns={'Time_index_min': 'time'}, inplace=True)

# Define the output file path
output_file = 'filtered_data_2M_NaCl_Step.csv'


# Save the filtered data to a new CSV file
filtered_data.to_csv(output_file, index=False)

Expand Down

0 comments on commit 83952fd

Please sign in to comment.