CoverM icon indicating copy to clipboard operation
CoverM copied to clipboard

How to output bam file after trimmed_mean function?

Open Harper19 opened this issue 11 months ago • 2 comments

Hello, I would like to check the coverage difference before and after trimmed_mean. Currently I am thinking to create depth table and plots using old vs new bamfiles to check.

However, cannot output the trimmed bam file. Is there anyway to do it? Or is there any suggestion to do it based on coverm?

Thanks for your attention and time!

Best, Harper

Harper19 avatar Mar 09 '24 19:03 Harper19

Hi,

I'm not sure this is possible because it isn't quite specified properly.

Trimmed mean is calculated by getting the coverage of each column, and then removing coverage numbers at the 10 and 90% values. So there might be multiple positions with the same coverage, where some are inside 10-90% and some are outside.

If you are interested, I'd suggest using the coverage_histogram output, manually calculating the 10th and 90th percentiles, and then interrogating your BAM file based on that.

HTH, ben

wwood avatar Mar 09 '24 21:03 wwood

Thank you so much. I will try to do it. Best, Harper

Harper19 avatar Mar 11 '24 04:03 Harper19