From 24a02a178c8b6719df0f6586760843e116d56668 Mon Sep 17 00:00:00 2001 From: Mikko Nieminen Date: Thu, 8 Feb 2024 15:44:16 +0100 Subject: [PATCH] fix file name slash sanitization (#37) --- cubi_isa_templates/isatab-generic/cookiecutter.json | 2 +- cubi_isa_templates/isatab-germline/cookiecutter.json | 2 +- .../isatab-mass_cytometry/cookiecutter.json | 2 +- cubi_isa_templates/isatab-microarray/cookiecutter.json | 4 ++-- .../isatab-ms_meta_biocrates/cookiecutter.json | 8 ++++---- .../isatab-single_cell_rnaseq/cookiecutter.json | 2 +- cubi_isa_templates/isatab-somatic/cookiecutter.json | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cubi_isa_templates/isatab-generic/cookiecutter.json b/cubi_isa_templates/isatab-generic/cookiecutter.json index df1fd9f..d81e1b0 100644 --- a/cubi_isa_templates/isatab-generic/cookiecutter.json +++ b/cubi_isa_templates/isatab-generic/cookiecutter.json @@ -46,7 +46,7 @@ "center_contact": "", "study_title": "{{cookiecutter.investigation_title}}", - "s_file_name": "{{cookiecutter.investigation_title|replace(' ', '_')}}", + "s_file_name": "{{cookiecutter.investigation_title|replace(' ', '_')|replace('/', '_')}}", "assay_prefix": "{{cookiecutter.s_file_name|lower}}", "a_measurement_abbreviation": "{% if cookiecutter.a_measurement_type == 'transcription profiling' %}mRNA_seq{% else %}UNKNOWN{% endif %}", "assay_name": "{{cookiecutter.a_measurement_type|replace(' ', '_')}}_{{cookiecutter.a_technology_type|replace(' ', '_')}}", diff --git a/cubi_isa_templates/isatab-germline/cookiecutter.json b/cubi_isa_templates/isatab-germline/cookiecutter.json index 69ad105..f2abb0d 100644 --- a/cubi_isa_templates/isatab-germline/cookiecutter.json +++ b/cubi_isa_templates/isatab-germline/cookiecutter.json @@ -1,7 +1,7 @@ { "investigation_title": "Investigation Title", "study_title": "{{cookiecutter.investigation_title}}", - "s_file_name": "{{cookiecutter.investigation_title|replace(' ', '_')|lower}}", + "s_file_name": "{{cookiecutter.investigation_title|replace(' ', '_')|replace('/', '_')|lower}}", "source_names": "index,mother,father", "measurement_type": [ "exome sequencing", diff --git a/cubi_isa_templates/isatab-mass_cytometry/cookiecutter.json b/cubi_isa_templates/isatab-mass_cytometry/cookiecutter.json index d0dbdca..4949219 100644 --- a/cubi_isa_templates/isatab-mass_cytometry/cookiecutter.json +++ b/cubi_isa_templates/isatab-mass_cytometry/cookiecutter.json @@ -38,7 +38,7 @@ "sample_factor_types": "intracellular structure,chemical compound,time span", "dissociation_type": ["No", "pre-fix Trypsin", "post-fix Trypsin", "post-fix Octo"], "sample_multiplexing": ["No", "SBT Pd 20-plex", "TOBis 35-plex", "Other"], - "__s_file_name": "{{cookiecutter.investigation_identifier|replace(' ', '_')}}", + "__s_file_name": "{{cookiecutter.investigation_identifier|replace(' ', '_')|replace('/', '_')}}", "__assay_prefix": "{{cookiecutter.__s_file_name}}", "__output_dir": "Required variable. Do not remove.", "__prompts__": { diff --git a/cubi_isa_templates/isatab-microarray/cookiecutter.json b/cubi_isa_templates/isatab-microarray/cookiecutter.json index be957ae..55ed105 100644 --- a/cubi_isa_templates/isatab-microarray/cookiecutter.json +++ b/cubi_isa_templates/isatab-microarray/cookiecutter.json @@ -22,11 +22,11 @@ "array_design_ref": "", "study_title": "{{cookiecutter.investigation_title}}", - "s_file_name": "{{cookiecutter.investigation_title|replace(' ', '_')}}", + "s_file_name": "{{cookiecutter.investigation_title|replace(' ', '_')|replace('/', '_')}}", "assay_prefix": "{{cookiecutter.s_file_name|lower}}", "a_technology_type": "microarray", "assay_name": "{{cookiecutter.a_measurement_type|replace(' ', '_')}}_{{cookiecutter.a_technology_type|replace(' ', '_')}}", - + "_terms": { "transcription profiling": { "accession_number": "http://purl.obolibrary.org/obo/OBI_0000424", diff --git a/cubi_isa_templates/isatab-ms_meta_biocrates/cookiecutter.json b/cubi_isa_templates/isatab-ms_meta_biocrates/cookiecutter.json index 6de6901..af34421 100644 --- a/cubi_isa_templates/isatab-ms_meta_biocrates/cookiecutter.json +++ b/cubi_isa_templates/isatab-ms_meta_biocrates/cookiecutter.json @@ -2,11 +2,11 @@ "investigation_title": "Investigation Title", "study_title": "{{cookiecutter.investigation_title}}", - "study_id": "{{cookiecutter.study_title|lower|replace(' ', '_')}}", + "study_id": "{{cookiecutter.study_title|lower|replace(' ', '_')|replace('/', '_')}}", "study_file_name": "{{cookiecutter.study_id}}", "sample_names": "alpha,beta,gamma", - + "organism": [ "Homo sapiens", "Mus musculus" @@ -21,7 +21,7 @@ "taxon": "10090" } }, - + "assay_measurement_type": [ "metabolite profiling" ], @@ -35,7 +35,7 @@ "accession": "http://purl.obolibrary.org/obo/OBI_0000470" } }, - + "biocrates_kit": [ "Biocrates MxP Quant 500 Kit", "Biocrates AbsoluteIDQ p400 HR Kit" diff --git a/cubi_isa_templates/isatab-single_cell_rnaseq/cookiecutter.json b/cubi_isa_templates/isatab-single_cell_rnaseq/cookiecutter.json index a9b0842..8d4b6a9 100644 --- a/cubi_isa_templates/isatab-single_cell_rnaseq/cookiecutter.json +++ b/cubi_isa_templates/isatab-single_cell_rnaseq/cookiecutter.json @@ -27,7 +27,7 @@ "sample_multiplexing": ["No", "CellPlex", "TotalSeq", "Other"], "genotype_multiplexing": ["no", "yes"], "study_title": "{{cookiecutter.investigation_title}}", - "s_file_name": "{{cookiecutter.investigation_title|replace(' ', '_')}}", + "s_file_name": "{{cookiecutter.investigation_title|replace(' ', '_')|replace('/', '_')}}", "assay_prefix": "{{cookiecutter.s_file_name|lower}}", "a_technology_type": "nucleotide sequencing", "assay_name": "{{cookiecutter.a_measurement_type|replace(' ', '_')}}_{{cookiecutter.a_technology_type|replace(' ', '_')}}", diff --git a/cubi_isa_templates/isatab-somatic/cookiecutter.json b/cubi_isa_templates/isatab-somatic/cookiecutter.json index 1de41f1..3c3dc79 100644 --- a/cubi_isa_templates/isatab-somatic/cookiecutter.json +++ b/cubi_isa_templates/isatab-somatic/cookiecutter.json @@ -1,7 +1,7 @@ { "investigation_title": "Investigation Title", "study_title": "{{cookiecutter.investigation_title}}", - "s_file_name": "{{cookiecutter.investigation_title|replace(' ', '_')|lower}}", + "s_file_name": "{{cookiecutter.investigation_title|replace(' ', '_')|replace('/', '_')|lower}}", "source_names": "patient1,patient2", "neoplasm_type": [ "Primary Neoplasm",