Hello everyone, I’m using Sarek 3.1.2 for offline ...
# sarek
l
Hello everyone, I’m using Sarek 3.1.2 for offline local data analysis (with
-profile singularity
), but I keep getting an error at the SNPEff step. I’ve tried different datasets, and the error always occurs at SNPEff. (However, when I run the same analysis offline on another server, it works fine.) Does anyone know what might be causing this issue? Thanks for your help!
m
Can you check if the vcfs are valid?
l
sure I think the vcfs are valid
m
@Thomas Danhorn any smart idea there?
t
File corruption was my first thought as well. You are saying the same analysis works fine on another server -- can you compare file checksums (MD5 or similar) of the same VCF between servers? (There may be data strings, etc., in the header causing differences. To avoid that, you could probably pipe the body of the file with
bcftools view
or something to
md5sum
.) Alternatively, if you remove the supposedly offending line (and put it in another file by itself with just the header to test separetely), does it work then (running the pipeline with
--step annotate
)? It could also be that the file is fine on disk, but gets corrupted randomly while reading (especially under high I/O load) ... How reproducible is the problem? Does is work sometimes? Does always fail at the same line or different ones? Another thought -- is the VCF's index being used, and could that be wrong (leading to the line being read wrong)? The validator may only check the file itself and not see that problem. Lastly, maybe there is an issue with the software container -- maybe check those MD5 sums as well between servers.
l
The MD5 checksums of the software containers are identical, and the Sarek workflow version is also the same (3.1.2). I even verified that every file within Sarek has the same MD5 checksum. I specifically checked this. Moreover, the FASTQ files used for analysis have identical checksums, as does the reference genome. In other words, the same Sarek version, the same container files, the same reference genome, and the same input files are used — yet the process still throws an error. I’ve checked everything I could think of, but I still haven’t found the cause. Has anyone else encountered a similar issue? Do you need me to provide more information?
t
The error occurs when reading the VCF -- did you compare those files? If they are the same (except maybe for a timestamp, etc.), then the only thing I can think of is a random I/O error (which probably would also be the explanation if they are different).
l
share the latest update: I ran the annotation step of sarek for the same vcf.gz file (with identical MD5 checksums) on two different servers. The process completed successfully on one server, but it reported an error on the other. The relevant error information is as follows:
Could it be that the difference in operating systems is causing the issue? The server where the workflow runs successfully is running Ubuntu 18.04.6 LTS, while the one where it fails is running Ubuntu 22.04.5 LTS.
t
The OS version defines the software versions, but essentially all critical software should come from the container, so that should not matter. I'm wondering if it is some environment/locale thing, but the error comes from Java reading a gzipped text file, I can't think of any setting that would influence that ... Only thing I can think if is trying to increase container isolation by putting
singualrity.runOptions = '--containall'
into your config. Sure you could try with different Singularity versions or even Nextflow or Java (which runs Nextflow under the hood), but those should not influence stuff inside the container (except if Singularity has different defaults of what it lets in, depending on version or OS setup) ...
You could try running just that failing command, inside the container, but not in the context of the pipeline. That would allow you to try more permutations in less time. It seem this is very reproducible, so not a random I/O error.
l
I tried using the Singularity parameter
--containall
and ran the SNPEFF command inside the container, but it still failed. The container image file is not corrupted (I verified it with an MD5 checksum). This bug is really driving me crazy...
t
I feel your pain, I'm really curious what is going on here ... 🤯 Try isolating the offending line in a VCF by itself. You can also try a unzipped VCF. Not sure what this would tell you, but it's what I would do. Another idea is to copy the older
singularity
binary to the newer server and execute with that (can also try the other way, but more likely to fail due to library dependencies). Lastly, reboot the server or call a qualified exorcist ...
m
I am at a lost here too, and I am really curious as to what is causing this
t
I am sure it is either something really stupidly simple, or really complicated and esoteric ...
l
I reinstalled Singularity (from 4.1.3-focal to 4.3.4-jammy), but the error still occurs; I also rebooted the server, and the error still persists.😖
A bit of progress: after I manually decompressed
n154.freebayes.vcf.gz
(using
gunzip n154.freebayes.vcf.gz
), the error no longer appeared when running SNPEFF!
🎉 1
t
I'm still curious what the difference between the two systems is. The
(b)gzip
should be part of the container and thus the same. Have you checked if the index of the zipped VCF was possibly corrupted? (Not sure if that is even being used here, but if it is, that might explain it.)
party this 1
m
Oh, that's an interesting development
l
I still couldn’t find a way to make SnpEff directly read VCF.GZ files on this strange server. So, I modified the SNPEFF process code a bit — using zcat to read the VCF.GZ file and feed it into SnpEff. With that change, the whole sarek ran successfully. Here is the modified SNPEFF process code.🙂
m
Congrats on the fix