mosdepth icon indicating copy to clipboard operation
mosdepth copied to clipboard

plot.dist.py output to screen only

Open space-beaver opened this issue 1 year ago • 4 comments

I've calculated mosdepth coverage with the command:

mosdepth -n -b 500 -x -t 4 -Q30 $OUTPUT_DIR/${base%.cov} ${this_bam}

I run plot-dist.py with:

python mosdepth-0.3.3/scripts/plot-dist.py *.global.dist.txt

However, the output prints to screen and an empty html is created. Is there something I'm doing wrong? Output file attached. TIA.

example.mosdepth.global.dist.txt

space-beaver avatar Jul 01 '22 08:07 space-beaver

Hi, you have many chromosomes in there so the html output just gets too big. You can get more reasonable output with:

grep -v ^NW example.mosdepth.global.dist.txt > subset.mosdepth.global.dist.txt

then use plot-dist.py on that.

brentp avatar Jul 01 '22 09:07 brentp

Solved, many thanks. Is there a way to shift the legend to the right, or easiest just to turn off?

space-beaver avatar Jul 01 '22 11:07 space-beaver

You can probably edit plot_dist.py to do that, it's really just meant as an example. You can also use multiqc on the mosdepth output to get nicer plots.

brentp avatar Jul 01 '22 11:07 brentp

Actually Multiqc does produce nicer plots. Thanks for recommendation!!

Rohit-Satyam avatar Jul 15 '22 01:07 Rohit-Satyam