obtaining a url for bam files

668 views
Skip to first unread message

Liang Guo

unread,
Aug 22, 2017, 5:04:32 PM8/22/17
to gen...@soe.ucsc.edu

Hello, 


I'm trying to create a track line but I'm not sure how can I get the url for all the bam files. They are currently stored in my university remote server. In order to get the url, do I have to download them to my local computer and upload them to a public storage platform, like dropbox or DNAnexus? or are there other better methods?

Thanks,
Liang


--


Christopher Lee

unread,
Aug 22, 2017, 6:25:05 PM8/22/17
to Liang Guo, UCSC Genome Browser Discussion List
Hi Liang,

Thank you for your question about obtaining a URL to a BAM file. The
UCSC Genome Browser accesses binary data like BAM files (or bigBed,
bigWig, tabix-indexed VCF, CRAM, etc) via byte-range requests to an
HTTP or FTP server. For this reason, your BAM files must be hosted on
an HTTP or FTP accessible server in order to visualize them in the
Genome Browser.

Most universities provide HTTP or FTP space, so you should first check
if your institution is already providing this space for you. There are
many alternative hosting options, such as Github: https://github.com
(although there are file size limits), figshare:
https://figshare.com/, and CyVerse: http://www.cyverse.org/ (a free
NSF funded service for researchers to host their data). Any hosting
provider that allows byte-range access will work for hosting your
binary data tracks. Dropbox in particular will not work because they
do not allow byte-range access to files. For further instructions on
using CyVerse to host binary data, please see this previously answered
mailing list question:
https://groups.google.com/a/soe.ucsc.edu/d/msg/genome/_Ws2jxNfJV4/0c5aGb_PAQAJ

If your files are private, you may also be interested in running a
Genome Browser in a Box (GBiB), a self-contained virtual machine of
the UCSC Genome Browser, which can be configured not to make any
connections to UCSC, and where you can share a directory on your
local, host operating system with the virtual machine, allowing access
to your files without sending data over the web. For more information
on the GBiB, please see the following documentation:
http://genome.ucsc.edu/goldenPath/help/gbib

The GBiB is free for non-commercial use by non-profit organizations,
academic institutions, and for personal use.

Please let us know if you have any further questions!

Thank you again for your inquiry and using the UCSC Genome Browser. If
you have any further questions, please reply to gen...@soe.ucsc.edu.
All messages sent to that address are archived on a
publicly-accessible forum. If your question includes sensitive data,
you may send it instead to genom...@soe.ucsc.edu.

Christopher Lee
UCSC Genomics Institute
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "UCSC Genome Browser Public Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to genome+un...@soe.ucsc.edu.
> To post to this group, send email to gen...@soe.ucsc.edu.
> Visit this group at https://groups.google.com/a/soe.ucsc.edu/group/genome/.
> To view this discussion on the web visit
> https://groups.google.com/a/soe.ucsc.edu/d/msgid/genome/CAF9msgPjg5jXoGy22MjQJK-ApukUD7Ut4tu6Z%2BxDJuuGzYiKHQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/a/soe.ucsc.edu/d/optout.

Liang Guo

unread,
Aug 23, 2017, 2:26:38 PM8/23/17
to Christopher Lee, UCSC Genome Browser Discussion List
Thanks for the reply!

I'm using the CyVerse now, but another problem showed up.
I uploaded both the bam file and the associated bam.bai file together, and they appear under the same folder. But when I added the custom track, an error popped up as below:  

Error : failed to read index file (.bai) corresponding to https://de.cyverse.org/dl/d/1DACAFC1-B881-4A55-932D-1725856F5F84/Huh_0h.sorted.bam

I checked both URLs:

--

Liang Guo, 

CMB Program

http://www.cvm.umn.edu/gradprog/programs/cmb/home.html

College of Veterinary Medicine

University of Minnesota, Twin Cities

Christopher Lee

unread,
Aug 24, 2017, 7:18:44 PM8/24/17
to Liang Guo, UCSC Genome Browser Discussion List
Hi Liang,

Thank you for your question about loading a BAM custom track through CyVerse. When using CyVerse, they create distinct URLs for files, and so we are not able to use the normal relative link to find your index file. Since we need this index file in order to load the BAM, you get the error your are experiencing. However, if you manually tell the Genome Browser where to look for the index file on your track line with the bigDataIndex attribute, you should be able to load your track successfully. Here is an example track line that you can use (note this is all one line):
track type=bam name=MyBam bigDataIndex=https://de.cyverse.org/dl/d/4DD33E42-751B-4EBE-A9F7-9BAFE7C778D0/Huh_0h.sorted.bam.bai bigDataUrl=https://de.cyverse.org/dl/d/1DACAFC1-B881-4A55-932D-1725856F5F84/Huh_0h.sorted.bam

You can read more about this bigDataIndex setting on the following page:
http://genome.ucsc.edu/goldenPath/help/trackDb/trackDbHub.html#bam

Please let us know if you have any further questions!

Thank you again for your inquiry and using the UCSC Genome Browser. If
you have any further questions, please reply to gen...@soe.ucsc.edu.
All messages sent to that address are archived on a
publicly-accessible forum. If your question includes sensitive data,
you may send it instead to genom...@soe.ucsc.edu.

Christopher Lee
UCSC Genomics Institute

Reply all
Reply to author
Forward
0 new messages