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

Sharded flag not respected when calculating contig coverage #66

Open
donovan-h-parks opened this issue Apr 29, 2021 · 1 comment
Open

Comments

@donovan-h-parks
Copy link

Hi Ben,

I'm trying to run coverm contig with the --sharded flag, but it appears CoverM still expects the BAM files to be reference sorted:

> samtools sort -n example.1.fastq_R1.bam > name_R1.bam
> samtools sort -n example.1.fastq_R2.bam > name_R2.bam
> coverm contig --bam-files name*.bam --sharded --min-read-percent-identity 95 --min-read-aligned-percent 95 -m mean -o coverage.tsv --no-zeros -t 1
[2021-04-29T16:36:37Z INFO  coverm] CoverM version 0.6.1
[2021-04-29T16:36:37Z INFO  coverm] Using min-read-percent-identity 95%
[2021-04-29T16:36:37Z INFO  coverm] Using min-read-aligned-percent 95%
[2021-04-29T16:36:37Z INFO  coverm] Writing output to file: coverage.tsv
[2021-04-29T16:36:37Z INFO  coverm] Using min-covered-fraction 0%
[2021-04-29T16:36:37Z ERROR coverm::contig] BAM file appears to be unsorted. Input BAM files must be sorted by reference (i.e. by samtools sort)
thread 'main' panicked at 'BAM file appears to be unsorted. Input BAM files must be sorted by reference (i.e. by samtools sort)', /opt/conda/conda-bld/coverm_1616760421473/work/src/contig.rs:130:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

If I sort the my BAM files by reference everything works as expected even when using the --sharded flag which doesn't seem correct.

Thanks for the great work.

Cheers,
Donovan

@ZongzhiWu
Copy link

Hi dparks,
If I want to screen contigs with ≥70% of their length covered by the reads when using 'coverm contig', I wonder how to set --min-covered-fraction properly?

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