samtools / bcftools

This is the official development repository for BCFtools. See installation instructions and other documentation here http://samtools.github.io/bcftools/howtos/install.html
http://samtools.github.io/bcftools/
Other
650 stars 240 forks source link

Add --verbosity flag like samtools #2235

Open pettyalex opened 1 month ago

pettyalex commented 1 month ago

I've been using bcftools with Google Cloud Storage support, and it would be very useful to be able to pass verbosity into htslib in order to understand how the http requests are working.

It seems that although samtools has a way to set verbosity, bcftools does not.

pettyalex commented 1 month ago

I'll be more specific: I'm trying to understand failures when writing to Google Cloud Storage, and struggling to produce any log messages at all.

Specifically, I'm invoking bcftools like:

 export GCS_OAUTH_TOKEN=$(gcloud auth print-access-token)
 export GCS_REQUESTER_PAYS_PROJECT=my-project

bcftools view -i 'FMT/GQ>=20 & FMT/AD > 10 & F_MISSING <= 0.1' \
  -q 0.01 -f PASS -Ob1 -o gs://my-bucket/output.bcf --threads $(nproc) gs://source-bucket/input.vcf.gz && \
  bcftools index -f gs://my-bucket/output.bcf

I'm seeing intermittent failures and need visibility into what's happening. I see this run successfully for many hours at a time, sometimes it's able to write out the whole file, sometimes it fails with only [main_vcfview] Error: cannot write to gs://my-bucket/output.bcf

I am confident that my tokens are valid and able to read/write to those buckets, because I am consistently able to read/write small files with those tokens.