Using samtools with GCS (google cloud storage) on a docker container seems to give "Protocol Not Supported" error
Having an issue trying to use the samtools view gs://mybucket/myfile.bam > myfile.bam when using this command with docker.
Always get the error "samtools view: failed to open "gs://mybucket/myfile.bam" for reading: Protocol not supported"
Although the command works just fine GCP VMs, Im unable to recreate this in a docker container.
• 2,173 views
•
link
1 answer
export GOOGLE_APPLICATION_CREDENTIALS="./credentials.json"
export GCS_OAUTH_TOKEN=$(gcloud auth print-access-token)
gcloud storage cp <yourbai.bai> mybai.bai
#Download specific chromosome of BAM file
samtools view -h -b -L chr1 mybai.bai gcs://mybam.bam > "mybam.bam"
I have got it to work with this sort of script.
• 0 views
•
link
Log in to answer this question.
This is a bit late, but the first thing to go is to run
samtools --versionand make sure the docker samtools is configured with the the GCS protocols.