From d1efb70375cf67ef5f9f6a90138541f3b1426912 Mon Sep 17 00:00:00 2001 From: Daniel Standage Date: Mon, 8 Jul 2024 11:54:22 -0400 Subject: [PATCH] Try removing tk from gui.py --- lusSTR/cli/gui.py | 13 ------------- lusSTR/scripts/file_selector.py | 1 - lusSTR/scripts/folder_selector.py | 1 - lusSTR/wrappers/snps_convert.py | 8 ++------ 4 files changed, 2 insertions(+), 21 deletions(-) diff --git a/lusSTR/cli/gui.py b/lusSTR/cli/gui.py index 21abaac..bcd4d82 100644 --- a/lusSTR/cli/gui.py +++ b/lusSTR/cli/gui.py @@ -22,19 +22,6 @@ import os import re -# ------ Packages For File/Folder Directory Selection --------- # - -import tkinter as tk -from tkinter import filedialog - - - -# Create a global Tkinter root window -try: - root = tk.Tk() - root.withdraw() # Hide the root window -except: - print("No GUI available!") ################################################################# # Functions # diff --git a/lusSTR/scripts/file_selector.py b/lusSTR/scripts/file_selector.py index beff54d..2bb858a 100644 --- a/lusSTR/scripts/file_selector.py +++ b/lusSTR/scripts/file_selector.py @@ -12,7 +12,6 @@ import tkinter as tk from tkinter import filedialog -import sys import json diff --git a/lusSTR/scripts/folder_selector.py b/lusSTR/scripts/folder_selector.py index fc55423..80aa85d 100644 --- a/lusSTR/scripts/folder_selector.py +++ b/lusSTR/scripts/folder_selector.py @@ -12,7 +12,6 @@ import tkinter as tk from tkinter import filedialog -import sys import json diff --git a/lusSTR/wrappers/snps_convert.py b/lusSTR/wrappers/snps_convert.py index ad73276..dbbf4f5 100644 --- a/lusSTR/wrappers/snps_convert.py +++ b/lusSTR/wrappers/snps_convert.py @@ -66,13 +66,9 @@ def bin_snps(sample_file, output_type, sample): start = snp_num * 1000 if snp_num != 9: end = start + 1000 - bin_df = sorted_file.iloc[ - start:end, - ].reset_index(drop=True) + bin_df = sorted_file.iloc[start:end,].reset_index(drop=True) else: - bin_df = sorted_file.iloc[ - start : len(sorted_file), - ].reset_index(drop=True) + bin_df = sorted_file.iloc[start : len(sorted_file),].reset_index(drop=True) bin_df["Sample.Name"] = bin_df["Sample.Name"] + "_set" + str((snp_num + 1)) compiled_table = pd.concat([compiled_table, bin_df]) bin_df.to_csv(