From bdf0e21f8c83e199877afcfef86163cd32cd0c9c Mon Sep 17 00:00:00 2001 From: sellth Date: Fri, 28 Apr 2023 17:20:32 +0200 Subject: [PATCH] fix: handling of input argument (#163) --- cubi_tk/isa_tpl/__init__.py | 4 ++-- cubi_tk/isa_tpl/isatab-bulk_rnaseq/cookiecutter.json | 8 ++++---- ...er.assay_prefix}}_{{cookiecutter.assay_name}}.txt | 0 .../i_Investigation.txt | 2 +- .../s_{{cookiecutter.s_file_name}}.txt | 0 cubi_tk/isa_tpl/isatab-generic/cookiecutter.json | 8 ++++---- .../.~lock.s_{{cookiecutter.s_file_name}}.txt# | 0 ...er.assay_prefix}}_{{cookiecutter.assay_name}}.txt | 0 .../i_Investigation.txt | 2 +- .../s_{{cookiecutter.s_file_name}}.txt | 0 cubi_tk/isa_tpl/isatab-germline/cookiecutter.json | 8 ++++---- ...er.assay_prefix}}_{{cookiecutter.assay_name}}.txt | 0 .../i_Investigation.txt | 2 +- .../s_{{cookiecutter.s_file_name}}.txt | 0 cubi_tk/isa_tpl/isatab-microarray/cookiecutter.json | 8 ++++---- ...er.assay_prefix}}_{{cookiecutter.assay_name}}.txt | 0 .../i_investigation.txt | 2 +- .../s_{{cookiecutter.s_file_name}}.txt | 0 .../isatab-ms_meta_biocrates/cookiecutter.json | 4 ++-- ...ssay_prefix}}_{{cookiecutter.assay_name}}_FIA.txt | 0 ...assay_prefix}}_{{cookiecutter.assay_name}}_LC.txt | 0 .../i_Investigation.txt | 0 .../s_{{cookiecutter.study_file_name}}.txt | 0 .../isatab-single_cell_rnaseq/cookiecutter.json | 10 +++++----- ...er.assay_prefix}}_{{cookiecutter.assay_name}}.txt | 0 .../i_Investigation.txt | 2 +- .../s_{{cookiecutter.s_file_name}}.txt | 0 .../isa_tpl/isatab-stem_cell_core/cookiecutter.json | 8 ++++---- ...er.assay_prefix}}_{{cookiecutter.assay_name}}.txt | 0 .../i_Investigation.txt | 2 +- .../s_{{cookiecutter.s_file_name}}.txt | 0 .../isatab-stem_cell_core_bulk/cookiecutter.json | 4 ++-- ...er.assay_prefix}}_{{cookiecutter.assay_name}}.txt | 0 .../i_Investigation.txt | 2 +- .../s_{{cookiecutter.s_file_name}}.txt | 0 .../isatab-stem_cell_core_sc/cookiecutter.json | 4 ++-- ...er.assay_prefix}}_{{cookiecutter.assay_name}}.txt | 0 .../i_Investigation.txt | 2 +- .../s_{{cookiecutter.s_file_name}}.txt | 0 ...er.assay_prefix}}_{{cookiecutter.assay_name}}.txt | 0 .../i_Investigation.txt | 0 .../s_{{cookiecutter.s_file_name}}.txt | 0 .../isatab-tumor_normal_triplets/cookiecutter.json | 8 ++++---- ...transcriptome_profiling_nucleotide_sequencing.txt | 0 ...er.assay_prefix}}_{{cookiecutter.assay_name}}.txt | 0 .../i_Investigation.txt | 2 +- .../s_{{cookiecutter.s_file_name}}.txt | 0 tests/test_isa_tpl.py | 12 ++++++++---- 48 files changed, 54 insertions(+), 50 deletions(-) rename cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/i_Investigation.txt (98%) rename cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/s_{{cookiecutter.s_file_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-generic/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/.~lock.s_{{cookiecutter.s_file_name}}.txt# (100%) rename cubi_tk/isa_tpl/isatab-generic/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-generic/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/i_Investigation.txt (99%) rename cubi_tk/isa_tpl/isatab-generic/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/s_{{cookiecutter.s_file_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-germline/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-germline/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/i_Investigation.txt (99%) rename cubi_tk/isa_tpl/isatab-germline/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/s_{{cookiecutter.s_file_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-microarray/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-microarray/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/i_investigation.txt (98%) rename cubi_tk/isa_tpl/isatab-microarray/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/s_{{cookiecutter.s_file_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}_FIA.txt (100%) rename cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}_LC.txt (100%) rename cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/i_Investigation.txt (100%) rename cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/s_{{cookiecutter.study_file_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/i_Investigation.txt (99%) rename cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/s_{{cookiecutter.s_file_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-stem_cell_core/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-stem_cell_core/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/i_Investigation.txt (99%) rename cubi_tk/isa_tpl/isatab-stem_cell_core/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/s_{{cookiecutter.s_file_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/i_Investigation.txt (99%) rename cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/s_{{cookiecutter.s_file_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/i_Investigation.txt (99%) rename cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/s_{{cookiecutter.s_file_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/i_Investigation.txt (100%) rename cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/s_{{cookiecutter.s_file_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/a_{{cookiecutter.assay_prefix}}_transcriptome_profiling_nucleotide_sequencing.txt (100%) rename cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt (100%) rename cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/i_Investigation.txt (99%) rename cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{{cookiecutter.i_dir_name}} => {{cookiecutter.__output_dir}}}/s_{{cookiecutter.s_file_name}}.txt (100%) diff --git a/cubi_tk/isa_tpl/__init__.py b/cubi_tk/isa_tpl/__init__.py index 523f79e6..cbfa7c68 100644 --- a/cubi_tk/isa_tpl/__init__.py +++ b/cubi_tk/isa_tpl/__init__.py @@ -176,8 +176,8 @@ def run_cookiecutter(tpl, args, _parser=None, _subparser=None, no_input=False): logger.info(args) output_dir = os.path.realpath(args.output_dir) - output_base = os.path.dirname(args.output_dir) - extra_context["i_dir_name"] = os.path.basename(output_dir) + output_base = os.path.dirname(output_dir) + extra_context["__output_dir"] = os.path.basename(output_dir) # FIXME: better solution? (added because args.var_is_triplet is None) if "is_triplet" in tpl.configuration: diff --git a/cubi_tk/isa_tpl/isatab-bulk_rnaseq/cookiecutter.json b/cubi_tk/isa_tpl/isatab-bulk_rnaseq/cookiecutter.json index 0f1bda13..d3c0f735 100644 --- a/cubi_tk/isa_tpl/isatab-bulk_rnaseq/cookiecutter.json +++ b/cubi_tk/isa_tpl/isatab-bulk_rnaseq/cookiecutter.json @@ -9,9 +9,9 @@ "center_contact": "", "study_title": "{{cookiecutter.investigation_title}}", - "i_dir_name": "{{cookiecutter.investigation_title|replace(' ', '_')}}", - "s_file_name": "{{cookiecutter.i_dir_name}}", - "assay_prefix": "{{cookiecutter.i_dir_name|lower}}", + "s_file_name": "{{cookiecutter.investigation_title|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(' ', '_')}}" + "assay_name": "{{cookiecutter.a_measurement_type|replace(' ', '_')}}_{{cookiecutter.a_technology_type|replace(' ', '_')}}", + "__output_dir": "Required variable. Do not remove." } diff --git a/cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt b/cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt rename to cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{cookiecutter.i_dir_name}}/i_Investigation.txt b/cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{cookiecutter.__output_dir}}/i_Investigation.txt similarity index 98% rename from cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{cookiecutter.i_dir_name}}/i_Investigation.txt rename to cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{cookiecutter.__output_dir}}/i_Investigation.txt index a4b5a116..76366d47 100644 --- a/cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{cookiecutter.i_dir_name}}/i_Investigation.txt +++ b/cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{cookiecutter.__output_dir}}/i_Investigation.txt @@ -32,7 +32,7 @@ Investigation Person Roles Investigation Person Roles Term Accession Number Investigation Person Roles Term Source REF STUDY -Study Identifier {{cookiecutter.i_dir_name}} +Study Identifier {{cookiecutter.s_file_name}} Study Title {{cookiecutter.investigation_title}} Study Description "" Comment[Study Grant Number] "" diff --git a/cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt b/cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt rename to cubi_tk/isa_tpl/isatab-bulk_rnaseq/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-generic/cookiecutter.json b/cubi_tk/isa_tpl/isatab-generic/cookiecutter.json index 7d9e87f4..dddd96d7 100644 --- a/cubi_tk/isa_tpl/isatab-generic/cookiecutter.json +++ b/cubi_tk/isa_tpl/isatab-generic/cookiecutter.json @@ -46,13 +46,13 @@ "center_contact": "", "study_title": "{{cookiecutter.investigation_title}}", - "i_dir_name": "{{cookiecutter.investigation_title|replace(' ', '_')}}", - "s_file_name": "{{cookiecutter.i_dir_name}}", - "assay_prefix": "{{cookiecutter.i_dir_name|lower}}", + "s_file_name": "{{cookiecutter.investigation_title|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(' ', '_')}}", "sample_type": "x-charite-medgen-blood-book-id", "lib_strategy": "{% if cookiecutter.a_measurement_abbreviation == 'mRNA_seq' %}RNA-seq{% else %}UNKNOWN{% endif %}", "lib_selection": "{% if cookiecutter.a_measurement_abbreviation == 'mRNA_seq' %}PolyA{% else %}UNKNOWN{% endif %}", - "lib_layout": [ "PAIRED", "SINGLE" ] + "lib_layout": [ "PAIRED", "SINGLE" ], + "__output_dir": "Required variable. Do not remove." } diff --git a/cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.i_dir_name}}/.~lock.s_{{cookiecutter.s_file_name}}.txt# b/cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.__output_dir}}/.~lock.s_{{cookiecutter.s_file_name}}.txt# similarity index 100% rename from cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.i_dir_name}}/.~lock.s_{{cookiecutter.s_file_name}}.txt# rename to cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.__output_dir}}/.~lock.s_{{cookiecutter.s_file_name}}.txt# diff --git a/cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt b/cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt rename to cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.i_dir_name}}/i_Investigation.txt b/cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.__output_dir}}/i_Investigation.txt similarity index 99% rename from cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.i_dir_name}}/i_Investigation.txt rename to cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.__output_dir}}/i_Investigation.txt index 0d05a4fb..5eff93e2 100644 --- a/cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.i_dir_name}}/i_Investigation.txt +++ b/cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.__output_dir}}/i_Investigation.txt @@ -30,7 +30,7 @@ Investigation Person Roles Investigation Person Roles Term Accession Number Investigation Person Roles Term Source REF STUDY -Study Identifier {{cookiecutter.i_dir_name}} +Study Identifier {{cookiecutter.s_file_name}} Study Title {{cookiecutter.investigation_title}} Study Description "" Comment[Study Grant Number] "" diff --git a/cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt b/cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt rename to cubi_tk/isa_tpl/isatab-generic/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-germline/cookiecutter.json b/cubi_tk/isa_tpl/isatab-germline/cookiecutter.json index 757fe22a..a0296018 100644 --- a/cubi_tk/isa_tpl/isatab-germline/cookiecutter.json +++ b/cubi_tk/isa_tpl/isatab-germline/cookiecutter.json @@ -61,14 +61,14 @@ "center_contact": "", "study_title": "{{cookiecutter.investigation_title}}", - "i_dir_name": "{{cookiecutter.investigation_title|replace(' ', '_')}}", - "s_file_name": "{{cookiecutter.i_dir_name}}", - "assay_prefix": "{{cookiecutter.i_dir_name|lower}}", + "s_file_name": "{{cookiecutter.investigation_title|replace(' ', '_')}}", + "assay_prefix": "{{cookiecutter.s_file_name|lower}}", "a_technology_type": "nucleotide sequencing", "a_measurement_abbreviation": "{% if cookiecutter.a_measurement_type == 'exome sequencing' %}WES{% else %}WGS{% endif %}", "assay_name": "{{cookiecutter.a_measurement_type|replace(' ', '_')}}_{{cookiecutter.a_technology_type|replace(' ', '_')}}", "sample_type": "x-charite-medgen-blood-book-id", "lib_strategy": "{% if cookiecutter.a_measurement_abbreviation == 'WES' %}WXS{% else %}WGS{% endif %}", "lib_selection": "{% if cookiecutter.a_measurement_abbreviation == 'WES' %}Hybrid Selection{% else %}RANDOM{% endif %}", - "lib_layout": "PAIRED" + "lib_layout": "PAIRED", + "__output_dir": "Required variable. Do not remove." } diff --git a/cubi_tk/isa_tpl/isatab-germline/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt b/cubi_tk/isa_tpl/isatab-germline/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-germline/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt rename to cubi_tk/isa_tpl/isatab-germline/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-germline/{{cookiecutter.i_dir_name}}/i_Investigation.txt b/cubi_tk/isa_tpl/isatab-germline/{{cookiecutter.__output_dir}}/i_Investigation.txt similarity index 99% rename from cubi_tk/isa_tpl/isatab-germline/{{cookiecutter.i_dir_name}}/i_Investigation.txt rename to cubi_tk/isa_tpl/isatab-germline/{{cookiecutter.__output_dir}}/i_Investigation.txt index 0ddce78f..6db9900c 100644 --- a/cubi_tk/isa_tpl/isatab-germline/{{cookiecutter.i_dir_name}}/i_Investigation.txt +++ b/cubi_tk/isa_tpl/isatab-germline/{{cookiecutter.__output_dir}}/i_Investigation.txt @@ -32,7 +32,7 @@ Investigation Person Roles Investigation Person Roles Term Accession Number Investigation Person Roles Term Source REF STUDY -Study Identifier {{cookiecutter.i_dir_name}} +Study Identifier {{cookiecutter.s_file_name}} Study Title {{cookiecutter.investigation_title}} Study Description "" Comment[Study Grant Number] "" diff --git a/cubi_tk/isa_tpl/isatab-germline/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt b/cubi_tk/isa_tpl/isatab-germline/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-germline/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt rename to cubi_tk/isa_tpl/isatab-germline/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-microarray/cookiecutter.json b/cubi_tk/isa_tpl/isatab-microarray/cookiecutter.json index 6c05f049..55579b41 100644 --- a/cubi_tk/isa_tpl/isatab-microarray/cookiecutter.json +++ b/cubi_tk/isa_tpl/isatab-microarray/cookiecutter.json @@ -22,9 +22,8 @@ "array_design_ref": "", "study_title": "{{cookiecutter.investigation_title}}", - "i_dir_name": "{{cookiecutter.investigation_title|replace(' ', '_')}}", - "s_file_name": "{{cookiecutter.i_dir_name}}", - "assay_prefix": "{{cookiecutter.i_dir_name|lower}}", + "s_file_name": "{{cookiecutter.investigation_title|replace(' ', '_')}}", + "assay_prefix": "{{cookiecutter.s_file_name|lower}}", "a_technology_type": "microarray", "assay_name": "{{cookiecutter.a_measurement_type|replace(' ', '_')}}_{{cookiecutter.a_technology_type|replace(' ', '_')}}", @@ -37,5 +36,6 @@ "accession_number": "http://purl.obolibrary.org/obo/OBI_0400148", "source_ref": "OBI" } - } + }, + "__output_dir": "Required variable. Do not remove." } diff --git a/cubi_tk/isa_tpl/isatab-microarray/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt b/cubi_tk/isa_tpl/isatab-microarray/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-microarray/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt rename to cubi_tk/isa_tpl/isatab-microarray/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-microarray/{{cookiecutter.i_dir_name}}/i_investigation.txt b/cubi_tk/isa_tpl/isatab-microarray/{{cookiecutter.__output_dir}}/i_investigation.txt similarity index 98% rename from cubi_tk/isa_tpl/isatab-microarray/{{cookiecutter.i_dir_name}}/i_investigation.txt rename to cubi_tk/isa_tpl/isatab-microarray/{{cookiecutter.__output_dir}}/i_investigation.txt index d132ed6c..1e5079a6 100644 --- a/cubi_tk/isa_tpl/isatab-microarray/{{cookiecutter.i_dir_name}}/i_investigation.txt +++ b/cubi_tk/isa_tpl/isatab-microarray/{{cookiecutter.__output_dir}}/i_investigation.txt @@ -32,7 +32,7 @@ Investigation Person Roles Investigation Person Roles Term Accession Number Investigation Person Roles Term Source REF STUDY -Study Identifier {{cookiecutter.i_dir_name}} +Study Identifier {{cookiecutter.s_file_name}} Study Title {{cookiecutter.investigation_title}} Study Description "" Comment[Study Grant Number] "" diff --git a/cubi_tk/isa_tpl/isatab-microarray/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt b/cubi_tk/isa_tpl/isatab-microarray/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-microarray/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt rename to cubi_tk/isa_tpl/isatab-microarray/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-ms_meta_biocrates/cookiecutter.json b/cubi_tk/isa_tpl/isatab-ms_meta_biocrates/cookiecutter.json index 79b1c8c5..318a6b1c 100644 --- a/cubi_tk/isa_tpl/isatab-ms_meta_biocrates/cookiecutter.json +++ b/cubi_tk/isa_tpl/isatab-ms_meta_biocrates/cookiecutter.json @@ -1,6 +1,5 @@ { "investigation_title": "Investigation Title", - "i_dir_name": "{{cookiecutter.investigation_title|replace(' ', '_')}}", "study_title": "{{cookiecutter.investigation_title}}", "study_id": "{{cookiecutter.study_title|lower|replace(' ', '_')}}", @@ -77,5 +76,6 @@ "chromatography_instrument": [ "Agilent UHPLC 1290", "Agilent 1290 Infinity II LC System" - ] + ], + "__output_dir": "Required variable. Do not remove." } diff --git a/cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}_FIA.txt b/cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}_FIA.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}_FIA.txt rename to cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}_FIA.txt diff --git a/cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}_LC.txt b/cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}_LC.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}_LC.txt rename to cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}_LC.txt diff --git a/cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.i_dir_name}}/i_Investigation.txt b/cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.__output_dir}}/i_Investigation.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.i_dir_name}}/i_Investigation.txt rename to cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.__output_dir}}/i_Investigation.txt diff --git a/cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.study_file_name}}.txt b/cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.__output_dir}}/s_{{cookiecutter.study_file_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.study_file_name}}.txt rename to cubi_tk/isa_tpl/isatab-ms_meta_biocrates/{{cookiecutter.__output_dir}}/s_{{cookiecutter.study_file_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-single_cell_rnaseq/cookiecutter.json b/cubi_tk/isa_tpl/isatab-single_cell_rnaseq/cookiecutter.json index c528830f..a9b0842e 100644 --- a/cubi_tk/isa_tpl/isatab-single_cell_rnaseq/cookiecutter.json +++ b/cubi_tk/isa_tpl/isatab-single_cell_rnaseq/cookiecutter.json @@ -27,9 +27,9 @@ "sample_multiplexing": ["No", "CellPlex", "TotalSeq", "Other"], "genotype_multiplexing": ["no", "yes"], "study_title": "{{cookiecutter.investigation_title}}", - "i_dir_name": "{{cookiecutter.investigation_title|replace(' ', '_')}}", - "s_file_name": "{{cookiecutter.i_dir_name}}", - "assay_prefix": "{{cookiecutter.i_dir_name|lower}}", + "s_file_name": "{{cookiecutter.investigation_title|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(' ', '_')}}" -} \ No newline at end of file + "assay_name": "{{cookiecutter.a_measurement_type|replace(' ', '_')}}_{{cookiecutter.a_technology_type|replace(' ', '_')}}", + "__output_dir": "Required variable. Do not remove." +} diff --git a/cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt b/cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt rename to cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{cookiecutter.i_dir_name}}/i_Investigation.txt b/cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{cookiecutter.__output_dir}}/i_Investigation.txt similarity index 99% rename from cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{cookiecutter.i_dir_name}}/i_Investigation.txt rename to cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{cookiecutter.__output_dir}}/i_Investigation.txt index 583a1cd1..c3ffba53 100644 --- a/cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{cookiecutter.i_dir_name}}/i_Investigation.txt +++ b/cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{cookiecutter.__output_dir}}/i_Investigation.txt @@ -32,7 +32,7 @@ Investigation Person Roles Investigation Person Roles Term Accession Number Investigation Person Roles Term Source REF STUDY -Study Identifier {{cookiecutter.i_dir_name}} +Study Identifier {{cookiecutter.s_file_name}} Study Title {{cookiecutter.investigation_title}} Study Description "" Comment[Study Grant Number] "" diff --git a/cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt b/cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt rename to cubi_tk/isa_tpl/isatab-single_cell_rnaseq/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-stem_cell_core/cookiecutter.json b/cubi_tk/isa_tpl/isatab-stem_cell_core/cookiecutter.json index e8dddbfd..bb0e6d9d 100644 --- a/cubi_tk/isa_tpl/isatab-stem_cell_core/cookiecutter.json +++ b/cubi_tk/isa_tpl/isatab-stem_cell_core/cookiecutter.json @@ -12,9 +12,9 @@ "library_construction_meta": "{{'Sequencing kit,RNA amount,QC cell load recovery,QC tape fragment size' if cookiecutter.library_type == 'Single-Cell' else 'Sequencing kit,RNA amount,QC tape fragment size'}}", "sequencing_meta": "Platform,Instrument model,No. targeted reads,QC-notes", "study_title": "{{cookiecutter.investigation_title}}", - "i_dir_name": "{{cookiecutter.investigation_title|replace(' ', '_')}}", - "s_file_name": "{{cookiecutter.i_dir_name}}", - "assay_prefix": "{{cookiecutter.i_dir_name|lower}}", + "s_file_name": "{{cookiecutter.investigation_title|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(' ', '_')}}" + "assay_name": "{{cookiecutter.a_measurement_type|replace(' ', '_')}}_{{cookiecutter.a_technology_type|replace(' ', '_')}}", + "__output_dir": "Required variable. Do not remove." } diff --git a/cubi_tk/isa_tpl/isatab-stem_cell_core/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt b/cubi_tk/isa_tpl/isatab-stem_cell_core/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-stem_cell_core/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt rename to cubi_tk/isa_tpl/isatab-stem_cell_core/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-stem_cell_core/{{cookiecutter.i_dir_name}}/i_Investigation.txt b/cubi_tk/isa_tpl/isatab-stem_cell_core/{{cookiecutter.__output_dir}}/i_Investigation.txt similarity index 99% rename from cubi_tk/isa_tpl/isatab-stem_cell_core/{{cookiecutter.i_dir_name}}/i_Investigation.txt rename to cubi_tk/isa_tpl/isatab-stem_cell_core/{{cookiecutter.__output_dir}}/i_Investigation.txt index df38c6b2..f2a03e58 100644 --- a/cubi_tk/isa_tpl/isatab-stem_cell_core/{{cookiecutter.i_dir_name}}/i_Investigation.txt +++ b/cubi_tk/isa_tpl/isatab-stem_cell_core/{{cookiecutter.__output_dir}}/i_Investigation.txt @@ -32,7 +32,7 @@ Investigation Person Roles Investigation Person Roles Term Accession Number Investigation Person Roles Term Source REF STUDY -Study Identifier {{cookiecutter.i_dir_name}} +Study Identifier {{cookiecutter.s_file_name}} Study Title {{cookiecutter.investigation_title}} Study Description "" Comment[Study Grant Number] "" diff --git a/cubi_tk/isa_tpl/isatab-stem_cell_core/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt b/cubi_tk/isa_tpl/isatab-stem_cell_core/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-stem_cell_core/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt rename to cubi_tk/isa_tpl/isatab-stem_cell_core/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/cookiecutter.json b/cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/cookiecutter.json index 4e852b78..d11b52c0 100644 --- a/cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/cookiecutter.json +++ b/cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/cookiecutter.json @@ -13,8 +13,8 @@ "library_kit": "mRNA", "library_construction_meta": "Library selection,Target insert size", "sequencing_meta": "Platform,Instrument model,No. targeted reads,Paired-End", - "i_dir_name": "{{cookiecutter.study_title|replace(' ', '_')|replace('/', '-')}}", "s_file_name": "{{cookiecutter.study_title|replace(' ', '_')|replace('/', '-')}}", "assay_prefix": "{{cookiecutter.study_title|replace(' ', '_')|replace('/', '-')}}", - "assay_name": "GEX_{{cookiecutter.a_measurement_type|replace(' ', '_')}}" + "assay_name": "GEX_{{cookiecutter.a_measurement_type|replace(' ', '_')}}", + "__output_dir": "Required variable. Do not remove." } diff --git a/cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt b/cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt rename to cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{cookiecutter.i_dir_name}}/i_Investigation.txt b/cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{cookiecutter.__output_dir}}/i_Investigation.txt similarity index 99% rename from cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{cookiecutter.i_dir_name}}/i_Investigation.txt rename to cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{cookiecutter.__output_dir}}/i_Investigation.txt index b3244ab3..7c5dc373 100644 --- a/cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{cookiecutter.i_dir_name}}/i_Investigation.txt +++ b/cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{cookiecutter.__output_dir}}/i_Investigation.txt @@ -32,7 +32,7 @@ Investigation Person Roles Investigation Person Roles Term Accession Number Investigation Person Roles Term Source REF STUDY -Study Identifier {{cookiecutter.i_dir_name}} +Study Identifier {{cookiecutter.s_file_name}} Study Title {{cookiecutter.investigation_title}} Study Description "" Comment[Study Grant Number] "" diff --git a/cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt b/cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt rename to cubi_tk/isa_tpl/isatab-stem_cell_core_bulk/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-stem_cell_core_sc/cookiecutter.json b/cubi_tk/isa_tpl/isatab-stem_cell_core_sc/cookiecutter.json index 8adfa875..31f2d0eb 100644 --- a/cubi_tk/isa_tpl/isatab-stem_cell_core_sc/cookiecutter.json +++ b/cubi_tk/isa_tpl/isatab-stem_cell_core_sc/cookiecutter.json @@ -32,8 +32,8 @@ "library_type": ["GEX", "GEX+antibody", "GEX+VDJ", "GEX+other", "GEX+antibody+VDJ", "GEX+other+another"], "sample_multiplexing": ["No", "CellPlex", "TotalSeq", "Other"], "genotype_multiplexing": ["no", "yes"], - "i_dir_name": "{{cookiecutter.study_title|replace(' ', '_')|replace('/', '-')}}", "s_file_name": "{{cookiecutter.study_title|replace(' ', '_')|replace('/', '-')}}", "assay_prefix": "{{cookiecutter.study_title|replace(' ', '_')|replace('/', '-')}}", - "assay_name": "{{cookiecutter.library_type}}_{{cookiecutter.a_measurement_type|replace(' ', '_')}}" + "assay_name": "{{cookiecutter.library_type}}_{{cookiecutter.a_measurement_type|replace(' ', '_')}}", + "__output_dir": "Required variable. Do not remove." } diff --git a/cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt b/cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt rename to cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{cookiecutter.i_dir_name}}/i_Investigation.txt b/cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{cookiecutter.__output_dir}}/i_Investigation.txt similarity index 99% rename from cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{cookiecutter.i_dir_name}}/i_Investigation.txt rename to cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{cookiecutter.__output_dir}}/i_Investigation.txt index 925ae686..a3e16e05 100644 --- a/cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{cookiecutter.i_dir_name}}/i_Investigation.txt +++ b/cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{cookiecutter.__output_dir}}/i_Investigation.txt @@ -32,7 +32,7 @@ Investigation Person Roles Investigation Person Roles Term Accession Number Investigation Person Roles Term Source REF STUDY -Study Identifier {{cookiecutter.i_dir_name}} +Study Identifier {{cookiecutter.s_file_name}} Study Title {{cookiecutter.investigation_title}} Study Description "" Comment[Study Grant Number] "" diff --git a/cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt b/cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt rename to cubi_tk/isa_tpl/isatab-stem_cell_core_sc/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt b/cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt rename to cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{cookiecutter.i_dir_name}}/i_Investigation.txt b/cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{cookiecutter.__output_dir}}/i_Investigation.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{cookiecutter.i_dir_name}}/i_Investigation.txt rename to cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{cookiecutter.__output_dir}}/i_Investigation.txt diff --git a/cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt b/cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt rename to cubi_tk/isa_tpl/isatab-tumor_normal_dna/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-tumor_normal_triplets/cookiecutter.json b/cubi_tk/isa_tpl/isatab-tumor_normal_triplets/cookiecutter.json index f6780f41..f69c36dd 100644 --- a/cubi_tk/isa_tpl/isatab-tumor_normal_triplets/cookiecutter.json +++ b/cubi_tk/isa_tpl/isatab-tumor_normal_triplets/cookiecutter.json @@ -55,10 +55,9 @@ "center_contact": "", "study_title": "{{cookiecutter.investigation_title}}", - "i_dir_name": "{{cookiecutter.investigation_title|replace(' ', '_')}}", "is_triplet": null, - "s_file_name": "{{cookiecutter.i_dir_name}}", - "assay_prefix": "{{cookiecutter.i_dir_name|lower}}", + "s_file_name": "{{cookiecutter.investigation_title|replace(' ', '_')}}", + "assay_prefix": "{{cookiecutter.s_file_name|lower}}", "a_technology_type": "nucleotide sequencing", "a_measurement_abbreviation": "{% if cookiecutter.a_measurement_type == 'exome sequencing' %}WES{% else %}WGS{% endif %}", "assay_name": "{{cookiecutter.a_measurement_type|replace(' ', '_')}}_{{cookiecutter.a_technology_type|replace(' ', '_')}}", @@ -68,5 +67,6 @@ "lib_layout": [ "PAIRED", "SINGLE" - ] + ], + "__output_dir": "Required variable. Do not remove." } diff --git a/cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_transcriptome_profiling_nucleotide_sequencing.txt b/cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_transcriptome_profiling_nucleotide_sequencing.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_transcriptome_profiling_nucleotide_sequencing.txt rename to cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_transcriptome_profiling_nucleotide_sequencing.txt diff --git a/cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt b/cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.i_dir_name}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt rename to cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.__output_dir}}/a_{{cookiecutter.assay_prefix}}_{{cookiecutter.assay_name}}.txt diff --git a/cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.i_dir_name}}/i_Investigation.txt b/cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.__output_dir}}/i_Investigation.txt similarity index 99% rename from cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.i_dir_name}}/i_Investigation.txt rename to cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.__output_dir}}/i_Investigation.txt index d3b8f00d..9c925519 100644 --- a/cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.i_dir_name}}/i_Investigation.txt +++ b/cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.__output_dir}}/i_Investigation.txt @@ -32,7 +32,7 @@ Investigation Person Roles Investigation Person Roles Term Accession Number Investigation Person Roles Term Source REF STUDY -Study Identifier {{cookiecutter.i_dir_name}} +Study Identifier {{cookiecutter.s_file_name}} Study Title {{cookiecutter.investigation_title}} Study Description "" Comment[Study Grant Number] "" diff --git a/cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt b/cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt similarity index 100% rename from cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.i_dir_name}}/s_{{cookiecutter.s_file_name}}.txt rename to cubi_tk/isa_tpl/isatab-tumor_normal_triplets/{{cookiecutter.__output_dir}}/s_{{cookiecutter.s_file_name}}.txt diff --git a/tests/test_isa_tpl.py b/tests/test_isa_tpl.py index 5ccf3205..0c769ea4 100644 --- a/tests/test_isa_tpl.py +++ b/tests/test_isa_tpl.py @@ -22,8 +22,10 @@ def test_run_cookiecutter_isatab_generic(tmp_path): assert output_path.exists() assert (output_path / "i_Investigation.txt").exists() - assert (output_path / "a_output_dir_transcription_profiling_nucleotide_sequencing.txt").exists() - assert (output_path / "s_output_dir.txt").exists() + assert ( + output_path / "a_investigation_title_transcription_profiling_nucleotide_sequencing.txt" + ).exists() + assert (output_path / "s_Investigation_Title.txt").exists() def test_run_cookiecutter_isatab_germline(tmp_path): @@ -36,8 +38,10 @@ def test_run_cookiecutter_isatab_germline(tmp_path): assert output_path.exists() assert (output_path / "i_Investigation.txt").exists() - assert (output_path / "a_output_dir_exome_sequencing_nucleotide_sequencing.txt").exists() - assert (output_path / "s_output_dir.txt").exists() + assert ( + output_path / "a_investigation_title_exome_sequencing_nucleotide_sequencing.txt" + ).exists() + assert (output_path / "s_Investigation_Title.txt").exists() def test_run_cookiecutter_isatab_ms_meta_biocrates(tmp_path):