brentp / smoove

structural variant calling and genotyping with existing tools, but, smoothly.
Apache License 2.0
222 stars 21 forks source link

Error while running smoove genotype: "panic: fork/exec $PATH/bin/svtyper: too many open files" #201

Closed Giuseppe1995 closed 1 year ago

Giuseppe1995 commented 1 year ago

Hi, I am using smoove genotype on a set of matched normal-tumor SV vcf (generated with smoove call). Now, while for the greatest majority of samples I properly run the complete pipeline (smoove call + smoove genotype), for some of them I'm getting an error I cannot figure out. The command is the following: smoove genotype --name $SAMPLE --fasta $REFERENCE --removepr --vcf $MYDIR/LumpyDir/$SAMPLE/$SAMPLE-smoove.vcf.gz --outdir $MYDIR/LumpyDir/$SAMPLE/ $BAM_NORMAL $BAM_TUMOR where: $SAMPLE is the name of the sample, simply; $REFERENCE is the reference genome where the raw reads have been mapped to; $MYDIR specifies a directory (not relevant); $BAM_NORMAL and $BAM_TUMOR are the normal and the tumor sample bam files, respectively.

Well, when I run the command above I get this standard error on the terminal

[smoove] 2022/07/11 09:04:07 starting with version 0.2.8 [smoove] 2022/07/11 09:04:07 writing sorted, indexed file to $MYDIR/LumpyDir/$SAMPLE/$SAMPLE-smoove.genotyped.vcf.gz [smoove] 2022/07/11 09:04:09 > gsort version 0.1.4 panic: fork/exec $PATH/bin/svtyper: too many open files

goroutine 5 [running]: github.com/brentp/smoove/svtyper.check(...) /home/brentp/src/smoove/svtyper/svtyper.go:33 github.com/brentp/smoove/svtyper.Svtyper.func2(0xc00021a2a0, 0xc000222220, 0x2, 0x2, 0x7ffe1970e329, 0x61, 0xc000242270, 0x2c, 0xc000358070, 0xc000358078, ...) /home/brentp/src/smoove/svtyper/svtyper.go:179 +0xaa6 created by github.com/brentp/smoove/svtyper.Svtyper /home/brentp/src/smoove/svtyper/svtyper.go:165 +0xb87

Unluckily, coming from a biological background I guess I'm not skilled enough to get what's the problem, but what puzzles me is the fact that I properly run it on the majority of samples.

Thank you in advance, Giuseppe

mrburke00 commented 1 year ago

I had this error. Raising the number of allowed open files with ulimit -n 12288 worked for me. If you are running this on a server you'll have to talk to the IT people about getting permission to change that parameter.

Giuseppe1995 commented 1 year ago

Oh, okay, perfect! I'm working on a server, so as soon as I manage to talk with the IT person and change this parameter I'll retry and let you know. Thanks

Giuseppe1995 commented 1 year ago

I just set the number of allowed open files as you suggested, and it worked! Thank you so much!

Giuseppe1995 commented 1 year ago

PS: sorry for the late reply, but the IT person was pretty busy