Skip to content

Commit 6b54aa5

Browse files
author
delphis-bot
committed
[automated] Create package recipe from SSF files
1 parent 4339924 commit 6b54aa5

4 files changed

Lines changed: 109 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Keep track of config versions
2+
minotaur_release='1.0.0' // The release tag of the poseidon-eager repository used for processing and config file retrieval
3+
config_template_version='1.0.0'
4+
package_config_version='1.0.0'
5+
minotaur_config_base="https://raw.githubusercontent.com/poseidon-framework/poseidon-eager/${minotaur_release}/conf"
6+
7+
// This configuration file is designed to be a used with the nf-core/eager pipeline.
8+
// Instead of having to specify all other configurations for the Minotaur pipeline
9+
// on runtime, they are all contained in this file and loaded automatically upon
10+
// specifying this config file during runtime. Additionally, any parameters that
11+
// need to be altered from the defaults can be specified here.
12+
//
13+
// The intention is to make it easy for users to understand and reproduce the output
14+
// from processing with the Minotaur workflow processing from the contents of a
15+
// single file.
16+
17+
// Load configuration profiles. They are loaded from the minotaur_config_base URL, main branch.
18+
// The loaded config includes code that loads the institutional configs from https://github.com/poseidon-framework/minotaur-institutional-configs.
19+
includeConfig "${minotaur_config_base}/Minotaur.config" // Default nf-core/eager parameters for Minotaur processing.
20+
21+
// The following config file specifies BED files for on-target endogenous DNA calculation and mean coverage as well as pseudohaploid genotyping.
22+
// TODO: Select the appropriate config for the CaptureType of the package.
23+
includeConfig "${minotaur_config_base}/CaptureType_profiles/1240K.config"
24+
25+
params {
26+
// Keep track of config file versions used when processing
27+
config_profile_description = "${config_profile_description}\n - config_template_version: ${config_template_version}\n - package_config_version: ${package_config_version}"
28+
config_profile_contact = "Thiseas C. Lamnidis (@TCLamnidis)"
29+
30+
/*
31+
TODO: If you need to change any of the default processing parameters for this package
32+
you can specify these parameters below.
33+
Any parameters not specified in any of the config files default to their nf-core/eager default values.
34+
35+
For information on all available parameters and their default values see:
36+
https://nf-co.re/eager/2.5.1/parameters
37+
38+
You can see the latest default values for parameters within poseidon-eager at:
39+
https://github.com/poseidon-framework/poseidon-eager/blob/main/conf/Minotaur.config
40+
*/
41+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Sample_Name Library_ID Lane Colour_Chemistry SeqType Organism Strandedness UDG_Treatment R1 R2 BAM R1_target_file R2_target_file BAM_target
2+
I10859 I10859_ERS12558320 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I10859_ERS12558320_L1_R1.fastq.gz NA NA ERR10024820.fastq.gz NA NA
3+
I10860 I10860_ERS12558322 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I10860_ERS12558322_L1_R1.fastq.gz NA NA ERR10024822.fastq.gz NA NA
4+
I10860 I10860_ERS12558323 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I10860_ERS12558323_L1_R1.fastq.gz NA NA ERR10024823.fastq.gz NA NA
5+
I10861 I10861_ERS12558324 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I10861_ERS12558324_L1_R1.fastq.gz NA NA ERR10024824.fastq.gz NA NA
6+
I10861 I10861_ERS12558325 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I10861_ERS12558325_L1_R1.fastq.gz NA NA ERR10024825.fastq.gz NA NA
7+
I10862 I10862_ERS12558326 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I10862_ERS12558326_L1_R1.fastq.gz NA NA ERR10024826.fastq.gz NA NA
8+
I10863 I10863_ERS12558328 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I10863_ERS12558328_L1_R1.fastq.gz NA NA ERR10024828.fastq.gz NA NA
9+
I8558 I8558_ERS12558336 1 4 SE Homo sapiens (modern human) double half NA NA <PATH_TO_DATA>/I8558_ERS12558336_L1.bam NA NA I8558_auto.bam
10+
I8558 I8558_ERS12558337 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I8558_ERS12558337_L1_R1.fastq.gz NA NA ERR10024837.fastq.gz NA NA
11+
I8559 I8559_ERS12558339 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I8559_ERS12558339_L1_R1.fastq.gz NA NA ERR10024839.fastq.gz NA NA
12+
I10859 I10859_ERS12558321 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I10859_ERS12558321_L1_R1.fastq.gz NA NA ERR10024821.fastq.gz NA NA
13+
I10862 I10862_ERS12558327 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I10862_ERS12558327_L1_R1.fastq.gz NA NA ERR10024827.fastq.gz NA NA
14+
I10863 I10863_ERS12558329 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I10863_ERS12558329_L1_R1.fastq.gz NA NA ERR10024829.fastq.gz NA NA
15+
I8555 I8555_ERS12558330 1 4 SE Homo sapiens (modern human) double half NA NA <PATH_TO_DATA>/I8555_ERS12558330_L1.bam NA NA I8555_auto.bam
16+
I8556 I8556_ERS12558332 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I8556_ERS12558332_L1_R1.fastq.gz NA NA ERR10024832.fastq.gz NA NA
17+
I8555 I8555_ERS12558331 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I8555_ERS12558331_L1_R1.fastq.gz NA NA ERR10024831.fastq.gz NA NA
18+
I8556 I8556_ERS12558333 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I8556_ERS12558333_L1_R1.fastq.gz NA NA ERR10024833.fastq.gz NA NA
19+
I8557 I8557_ERS12558334 1 4 SE Homo sapiens (modern human) double half NA NA <PATH_TO_DATA>/I8557_ERS12558334_L1.bam NA NA I8557_auto.bam
20+
I8557 I8557_ERS12558335 1 4 SE Homo sapiens (modern human) double half <PATH_TO_DATA>/I8557_ERS12558335_L1_R1.fastq.gz NA NA ERR10024835.fastq.gz NA NA
21+
I8559 I8559_ERS12558338 1 4 SE Homo sapiens (modern human) double half NA NA <PATH_TO_DATA>/I8559_ERS12558338_L1.bam NA NA I8559_auto.bam
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/usr/bin/env bash
2+
set -uo pipefail ## Pipefail, complain on new unassigned variables.
3+
4+
## Track the version of the TSV_patch template used
5+
VERSION='0.2.1dev'
6+
7+
## This script is applied to the eager input TSV file locally to edit the dummy
8+
## path to the fastQ files added by `create_eager_input.sh` to a real local
9+
## path provided as a positional argument. Any further local tweaks to the
10+
## TSV before running eager should be added below that in the form of bash
11+
## commands to aid in reproducibility.
12+
13+
## usage tsv_patch.sh <local_data_dir> <input_tsv> <path/to/source_me.sh>
14+
15+
local_data_dir="$(readlink -f ${1})"
16+
input_tsv="$(readlink -f ${2})"
17+
output_tsv="$(dirname ${local_data_dir})/$(basename -s ".tsv" ${input_tsv}).finalised.tsv"
18+
columns_to_keep=("Sample_Name" "Library_ID" "Lane" "Colour_Chemistry" "SeqType" "Organism" "Strandedness" "UDG_Treatment" "R1" "R2" "BAM")
19+
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
20+
21+
## Index non-proliferated columns and exclude them from the finalised TSV
22+
cut_selector=''
23+
tsv_header=($(head -n1 ${input_tsv}))
24+
for col_name in ${columns_to_keep[@]}; do
25+
let idx=$(get_index_of ${col_name} "${columns_to_keep[@]}")+1 ## awk uses 1-based indexing
26+
if [[ ! ${idx} -eq -1 ]]; then
27+
cut_selector+="${idx},"
28+
fi
29+
done
30+
31+
## Remove added columns, and put columns in right order
32+
cut -f ${cut_selector%,} ${input_tsv} > ${output_tsv}
33+
sed -i -e "s|<PATH_TO_DATA>|${local_data_dir}|g" ${output_tsv}
34+
35+
## Any further commands to edit the file before finalisation should be added below as shown
36+
# sed -ie 's/replace_this/with_this/g' ${output_tsv}
37+
38+
## Keep track of versions
39+
version_file="$(dirname ${input_tsv})/script_versions.txt"
40+
## Remove versions from older run if there
41+
grep -v -F -e "$(basename ${0})" -e "source_me.sh for final TSV" ${version_file} >${version_file}.new
42+
## Then add new versions
43+
echo -e "$(basename ${0}):\t${VERSION}" >> ${version_file}.new
44+
echo -e "source_me.sh for final TSV:\t${HELPER_FUNCTION_VERSION}" >>${version_file}.new
45+
mv ${version_file}.new ${version_file}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
create_eager_input.sh: 0.5.1
2+
source_me.sh for initial TSV: 0.5.2

0 commit comments

Comments
 (0)