Spaces:
Sleeping
Sleeping
Update Quality_Control.py
Browse files- Quality_Control.py +7 -5
Quality_Control.py
CHANGED
@@ -22,6 +22,7 @@ from bokeh.io import curdoc
|
|
22 |
from bokeh.models import Span, Label
|
23 |
from bokeh.models import ColumnDataSource, Button
|
24 |
from my_modules import *
|
|
|
25 |
|
26 |
#Silence FutureWarnings & UserWarnings
|
27 |
warnings.filterwarnings('ignore', category= FutureWarning)
|
@@ -54,7 +55,7 @@ print(selected_metadata_files)'''
|
|
54 |
|
55 |
|
56 |
|
57 |
-
base_dir = '/
|
58 |
set_path = 'test'
|
59 |
selected_metadata_files = "['Slide_B_DD1s1.one_1.tif.csv', 'Slide_B_DD1s1.one_2.tif.csv']"
|
60 |
ls_samples = "['Ashlar_Exposure_Time.csv', 'new_data.csv', 'DD3S1.csv', 'DD3S2.csv', 'DD3S3.csv', 'TMA.csv']"
|
@@ -238,9 +239,9 @@ ls_samples
|
|
238 |
|
239 |
|
240 |
# In[29]:
|
241 |
-
|
242 |
-
|
243 |
-
df = pd.read_csv(os.path.join(input_data_dir, ls_samples[0]),index_col = 0, nrows = 1)
|
244 |
df.head(10)
|
245 |
|
246 |
|
@@ -249,7 +250,7 @@ df.head(10)
|
|
249 |
|
250 |
# First gather information on expected headers using first file in ls_samples
|
251 |
# Read in the first row of the file corresponding to the first sample (index = 0) in ls_samples
|
252 |
-
df = pd.read_csv(os.path.join(input_data_dir, ls_samples[0]) , index_col = 0, nrows = 1)
|
253 |
|
254 |
|
255 |
# Make sure the file was imported correctly
|
@@ -341,6 +342,7 @@ for sample in ls_samples:
|
|
341 |
|
342 |
try:
|
343 |
# Read the CSV file
|
|
|
344 |
df = pd.read_csv(file_path, index_col=0)
|
345 |
# Check if the DataFrame is empty, if so, don't continue trying to process df and remove it
|
346 |
|
|
|
22 |
from bokeh.models import Span, Label
|
23 |
from bokeh.models import ColumnDataSource, Button
|
24 |
from my_modules import *
|
25 |
+
from datasets import load_dataset
|
26 |
|
27 |
#Silence FutureWarnings & UserWarnings
|
28 |
warnings.filterwarnings('ignore', category= FutureWarning)
|
|
|
55 |
|
56 |
|
57 |
|
58 |
+
base_dir = '/Users/harshithakolipaka/Downloads/wetransfer_data-zip_2024-05-17_1431'
|
59 |
set_path = 'test'
|
60 |
selected_metadata_files = "['Slide_B_DD1s1.one_1.tif.csv', 'Slide_B_DD1s1.one_2.tif.csv']"
|
61 |
ls_samples = "['Ashlar_Exposure_Time.csv', 'new_data.csv', 'DD3S1.csv', 'DD3S2.csv', 'DD3S3.csv', 'TMA.csv']"
|
|
|
239 |
|
240 |
|
241 |
# In[29]:
|
242 |
+
path = os.path.join(input_data_dir, ls_samples[0])
|
243 |
+
df = load_dataset('csv', data_files = path )
|
244 |
+
#df = pd.read_csv(os.path.join(input_data_dir, ls_samples[0]),index_col = 0, nrows = 1)
|
245 |
df.head(10)
|
246 |
|
247 |
|
|
|
250 |
|
251 |
# First gather information on expected headers using first file in ls_samples
|
252 |
# Read in the first row of the file corresponding to the first sample (index = 0) in ls_samples
|
253 |
+
#df = pd.read_csv(os.path.join(input_data_dir, ls_samples[0]) , index_col = 0, nrows = 1)
|
254 |
|
255 |
|
256 |
# Make sure the file was imported correctly
|
|
|
342 |
|
343 |
try:
|
344 |
# Read the CSV file
|
345 |
+
df = load_dataset("csv", data_files = file_path)
|
346 |
df = pd.read_csv(file_path, index_col=0)
|
347 |
# Check if the DataFrame is empty, if so, don't continue trying to process df and remove it
|
348 |
|