Download GTEx bam files

Good afternoon, 

I am reaching as I have issues to download some GTEx bam files.

For context, I have the necessary permissions for my NIH account and NHGRI AnVIL Data Commons on Terra. I can successfully read the BAM files from the Google bucket fc-secure-ff8156a3-ddf3-42e4-9211-0fd89da62108/GTEx_Analysis_2017-06-05_v8_RNAseq_BAM_files.

However, I need to download some of these files for further analysis outside of Terra. When I attempt to use the gsutil command to download them, I encounter an issue. I'm unsure which permissions the error refers to. Please see the error message below:

root@d0adfd599800:/# gsutil -m cp -r gs://fc-secure-ff8156a3-ddf3-42e4-9211-0fd89da62108/GTEx_Analysis_2017-06-05_v8_RNAseq_BAM_files/GTEX-1117F-0226-SM-5GZZ7.Aligned.sortedByCoord.out.patched.md.bam ./ 
ServiceException: 401 Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object. Permission 'storage.objects.get' denied on resource (or it may not exist).
CommandException: 1 file/object could not be transferred.

Could you please provide me help with this issue?
Thank you so much in advance, 

MaVi

 

Comments

5 comments

  • Comment author
    Samantha (she/her)

    Hi MaVi,

    Thanks for writing in. That error indicates that you have not yet logged into the Google Cloud SDK. Running the following command should resolve the issue:

    gcloud auth login <Terra account email>

    That said, I noticed you are attempting to download GTEx data from the AnVIL_GTEx_V8_hg38 workspace. As mentioned in the workspace dashboard, this data is actually available free of charge if you download from the Gen3 platform. For instructions on how to do so, please see the support documentation here.

    Best,

    Samantha

    0
  • Comment author
    Maria Virginia Ruiz Cuevas

    Hi Samantha, 

    Thank you for your answer.

    I want to confirm that I am logged into the Google Cloud SDK. I have attached a screenshot showing that I can access the BAM file using samtools. However, when I attempt to download the same BAM file using gsutil, I encounter the issue.

    Thank you for pointing me out to the Gen3 platform. However, after I explored it a bit and find it difficult to get the same samples that were used in our prior analysis using Terra. We based our analysis by the name of the bam file GTEX-1117F-0226-SM-5GZZ7.Aligned.sortedByCoord.out.patched.md.bam 
    So I don't know how to match the exact same files in Gen3 platform. 
    That's why I would prefer to get help to be able to download the files using gsutil.

    Thank you so much in advance, 

    MaVi




     

    0
  • Comment author
    Samantha (she/her)

    Hi MaVi,

    The "Anonymous caller" message in the error still indicates that the gsutil tool does not recognize your account as being logged in. Can you please try running the command below and following the prompts to authenticate your account?

    gcloud auth application-default login

    Best,

    Samantha

    0
  • Comment author
    Maria Virginia Ruiz Cuevas

    Hi Samatha, 

    I have already run that command so I could use Samtools to read the BAM file.

    However, as shown in the screenshot below, the same issue persists even after re-running the authentication process.

    Best, 

    MaVi

    0
  • Comment author
    Samantha (she/her)

    Hi MaVi,

    That's interesting. Can you please try using the `gcloud storage cp` command instead of `gsutil cp`? Also, the bucket you are trying to download from has Requester Pays enabled so you'll need to pass a project to bill in your argument.

    gcloud storage --billing-project=<project_to_bill> cp <gs://path-to-file-to-download> <gs://destination>

    Best,

    Samantha

    0

Please sign in to leave a comment.