Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated sftp_user.json and some templates #363

Merged
merged 5 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 10 additions & 3 deletions bu_isciii/new_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
3 changes: 2 additions & 1 deletion bu_isciii/templates/assembly/DOC/hpc_slurm_assembly.config
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
3 changes: 2 additions & 1 deletion bu_isciii/templates/sftp_user.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@
"bioinfoadm": ["test"],
"s.varona": ["misc"],
"nlabiod": ["Labarbovirus"],
"jmgonzalez": ["Lablegionella"]
"jmgonzalez": ["Lablegionella"],
"alberto.campoy": ["Labvirusres"]
}
Loading