'Abnormal termination of R session on Rstudio server with DECIPHER alignment

I am running an alignment with the DECIPHER package in bioconductor using an Rstudio instance located on a server.

dna1 <- RemoveGaps(dnaSet, removeGaps = "all", processors = NULL)
alignmentO <- AlignSeqs(dna1, processors = NULL)

For some reason, every time the alignment reaches 99% the r session crashes with the message "The previous R session was abnormally terminated due to an unexpected crash."

Sometimes the program will work for a short time before crashing, but recently it crashes on the first alignment. I have run the code repeatedly using varying input sizes and it always crashes in the exact same place:

Crash location

Generally in the past when I've had session crashes, the issue has been memory, but these are small viral genomes, which shouldn't be an issue. I also pulled all the code off the server to run in Rstudio on my personal computer, which has less RAM and CPUs, and the code ran no problem on the exact same inputs. Any ideas as to what the issue could be?

I have tried running it on two separate servers with different R versions (seen below), but I have the same issue on both servers.

The session info is as follows:

Server 1: Session Info Server 1

Server 2: Session Info Server 2



Solution 1:[1]

So eventually I reencountered what I believe is the same issue, but I no longer have access to the original data to test. However, I was experiencing R session crashing crashing before the alignment could complete. The second time it was a data issue. The sequence that crashed the system was oriented from 3 to 5 instead of 5 to 3, so the sequences were too dissimilar to align. Adding in an orientation function resolved the issue.

dna1 <- RemoveGaps(dnaSet, removeGaps = "all", processors = NULL)
dna1 <- OrientNucleotides(dna1)
alignmentO <- AlignSeqs(dna1, processors = NULL)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1