From cbd2a1c5125c9156104576190ad6e76fca713ccf Mon Sep 17 00:00:00 2001 From: delphis-bot Date: Thu, 27 Jun 2024 09:48:01 +0000 Subject: [PATCH] [automated] Create package recipe from SSF files --- .../2024_Sasso_PNAS/2024_Sasso_PNAS.config | 41 ++++++++++++++++ packages/2024_Sasso_PNAS/2024_Sasso_PNAS.tsv | 49 +++++++++++++++++++ .../2024_Sasso_PNAS.tsv_patch.sh | 45 +++++++++++++++++ packages/2024_Sasso_PNAS/script_versions.txt | 2 + 4 files changed, 137 insertions(+) create mode 100644 packages/2024_Sasso_PNAS/2024_Sasso_PNAS.config create mode 100644 packages/2024_Sasso_PNAS/2024_Sasso_PNAS.tsv create mode 100755 packages/2024_Sasso_PNAS/2024_Sasso_PNAS.tsv_patch.sh create mode 100644 packages/2024_Sasso_PNAS/script_versions.txt diff --git a/packages/2024_Sasso_PNAS/2024_Sasso_PNAS.config b/packages/2024_Sasso_PNAS/2024_Sasso_PNAS.config new file mode 100644 index 0000000..ca10f8b --- /dev/null +++ b/packages/2024_Sasso_PNAS/2024_Sasso_PNAS.config @@ -0,0 +1,41 @@ +// Keep track of config versions +minotaur_release='0.3.0dev' // The release tag of the poseidon-eager repository used for processing and config file retrieval +config_template_version='0.3.0dev' +package_config_version='0.3.0dev' +minotaur_config_base="https://raw.githubusercontent.com/poseidon-framework/poseidon-eager/${minotaur_release}/conf" + +// This configuration file is designed to be a used with the nf-core/eager pipeline. +// Instead of having to specify all other configurations for the Minotaur pipeline +// on runtime, they are all contained in this file and loaded automatically upon +// specifying this config file during runtime. Additionally, any parameters that +// need to be altered from the defaults can be specified here. +// +// The intention is to make it easy for users to understand and reproduce the output +// from processing with the Minotaur workflow processing from the contents of a +// single file. + +// Load configuration profiles. They are loaded from the minotaur_config_base URL, main branch. +includeConfig "${minotaur_config_base}/EVA_cluster.config" // Cluster-specific configurations for nf-core/eager execution at MPI-EVA +includeConfig "${minotaur_config_base}/Minotaur.config" // Default nf-core/eager parameters for Minotaur processing. + +// The following config file specifies BED files for on-target endogenous DNA calculation and mean coverage as well as pseudohaploid genotyping. +// TODO: Select the appropriate config for the CaptureType of the package. +includeConfig "${minotaur_config_base}/CaptureType_profiles/1240K.config" + +params { + // Keep track of config file versions used when processing + config_profile_description = "${config_profile_description}\n - config_template_version: ${config_template_version}\n - package_config_version: ${package_config_version}" + config_profile_contact = "Thiseas C. Lamnidis (@TCLamnidis)" + + /* + TODO: If you need to change any of the default processing parameters for this package + you can specify these parameters below. + Any parameters not specified in any of the config files default to their nf-core/eager default values. + + For information on all available parameters and their default values see: + https://nf-co.re/eager/2.4.6/parameters + + You can see the default values for parameters within poseidon-eager at: + https://github.com/poseidon-framework/poseidon-eager/blob/main/conf/Minotaur.config + */ +} diff --git a/packages/2024_Sasso_PNAS/2024_Sasso_PNAS.tsv b/packages/2024_Sasso_PNAS/2024_Sasso_PNAS.tsv new file mode 100644 index 0000000..20527ac --- /dev/null +++ b/packages/2024_Sasso_PNAS/2024_Sasso_PNAS.tsv @@ -0,0 +1,49 @@ +Sample_Name Library_ID Lane Colour_Chemistry SeqType Organism Strandedness UDG_Treatment R1 R2 BAM R1_target_file R2_target_file +n/a n/a_utigKOS007 1 4 SE Homo sapiens (modern human) /n/a_utigKOS007_L1_R1.fastq.gz NA NA ERR13189827.fastq.gz NA +n/a n/a_utigKOS010 1 4 SE Homo sapiens (modern human) /n/a_utigKOS010_L1_R1.fastq.gz NA NA ERR13189830.fastq.gz NA +n/a n/a_utigKOS013 1 4 SE Homo sapiens (modern human) /n/a_utigKOS013_L1_R1.fastq.gz NA NA ERR13189833.fastq.gz NA +n/a n/a_utigKOS022 1 4 SE Homo sapiens (modern human) /n/a_utigKOS022_L1_R1.fastq.gz NA NA ERR13189839.fastq.gz NA +n/a n/a_utigKOS024 1 4 SE Homo sapiens (modern human) /n/a_utigKOS024_L1_R1.fastq.gz NA NA ERR13189840.fastq.gz NA +n/a n/a_utigKOS033 1 4 SE Homo sapiens (modern human) /n/a_utigKOS033_L1_R1.fastq.gz NA NA ERR13189845.fastq.gz NA +n/a n/a_utigKOS036 1 4 SE Homo sapiens (modern human) /n/a_utigKOS036_L1_R1.fastq.gz NA NA ERR13189848.fastq.gz NA +n/a n/a_utigWPK006 1 4 SE Homo sapiens (modern human) /n/a_utigWPK006_L1_R1.fastq.gz NA NA ERR13189856.fastq.gz NA +n/a n/a_utigOLV050 1 4 SE Homo sapiens (modern human) /n/a_utigOLV050_L1_R1.fastq.gz NA NA ERR13189859.fastq.gz NA +n/a n/a_utigOLV056 1 4 SE Homo sapiens (modern human) /n/a_utigOLV056_L1_R1.fastq.gz NA NA ERR13189863.fastq.gz NA +n/a n/a_utigKOS002 1 4 SE Homo sapiens (modern human) /n/a_utigKOS002_L1_R1.fastq.gz NA NA ERR13189822.fastq.gz NA +n/a n/a_utigKOS004A 1 4 SE Homo sapiens (modern human) /n/a_utigKOS004A_L1_R1.fastq.gz NA NA ERR13189824.fastq.gz NA +n/a n/a_utigKOS005 1 4 SE Homo sapiens (modern human) /n/a_utigKOS005_L1_R1.fastq.gz NA NA ERR13189825.fastq.gz NA +n/a n/a_utigKOS008C 1 4 SE Homo sapiens (modern human) /n/a_utigKOS008C_L1_R1.fastq.gz NA NA ERR13189828.fastq.gz NA +n/a n/a_utigKOS009 1 4 SE Homo sapiens (modern human) /n/a_utigKOS009_L1_R1.fastq.gz NA NA ERR13189829.fastq.gz NA +n/a n/a_utigKOS016 1 4 SE Homo sapiens (modern human) /n/a_utigKOS016_L1_R1.fastq.gz NA NA ERR13189836.fastq.gz NA +n/a n/a_utigKOS026 1 4 SE Homo sapiens (modern human) /n/a_utigKOS026_L1_R1.fastq.gz NA NA ERR13189841.fastq.gz NA +n/a n/a_utigKOS028 1 4 SE Homo sapiens (modern human) /n/a_utigKOS028_L1_R1.fastq.gz NA NA ERR13189843.fastq.gz NA +n/a n/a_utigKOS034 1 4 SE Homo sapiens (modern human) /n/a_utigKOS034_L1_R1.fastq.gz NA NA ERR13189846.fastq.gz NA +n/a n/a_utigKOS038 1 4 SE Homo sapiens (modern human) /n/a_utigKOS038_L1_R1.fastq.gz NA NA ERR13189849.fastq.gz NA +n/a n/a_utigWPK004 1 4 SE Homo sapiens (modern human) /n/a_utigWPK004_L1_R1.fastq.gz NA NA ERR13189854.fastq.gz NA +n/a n/a_utigOLV021 1 4 SE Homo sapiens (modern human) /n/a_utigOLV021_L1_R1.fastq.gz NA NA ERR13189857.fastq.gz NA +n/a n/a_utigOLV054 1 4 SE Homo sapiens (modern human) /n/a_utigOLV054_L1_R1.fastq.gz NA NA ERR13189861.fastq.gz NA +n/a n/a_utigOLV055 1 4 SE Homo sapiens (modern human) /n/a_utigOLV055_L1_R1.fastq.gz NA NA ERR13189862.fastq.gz NA +n/a n/a_utigOLV058 1 4 SE Homo sapiens (modern human) /n/a_utigOLV058_L1_R1.fastq.gz NA NA ERR13189864.fastq.gz NA +n/a n/a_utigOLV065 1 4 SE Homo sapiens (modern human) /n/a_utigOLV065_L1_R1.fastq.gz NA NA ERR13189865.fastq.gz NA +n/a n/a_utigOLV067 1 4 SE Homo sapiens (modern human) /n/a_utigOLV067_L1_R1.fastq.gz NA NA ERR13189866.fastq.gz NA +n/a n/a_utigOLV071 1 4 SE Homo sapiens (modern human) /n/a_utigOLV071_L1_R1.fastq.gz NA NA ERR13189867.fastq.gz NA +n/a n/a_utigKOS001 1 4 SE Homo sapiens (modern human) /n/a_utigKOS001_L1_R1.fastq.gz NA NA ERR13189821.fastq.gz NA +n/a n/a_utigKOS003 1 4 SE Homo sapiens (modern human) /n/a_utigKOS003_L1_R1.fastq.gz NA NA ERR13189823.fastq.gz NA +n/a n/a_utigKOS006 1 4 SE Homo sapiens (modern human) /n/a_utigKOS006_L1_R1.fastq.gz NA NA ERR13189826.fastq.gz NA +n/a n/a_utigKOS011 1 4 SE Homo sapiens (modern human) /n/a_utigKOS011_L1_R1.fastq.gz NA NA ERR13189831.fastq.gz NA +n/a n/a_utigKOS012 1 4 SE Homo sapiens (modern human) /n/a_utigKOS012_L1_R1.fastq.gz NA NA ERR13189832.fastq.gz NA +n/a n/a_utigKOS014 1 4 SE Homo sapiens (modern human) /n/a_utigKOS014_L1_R1.fastq.gz NA NA ERR13189834.fastq.gz NA +n/a n/a_utigKOS015 1 4 SE Homo sapiens (modern human) /n/a_utigKOS015_L1_R1.fastq.gz NA NA ERR13189835.fastq.gz NA +n/a n/a_utigKOS017 1 4 SE Homo sapiens (modern human) /n/a_utigKOS017_L1_R1.fastq.gz NA NA ERR13189837.fastq.gz NA +n/a n/a_utigKOS018 1 4 SE Homo sapiens (modern human) /n/a_utigKOS018_L1_R1.fastq.gz NA NA ERR13189838.fastq.gz NA +n/a n/a_utigKOS027 1 4 SE Homo sapiens (modern human) /n/a_utigKOS027_L1_R1.fastq.gz NA NA ERR13189842.fastq.gz NA +n/a n/a_utigKOS032 1 4 SE Homo sapiens (modern human) /n/a_utigKOS032_L1_R1.fastq.gz NA NA ERR13189844.fastq.gz NA +n/a n/a_utigKOS035A 1 4 SE Homo sapiens (modern human) /n/a_utigKOS035A_L1_R1.fastq.gz NA NA ERR13189847.fastq.gz NA +n/a n/a_utigKOS039 1 4 SE Homo sapiens (modern human) /n/a_utigKOS039_L1_R1.fastq.gz NA NA ERR13189850.fastq.gz NA +n/a n/a_utigWPK001A 1 4 SE Homo sapiens (modern human) /n/a_utigWPK001A_L1_R1.fastq.gz NA NA ERR13189851.fastq.gz NA +n/a n/a_utigWPK002 1 4 SE Homo sapiens (modern human) /n/a_utigWPK002_L1_R1.fastq.gz NA NA ERR13189852.fastq.gz NA +n/a n/a_utigWPK003 1 4 SE Homo sapiens (modern human) /n/a_utigWPK003_L1_R1.fastq.gz NA NA ERR13189853.fastq.gz NA +n/a n/a_utigWPK005 1 4 SE Homo sapiens (modern human) /n/a_utigWPK005_L1_R1.fastq.gz NA NA ERR13189855.fastq.gz NA +n/a n/a_utigOLV038 1 4 SE Homo sapiens (modern human) /n/a_utigOLV038_L1_R1.fastq.gz NA NA ERR13189858.fastq.gz NA +n/a n/a_utigOLV051 1 4 SE Homo sapiens (modern human) /n/a_utigOLV051_L1_R1.fastq.gz NA NA ERR13189860.fastq.gz NA +n/a n/a_utigOLV072 1 4 SE Homo sapiens (modern human) /n/a_utigOLV072_L1_R1.fastq.gz NA NA ERR13189868.fastq.gz NA diff --git a/packages/2024_Sasso_PNAS/2024_Sasso_PNAS.tsv_patch.sh b/packages/2024_Sasso_PNAS/2024_Sasso_PNAS.tsv_patch.sh new file mode 100755 index 0000000..a73f9af --- /dev/null +++ b/packages/2024_Sasso_PNAS/2024_Sasso_PNAS.tsv_patch.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +set -uo pipefail ## Pipefail, complain on new unassigned variables. + +## Track the version of the TSV_patch template used +VERSION='0.2.1dev' + +## This script is applied to the eager input TSV file locally to edit the dummy +## path to the fastQ files added by `create_eager_input.sh` to a real local +## path provided as a positional argument. Any further local tweaks to the +## TSV before running eager should be added below that in the form of bash +## commands to aid in reproducibility. + +## usage tsv_patch.sh + +local_data_dir="$(readlink -f ${1})" +input_tsv="$(readlink -f ${2})" +output_tsv="$(dirname ${local_data_dir})/$(basename -s ".tsv" ${input_tsv}).finalised.tsv" +columns_to_keep=("Sample_Name" "Library_ID" "Lane" "Colour_Chemistry" "SeqType" "Organism" "Strandedness" "UDG_Treatment" "R1" "R2" "BAM") +source $(readlink -f ${3}) ## Path to helper function script should be provided as 3rd argument. https://github.com/poseidon-framework/poseidon-eager/blob/main/scripts/source_me.sh + +## Index non-proliferated columns and exclude them from the finalised TSV +cut_selector='' +tsv_header=($(head -n1 ${input_tsv})) +for col_name in ${columns_to_keep[@]}; do + let idx=$(get_index_of ${col_name} "${columns_to_keep[@]}")+1 ## awk uses 1-based indexing + if [[ ! ${idx} -eq -1 ]]; then + cut_selector+="${idx}," + fi +done + +## Remove added columns, and put columns in right order +cut -f ${cut_selector%,} ${input_tsv} > ${output_tsv} +sed -i -e "s||${local_data_dir}|g" ${output_tsv} + +## Any further commands to edit the file before finalisation should be added below as shown +# sed -ie 's/replace_this/with_this/g' ${output_tsv} + +## Keep track of versions +version_file="$(dirname ${input_tsv})/script_versions.txt" +## Remove versions from older run if there +grep -v -F -e "$(basename ${0})" -e "source_me.sh for final TSV" ${version_file} >${version_file}.new +## Then add new versions +echo -e "$(basename ${0}):\t${VERSION}" >> ${version_file}.new +echo -e "source_me.sh for final TSV:\t${HELPER_FUNCTION_VERSION}" >>${version_file}.new +mv ${version_file}.new ${version_file} diff --git a/packages/2024_Sasso_PNAS/script_versions.txt b/packages/2024_Sasso_PNAS/script_versions.txt new file mode 100644 index 0000000..be6857b --- /dev/null +++ b/packages/2024_Sasso_PNAS/script_versions.txt @@ -0,0 +1,2 @@ +create_eager_input.sh: 0.2.1dev +source_me.sh for initial TSV: 0.2.1dev