Skip to content

Commit

Permalink
Try to sanitise samplenames in auto-gen pipeline sheets
Browse files Browse the repository at this point in the history
  • Loading branch information
jfy133 authored Apr 23, 2024
1 parent 7a831c5 commit 226feed
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions AMDirT/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ def prepare_eager_table(
supported_archives (list): list of supported archives
"""

## Reduce risk of filename incompatible characters in sample names
libraries["sample_name"] = libraries["sample_name"].replace(" ", "_").replace("/", "_")

libraries["Colour_Chemistry"] = libraries["instrument_model"].apply(
get_colour_chemistry
)
Expand Down Expand Up @@ -299,6 +302,9 @@ def prepare_mag_table(
supported_archives (list): list of supported archives
"""

## Reduce risk of filename incompatible characters in sample names
libraries["sample_name"] = libraries["sample_name"].replace(" ", "_").replace("/", "_")

# Create a DataFrame for "SINGLE" values
single_libraries = libraries[libraries["library_layout"] == "SINGLE"]

Expand Down Expand Up @@ -386,6 +392,9 @@ def prepare_taxprofiler_table(
supported_archives (list): list of supported archives
"""

## Reduce risk of filename incompatible characters in sample names
libraries["sample_name"] = libraries["sample_name"].replace(" ", "_").replace("/", "_")

libraries["fastq_1"] = libraries["download_links"].apply(
get_filename, orientation="fwd"
)
Expand Down Expand Up @@ -457,6 +466,9 @@ def prepare_aMeta_table(
supported_archives (list): list of supported archives
"""

## Reduce risk of filename incompatible characters in sample names
libraries["sample_name"] = libraries["sample_name"].replace(" ", "_").replace("/", "_")

libraries["Colour_Chemistry"] = libraries["instrument_model"].apply(
get_colour_chemistry
)
Expand Down

0 comments on commit 226feed

Please sign in to comment.