diff --git a/CHANGELOG.md b/CHANGELOG.md index 2050d3068..f38641d79 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Credits +Code contributions to the new version: + +- [Victor Lopez](https://github.com/victor5lm) + ### Template fixes and updates +- Updated sftp_user.json, added the locus-tag option for the PROKKA process in the bacass config file and changed new_service.py so that integrity is checked only for the samples of interest [#363](https://github.com/BU-ISCIII/buisciii-tools/pull/363). + ### Modules #### Added enhancements diff --git a/bu_isciii/new_service.py b/bu_isciii/new_service.py index e22bcde14..afc8d4b13 100755 --- a/bu_isciii/new_service.py +++ b/bu_isciii/new_service.py @@ -103,12 +103,19 @@ def check_md5(self): md5_dir = os.path.dirname(md5_file_path) os.chdir(md5_dir) + # Regex pattern to match sample names in .fastq.gz files + sample_names_pattern = "|".join( + [ + f"{sample['sample_name']}.*\\.fastq\\.gz" + for sample in self.service_samples + ] + ) + # md5sum command stderr.print(f"[blue]Checking MD5 integrity for {md5_file_path}") try: - subprocess.run( - ["md5sum", "-c", os.path.basename(md5_file_path)], check=True - ) + cmd = f"grep -E '{sample_names_pattern}' {md5_file_path} | md5sum -c" + subprocess.run(cmd, shell=True, check=True, executable="/bin/bash") stderr.print("[green]MD5 check passed!") except subprocess.CalledProcessError as e: stderr.print(f"[red]ERROR: MD5 check failed: {e.stderr}") diff --git a/bu_isciii/templates/assembly/DOC/hpc_slurm_assembly.config b/bu_isciii/templates/assembly/DOC/hpc_slurm_assembly.config index 8325bcd5f..5ef28493b 100644 --- a/bu_isciii/templates/assembly/DOC/hpc_slurm_assembly.config +++ b/bu_isciii/templates/assembly/DOC/hpc_slurm_assembly.config @@ -195,7 +195,8 @@ process { ext.args = { [ '--force', - params.prokka_args ? "${params.prokka_args}" : '' + params.prokka_args ? "${params.prokka_args}" : '', + "--locustag ${meta.id}" ].join(' ').trim() } publishDir = [ diff --git a/bu_isciii/templates/sftp_user.json b/bu_isciii/templates/sftp_user.json index ba6278583..5e3915a56 100755 --- a/bu_isciii/templates/sftp_user.json +++ b/bu_isciii/templates/sftp_user.json @@ -55,5 +55,6 @@ "bioinfoadm": ["test"], "s.varona": ["misc"], "nlabiod": ["Labarbovirus"], - "jmgonzalez": ["Lablegionella"] + "jmgonzalez": ["Lablegionella"], + "alberto.campoy": ["Labvirusres"] }