Skip to content

Commit

Permalink
Update taca/element/Element_Runs.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ssjunnebo authored Sep 26, 2024
1 parent cf64192 commit 2559ecc
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions taca/element/Element_Runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,29 +459,6 @@ def clear_dir(dir):
print(f"Failed to delete {file_path} Reason {e}")

# Create symlink for a simple demultiplexing dir
def symlink_demux_dir(src_dir, dest_dir):
# Ensure the destination directory exists
if not os.path.exists(dest_dir):
os.makedirs(dest_dir)
# Clear all content under dest_dir
clear_dir(dest_dir)
# Loop through all files and directories in the source directory
for item in os.listdir(src_dir):
src_path = os.path.join(src_dir, item)
# Move content of Samples to the parental dir
if item == "Samples":
dest_path = dest_dir
else:
dest_path = os.path.join(dest_dir, item)
try:
# Create symbolic link only if it doesn't already exist
if not os.path.exists(dest_path):
os.symlink(src_path, dest_path)
print(f"Linked {src_path} to {dest_path}")
else:
print(f"{dest_path} already exists.")
except OSError as e:
print(f"Error linking {src_path} to {dest_path}: {e}")


# Write to csv
Expand Down

0 comments on commit 2559ecc

Please sign in to comment.