-
Notifications
You must be signed in to change notification settings - Fork 22
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
Error when using XARGS #32
Comments
Hi @kabilov, can you try using the |
Hi @shubhamchandak94 I tried using the -w flag to set the working folder to the local drive, but that didn't help. Is there a possibility that the name of tmp folder is the same for different files? |
I think this is due to a race condition situation in the Spring code where it generates a random string and checks if it exists, and if not it tries to create a directory. If multiple instances are running it's possible that a directory of the same name is created between the check and the creation of the directory. I will look into this and try to fix over the next few days (will need a few more days after that to get the update into conda). Quick question: how many files are you working with? |
In the test, 3 pairs of fastq files were compressed. I usually use tmp name with nanoseconds time: tmp_$(date +%H:%M:%S:%N) |
I just pushed a fix attempt, can you try it out and see if it fixes the issue? If so, I will also update on bioconda. Thanks! |
I checked the corrected Spring, the error disappeared. |
I try to use spring througth xargs.
function my_func() {
# arg1 = R1
# arg2 = options
}
export -f my_funct
options="--num-threads 8"
echo ${files[*]} |xargs -d" " -I{} -n1 -P$num bash -c 'my_func "$@"' _ {} "$options"
And for some fastq.gz files the following error is thrown:
terminate called after throwing an instance of 'std::runtime_error'
what(): Cannot create temporary directory.
environment: line 1: 25179 Aborted (core dumped) spring -c -g $options -o $name.spring -i $R1 $R2
It appears that this issue only occurs when running the script on a remote drive.
The same fastq files on the local drive don't throw the error.
The text was updated successfully, but these errors were encountered: