Skip to content

Commit

Permalink
created tempalte for mag_all
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-VM committed Sep 3, 2024
1 parent 0eac72c commit e1f4c6e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ done >> samplesheet.csv
scratch_dir=$(echo $PWD | sed "s/\/data\/bi\/scratch_tmp/\/scratch/g")


cat <<EOF > mag_complete.sbatch
cat <<EOF > mag_all.sbatch
#!/bin/sh
#SBATCH --ntasks 1
#SBATCH --cpus-per-task 2
#SBATCH --mem 8G
#SBATCH --time 120:00:00
#SBATCH --time 72:00:00
#SBATCH --partition long_idx
#SBATCH --output $(date '+%Y%m%d')_mag_complete.log
#SBATCH --output $(date '+%Y%m%d')_mag_all.log
#SBATCH --chdir $scratch_dir

# module load Nextflow/23.10.0 singularity
Expand All @@ -30,8 +30,8 @@ nextflow run /data/bi/pipelines/nf-core-mag/nf-core-mag-2.5.3/workflow/main.nf \
--input samplesheet.csv \\
--kraken2_db '/data/bi/references/kraken/minikraken_8GB_20200312.tgz' \\
--skip_spadeshybrid true \\
--outdir $(date '+%Y%m%d')_mag_complete \\
--outdir $(date '+%Y%m%d')_mag_all \\
-resume
EOF

echo "sbatch mag_complete.sbatch" > _01_run_mag_complete.sh
echo "sbatch mag_all.sbatch" > _01_run_mag_all.sh
2 changes: 1 addition & 1 deletion bu_isciii/templates/mag/ANALYSIS/lablog_mag_all
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ mkdir 00-reads
cd 00-reads; cat ../samples_id.txt | xargs -I % echo "ln -s ../../RAW/%_*R1*.fastq.gz %_R1.fastq.gz" | bash; cd -
cd 00-reads; cat ../samples_id.txt | xargs -I % echo "ln -s ../../RAW/%_*R2*.fastq.gz %_R2.fastq.gz" | bash; cd -

mv ANALYSIS01_MAG_ALL $(date '+%Y%m%d')_ANALYSIS01_MAG_ALL
mv ANALYSIS03_MAG_ALL $(date '+%Y%m%d')_ANALYSIS03_MAG_ALL
22 changes: 21 additions & 1 deletion bu_isciii/templates/mag/DOC/mag.config
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ process {
time = { 4.h * task.attempt }
}
withName:'BOWTIE2_PHIX_REMOVAL_BUILD'{
time = 12.h
time = 18.h
}
}

Expand All @@ -52,3 +52,23 @@ params {
max_cpus = 32
max_time = '48.h'
}

/*
CUSTOM OUTPUT FOLDER STRUCTURE -- modules.config
*/
params { publish_dir_mode = 'copy' }
process {
withName: 'MULTIQC' {
publishDir = [
path: { "${params.outdir}/99-stats" },
mode: params.publish_dir_mode,
saveAs: { filename ->
if (filename.equals('versions.yml') || filename.endsWith('.csv')) {
null
} else {
filename
}
}
]
}
}
6 changes: 6 additions & 0 deletions bu_isciii/templates/mag/RESULTS/lablog_mag_all_results
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mkdir $(date '+%Y%m%d')_entrega01
cd $(date '+%Y%m%d')_entrega01

#Create symbolic links depending on the analysis
#Individual files
ln -s ../../ANALYSIS/*_ANALYSIS03_MAG_ALL/99-stats/multiqc_report.html ./krona_results.html

0 comments on commit e1f4c6e

Please sign in to comment.