# Issues with GTEx BAM files on Galaxy

**URL:** <https://help.anvilproject.org/t/issues-with-gtex-bam-files-on-galaxy/22>\
**Category:** Help\
**Created:** [February 16, 2021, 11:05pm UTC](https://help.anvilproject.org/t/issues-with-gtex-bam-files-on-galaxy/22 "2021-02-16T23:05:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![edmundotogo](https://yyz1.discourse-cdn.com/flex027/user_avatar/help.anvilproject.org/edmundotogo/32/95_2.png) [@edmundotogo](https://help.anvilproject.org/u/edmundotogo)\
**Post date:** [February 16, 2021, 11:05pm UTC](https://help.anvilproject.org/t/issues-with-gtex-bam-files-on-galaxy/22/1 "2021-02-16T23:05:30Z")

</div>

I am able to import GTEx BAM files (and indexes) into my Galaxy instance.

But when I try to use `htseq_counts` (to get transcript counts from the alignment) I get this error message:  
[E::hts\_hopen] Failed to open file /galaxy/server/database/objects/0/7/6/dataset\_076d96d0-7fbd-4b1b-a57d-809a4c95e0ee.dat  
[E::hts\_open\_format] Failed to open file /galaxy/server/database/objects/0/7/6/dataset\_076d96d0-7fbd-4b1b-a57d-809a4c95e0ee.dat  
samt

 ![Screen Shot 2021-02-16 at 6.03.46 PM](https://canada1.discourse-cdn.com/flex027/uploads/anvil/original/1X/3c7830a76fe41951827c028287d47eef14e2d34e.png)

---

<div class="post-metadata">

**Author:** ![edmundotogo](https://yyz1.discourse-cdn.com/flex027/user_avatar/help.anvilproject.org/edmundotogo/32/95_2.png) [@edmundotogo](https://help.anvilproject.org/u/edmundotogo)\
**Post date:** [February 16, 2021, 11:06pm UTC](https://help.anvilproject.org/t/issues-with-gtex-bam-files-on-galaxy/22/2 "2021-02-16T23:06:08Z")

</div>

And when doing a simple `samtools idxstats` returns this error:  
(upload://dmMSwup0syhcNRAW2SU3u8SYQiA.png)  
( /galaxy/server/database/jobs\_directory/000/5/tool\_script.sh: line 22: /galaxy/server/database/objects/e/3/f/dataset\_e3fcc04d-4646-4de3-8ce4-955206f0b2df.dat: No such file or directory )  
 ![Screen Shot 2021-02-16 at 5.57.40 PM](https://canada1.discourse-cdn.com/flex027/uploads/anvil/original/1X/5dafb7e0e1385f1af340699e4d07387affdb4fd0.png)

I tested this on at least two different alignments.  
Is this an issue with how it is loaded into Galaxy, or an issue with the BAM files?

---

<div class="post-metadata">

**Author:** ![edmundotogo](https://yyz1.discourse-cdn.com/flex027/user_avatar/help.anvilproject.org/edmundotogo/32/95_2.png) [@edmundotogo](https://help.anvilproject.org/u/edmundotogo)\
**Post date:** [February 17, 2021, 3:37pm UTC](https://help.anvilproject.org/t/issues-with-gtex-bam-files-on-galaxy/22/3 "2021-02-17T15:37:11Z")

</div>

The issue with `htseq_counts` seems to be resolved. It was recognizing the index file, instead of the actual BAM files.

However, I am not sure why `samtools idxstats` command will not work. I receive the same error message.

---

<div class="post-metadata">

**Author:** ![cutsort](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@cutsort](https://help.anvilproject.org/u/cutsort)\
**Post date:** [February 18, 2021, 2:24pm UTC](https://help.anvilproject.org/t/issues-with-gtex-bam-files-on-galaxy/22/4 "2021-02-18T14:24:30Z")

</div>

From Terra Support 9:23am EST

> Your request (114080) has been received and is being reviewed by our support staff.

---

<div class="post-metadata">

**Author:** ![cutsort](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@cutsort](https://help.anvilproject.org/u/cutsort)\
**Post date:** [February 18, 2021, 3:32pm UTC](https://help.anvilproject.org/t/issues-with-gtex-bam-files-on-galaxy/22/5 "2021-02-18T15:32:23Z")

</div>

From Terra Support 9:38am

> Is the main issue with the `samtools idxstats` command on uploaded files? Resulting in this error?
