wally icon indicating copy to clipboard operation
wally copied to clipboard

How to get output plot using docker

Open tettamanzif opened this issue 2 months ago • 3 comments

Dear Prof. Rausch,

I am trying to use wally to display SV regions using the docker. When lauching it both in a job and in the interactive way following the command:

wally region -r chrA:35-80 -g <input.bam>

the log tells me everthing worked properly but I cannot find the output plot. Can you please tell how to specify the output in the commad? I also tried to redirect the standardout to a .png file but it didn't work (I got a file that I cannot open).

I post below the code and the log.

Many thanks in advance. Kind regards,

Francesca Tettamanzi

#########################

Code

my_ref=absolute path to reference my_data=/absolute path to data folder

docker run -v ${my_ref}:${my_ref} -v ${my_data}:${my_data}
trausch/wally wally region -r chr1:600592-600692:plot1
-g ${my_ref}/hg38_v0_dragen_reference_Homo_sapiens_assembly38_masked.fasta
${my_data}/bam/UBD_1A/UBD_1A_bqsr.bam

Log

Log file: sv_1137811.log [2025-Sep-13 10:02:10] wally region -r chr1:600592-600692:plot1 -g $my_ref/hg38_v0_dragen_reference_Homo_sapiens_assembly38_masked.fasta $my_data/bam/UBD_1A/UBD_1A_bqsr.bam [2025-Sep-13 10:02:14] Region plot1; File UBD_1A_bqsr [2025-Sep-13 10:02:14] Done.

tettamanzif avatar Sep 13 '25 11:09 tettamanzif

Maybe the region doesn't exist? The output file should be just plot1.png. Here is a minimal example to see if the plotting using docker works for you:

cd /tmp/
wget https://raw.githubusercontent.com/tobiasrausch/covid19/refs/heads/main/ref/NC_045512.2.fa
docker pull trausch/wally:latest
docker run -v /tmp:/home trausch/wally wally dotplot -a NC_045512.2.fa 
ls NC_045512.2_NC_045512.2.png 
```

tobiasrausch avatar Sep 15 '25 14:09 tobiasrausch

Thank you for your rapid feedback.

Using this example I obtained a plot, so the plotting function works. Unfortunately I am not able to get a plot while making a try with another region on my files.

As in the previous try, I selected a region starting from the list of SVs detected in delly VCF file:

Image

Then I used the same code I posted above on the respective BAM file, extending the region at both sides.

Image

The log suggests the plot was generated, but if I check in all the mounted directories and in my home I cannot find it. Perhaps I am making a mistake somewhere.. do you have any advice?

Many thanks again Kind regards,

Francesca

tettamanzif avatar Sep 17 '25 09:09 tettamanzif

That's difficult to debug remotely. The region plotting and docker container look fine to me so I suspect it's a problem with the BAM file. Here is a small example to test the region plotting (req. samtools network slicing of CRAMs):

cd /tmp/
samtools view -b ftp://ftp.sra.ebi.ac.uk/vol1/run/ERR398/ERR3989458/NA20358.final.cram chr8:20000000-20050000 > test.bam
samtools index test.bam 
wget https://hgdownload.cse.ucsc.edu/goldenpath/hg38/bigZips/hg38.fa.gz
gunzip hg38.fa.gz
samtools faidx hg38.fa
docker run -v /tmp:/home trausch/wally wally region -r chr8:20000000-20050000:plot1 -g hg38.fa test.bam
ls plot1.png

tobiasrausch avatar Sep 17 '25 11:09 tobiasrausch