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

Smoove docker cannot access files! #249

Open
Martaprf opened this issue Sep 27, 2024 · 7 comments
Open

Smoove docker cannot access files! #249

Martaprf opened this issue Sep 27, 2024 · 7 comments

Comments

@Martaprf
Copy link

Martaprf commented Sep 27, 2024

I am runing the docker like this:

docker run --cpus=20 --memory=25g  --memory-swap=30g \
    -v "/home/mferreira":"/input" \
    -v "/home/mferreira":"/output" \
    brentp/smoove smoove call -x \
    --name /output/all.samples.lumpy --outdir /output/teste_smoove/ \
	--fasta /input/genomeinabotle/HG002_son/SNVs_new/references_genomeinabotle/GCA_000001405.15_GRCh38_no_alt_analysis_set.fasta \
	-p 20 --genotype /input/genomeinabotle/HG002_son/alignments_joined/post_processed/*.bam

But then I get:

[smoove] 2024/09/27 08:48:30 starting with version 0.2.8
panic: open /input/genomeinabotle/HG002_son/alignments_joined/post_processed/*.bam: no such file or directory

goroutine 1 [running]:
github.com/brentp/smoove/lumpy.check(...)
        /home/brentp/src/smoove/lumpy/lumpy.go:54
github.com/brentp/smoove/lumpy.lumpy_filter_cmd(0x7fff6d91be95, 0x46, 0x7fff6d91bdf1, 0x15, 0x7fff6d91be0f, 0x74, 0x0, 0x0, 0x0, 0x0, ...)
        /home/brentp/src/smoove/lumpy/lumpy.go:83 +0xfc5
github.com/brentp/smoove/lumpy.Lumpy(0x7fff6d91bdce, 0x19, 0x7fff6d91be0f, 0x74, 0x7fff6d91bdf1, 0x15, 0xc0001fe7d0, 0x1, 0x1, 0xc0000f79a0, ...)
        /home/brentp/src/smoove/lumpy/lumpy.go:133 +0x131
github.com/brentp/smoove/lumpy.Main()
        /home/brentp/src/smoove/lumpy/lumpy.go:351 +0x29b
main.main()
        /home/brentp/src/smoove/cmd/smoove/smoove.go:121 +0x1c4

Can someone help me understand why this happen? What am I doing wrong?

Thanks

@brentp
Copy link
Owner

brentp commented Sep 27, 2024

you could run your docker in interactive mode ("-it") to debug.
Also make sure that: /home/mferreira/genomeinabotle/HG002_son/alignments_joined/post_processed/*.bam exists on your system outside of docker.

@Martaprf
Copy link
Author

I tried with -it and continue give the error :

docker run --cpus=20 --memory=25g  --memory-swap=30g -it \
    -v "/home/mferreira":"/input" \
    -v "/home/mferreira":"/output" \
    brentp/smoove smoove call -x \
    --name /output/all.samples.lumpy --outdir /output/teste_smoove/ \
	--fasta /input/genomeinabotle/HG002_son/SNVs_new/references_genomeinabotle/GCA_000001405.15_GRCh38_no_alt_analysis_set.fasta \
	-p 20 --genotype /input/genomeinabotle/HG002_son/alignments_joined/post_processed/*.bam
[smoove] 2024/09/27 14:17:56 starting with version 0.2.8
panic: open /input/genomeinabotle/HG002_son/alignments_joined/post_processed/*.bam: no such file or directory

goroutine 1 [running]:
github.com/brentp/smoove/lumpy.check(...)
        /home/brentp/src/smoove/lumpy/lumpy.go:54
github.com/brentp/smoove/lumpy.lumpy_filter_cmd(0x7ffff5f09e8a, 0x46, 0x7ffff5f09de6, 0x15, 0x7ffff5f09e04, 0x74, 0x0, 0x0, 0x0, 0x0, ...)
        /home/brentp/src/smoove/lumpy/lumpy.go:83 +0xfc5
github.com/brentp/smoove/lumpy.Lumpy(0x7ffff5f09dc3, 0x19, 0x7ffff5f09e04, 0x74, 0x7ffff5f09de6, 0x15, 0xc0002277e0, 0x1, 0x1, 0xc0002306e0, ...)
        /home/brentp/src/smoove/lumpy/lumpy.go:133 +0x131
github.com/brentp/smoove/lumpy.Main()
        /home/brentp/src/smoove/lumpy/lumpy.go:351 +0x29b
main.main()
        /home/brentp/src/smoove/cmd/smoove/smoove.go:121 +0x1c4

And as you can see I have one bam file in that folder :
Capture

@brentp
Copy link
Owner

brentp commented Sep 27, 2024

maybe you need to do chmod a+r *.bam* on the files on that directory since your docker user will need access.

when you run with -it, don't send the extra arguments until you are in the shell. then in the shell you can ls and see what's actually available.

@Martaprf
Copy link
Author

Ok, I already understand that the problem is *.bam, because if I put the all the path (/input/genomeinabotle/HG002_son/alignments_joined/post_processed//D1_S1.postprocessed.bam) it works. But how can I run for multiple files??

@brentp
Copy link
Owner

brentp commented Sep 27, 2024

You can try escaping the * but probably the simplest way is to put the command you want to run in a shell script then:

 docker run ... bash script.sh

@Martaprf
Copy link
Author

Martaprf commented Oct 1, 2024

Thanks @brentp for all the help, I could handle with the issue, but then when the docker seemed to be running well it shows this error message:

bash: line 5:   182 Killed                  mosdepth -f /input/reference/GRCh38_full_analysis_set_plus_decoy_hla.fa --fast-mode -n --quantize 1001: /tmp/smoove-mosdepth-008384343 /output/teste_smoove//HG02568.split.bam
panic: exit status 137

goroutine 414327 [running]:
github.com/brentp/smoove/lumpy.check(...)
        /home/brentp/src/smoove/lumpy/lumpy.go:54
github.com/brentp/smoove/lumpy.remove_sketchy(0xc00013c4b0, 0x27, 0x3e8, 0x7ffc76387b82, 0x3b, 0x0, 0x0, 0xc000229500, 0x4, 0x4, ...)
        /home/brentp/src/smoove/lumpy/depthfilter.go:232 +0x1825
github.com/brentp/smoove/lumpy.remove_sketchy_all.func1(0xc000118180, 0x3e8, 0x7ffc76387b82, 0x3b, 0x0, 0x0, 0xc000229500, 0x4, 0x4, 0x1, ...)
        /home/brentp/src/smoove/lumpy/depthfilter.go:399 +0x231
created by github.com/brentp/smoove/lumpy.remove_sketchy_all
        /home/brentp/src/smoove/lumpy/depthfilter.go:397 +0x194
 

What's happen??

@brentp
Copy link
Owner

brentp commented Oct 1, 2024

exit status 137 means not enough memory. So you'll need to tell slurm or whatever is managing your jobs to allow more memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants