From bdbdd9c0ca72c21cfc001b8c66413f9eff907a34 Mon Sep 17 00:00:00 2001 From: Vanni Benvenga <vanni.benvenga@gmail.com> Date: Thu, 23 Mar 2023 13:30:06 +0100 Subject: [PATCH] added script comments --- exercises/Pangenome_analysis/panaroo.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/exercises/Pangenome_analysis/panaroo.sh b/exercises/Pangenome_analysis/panaroo.sh index f3a700d..5de027a 100644 --- a/exercises/Pangenome_analysis/panaroo.sh +++ b/exercises/Pangenome_analysis/panaroo.sh @@ -6,24 +6,32 @@ #SBATCH --output=panaroo_%j.out #SBATCH --error=panaroo_%j.err +# Load singularity module module load singularityce +# Declare variables +# input data folder datadir= +# results folder wd= +# Path to singularity images folder singpath=/shares/amr.imm.uzh/bioinfo/singularity/ +# Use the input data folder to generate an array containing the sample names array=($(ls $datadir | cut -f 1 -d '_' | uniq)) +# Move to the results folder, create input and output folders cd $wd mkdir -p panaroo/annotation_files mkdir -p panaroo/panaroo_output -# gff file soft links +# generate soft links to the .gff files while looping through the sample names for sample_id in "${array[@]}" do ln -s $wd/$sample_id/prokka_annotation/$sample_id.gff $wd/panaroo/annotation_files/ done +# Runs singularity on the annotations and send the output to the output folder echo Starting panaroo $(date +"%T") cd panaroo $singpath/panaroo_1.3.0--pyhdfd78af_0.sif panaroo -i $wd/panaroo/annotation_files/*.gff -o ./panaroo_output/ --clean-mode strict --remove-invalid-genes -- GitLab