|
@@ -0,0 +1,54 @@
|
|
|
+import numpy as np
|
|
|
+
|
|
|
+import os
|
|
|
+
|
|
|
+import pandas as pd
|
|
|
+
|
|
|
+################################################################
|
|
|
+######## Analysis pipeline for concatenated recordings #########
|
|
|
+################################################################
|
|
|
+
|
|
|
+path = "/media/andrey/My Passport/GIN/backup_Anesthesia_CA1/calcium imaging transition state/concatenated/8235/20201103_GCaMP6f_8235_isoflurane/suite2p/plane0"
|
|
|
+
|
|
|
+
|
|
|
+Traces = np.load(path + '/F.npy', allow_pickle=True)
|
|
|
+Npil = np.load(path + '/Fneu.npy', allow_pickle=True)
|
|
|
+iscell = np.load(path + '/iscell.npy', allow_pickle=True)
|
|
|
+
|
|
|
+print(Traces.shape, type(Traces))
|
|
|
+print(Npil.shape, type(Npil))
|
|
|
+print(iscell.shape, type(iscell))
|
|
|
+
|
|
|
+#path_excel_rec = str(meta_data['Folder'][recording] + meta_data['Subfolder'][recording] + 'suite2p/plane0')
|
|
|
+if not os.path.exists('#8235_iso_minidataset'):
|
|
|
+ os.mkdir("./#8235_iso_minidataset")
|
|
|
+
|
|
|
+if not os.path.exists('#8235_iso_minidataset/suite2p'):
|
|
|
+ os.mkdir("./#8235_iso_minidataset/suite2p")
|
|
|
+
|
|
|
+if not os.path.exists('#8235_iso_minidataset/suite2p/plane0'):
|
|
|
+ os.mkdir("./#8235_iso_minidataset/suite2p/plane0")
|
|
|
+
|
|
|
+
|
|
|
+np.save('#8235_iso_minidataset/suite2p/plane0/F.npy',Traces[:50,:])
|
|
|
+np.save('#8235_iso_minidataset/suite2p/plane0/Fneu.npy',Npil[:50,:])
|
|
|
+np.save('#8235_iso_minidataset/suite2p/plane0/iscell.npy',iscell[:50,:])
|
|
|
+
|
|
|
+
|
|
|
+meta_data = pd.read_excel("../meta_data/meta_recordings_transition_state.xlsx")
|
|
|
+
|
|
|
+meta_data = meta_data[meta_data.Mouse_all == 8235]
|
|
|
+
|
|
|
+meta_data.index = np.arange(meta_data.shape[0])
|
|
|
+
|
|
|
+meta_data["Number"] = meta_data.index
|
|
|
+
|
|
|
+print(np.arange(meta_data.shape[0]))
|
|
|
+
|
|
|
+meta_data.Folder = "/media/andrey/My Passport/GIN/Anesthesia_CA1/data_colab/"
|
|
|
+
|
|
|
+meta_data.Subfolder = "#8235_iso_minidataset/"
|
|
|
+
|
|
|
+meta_data.to_excel("./#8235_iso_minidataset/meta_recordings_8235.xlsx")
|
|
|
+
|
|
|
+
|