Script to summarize multiple individual depth files?
Issue #95
resolved
Hi,
I am running metabat2 on a dataset of 246 WMGS samples, and so it is very hard for me to store the sorted bam files after cross mapping all samples. Instead I am running jgi_summarize_bam_contig_depths for each individual mapping operation, and discarding the bam files. I am writing a little bash script that concatenates the depth files and sums the appropriate columns to generate a new totalAvgDepth value, but maybe you already have a script that does this?
Thanks and best wishes, Francisco
Comments (3)
-
-
Hi Rob,
Thanks for pointing out the script, I must have overlooked it earlier but its exactly what I need! Feel free to close the issue (not sure if I can close it since I created the issue anonymously).
Best wishes,
Francisco
-
- changed status to resolved
- Log in to comment
Hello Franciso,
There should already be a script installed for you with the other metabat executables that does that:
merge_depths.pl depth1.txt depth2.txt [..]
This simple script will combine the depth files as output by jgi_summarize_bam_contig_depths into a single file.
Cheers,
Rob