{"action":"created","issue":{"url":"https://api.github.com/repos/pysam-developers/pysam/issues/87","labels_url":"https://api.github.com/repos/pysam-developers/pysam/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/pysam-developers/pysam/issues/87/comments","events_url":"https://api.github.com/repos/pysam-developers/pysam/issues/87/events","html_url":"https://github.com/pysam-developers/pysam/issues/87","id":60805262,"number":87,"title":"Feature request: make index file parameterisable for VariantFile (and others?)","user":{"login":"jeromekelleher","id":2664569,"avatar_url":"https://avatars.githubusercontent.com/u/2664569?v=3","gravatar_id":"","url":"https://api.github.com/users/jeromekelleher","html_url":"https://github.com/jeromekelleher","followers_url":"https://api.github.com/users/jeromekelleher/followers","following_url":"https://api.github.com/users/jeromekelleher/following{/other_user}","gists_url":"https://api.github.com/users/jeromekelleher/gists{/gist_id}","starred_url":"https://api.github.com/users/jeromekelleher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeromekelleher/subscriptions","organizations_url":"https://api.github.com/users/jeromekelleher/orgs","repos_url":"https://api.github.com/users/jeromekelleher/repos","events_url":"https://api.github.com/users/jeromekelleher/events{/privacy}","received_events_url":"https://api.github.com/users/jeromekelleher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"AndreasHeger","id":4426336,"avatar_url":"https://avatars.githubusercontent.com/u/4426336?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreasHeger","html_url":"https://github.com/AndreasHeger","followers_url":"https://api.github.com/users/AndreasHeger/followers","following_url":"https://api.github.com/users/AndreasHeger/following{/other_user}","gists_url":"https://api.github.com/users/AndreasHeger/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreasHeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreasHeger/subscriptions","organizations_url":"https://api.github.com/users/AndreasHeger/orgs","repos_url":"https://api.github.com/users/AndreasHeger/repos","events_url":"https://api.github.com/users/AndreasHeger/events{/privacy}","received_events_url":"https://api.github.com/users/AndreasHeger/received_events","type":"User","site_admin":false},"milestone":null,"comments":13,"created_at":"2015-03-12T11:31:19Z","updated_at":"2015-06-30T12:48:54Z","closed_at":null,"body":"Currently, when we open a VariantFile from a HTTP or FTP URL, the low-level htslib code checks for the existence of the corresponding index file, and writes it to the current working directory, if it exists. This behaviour is perfectly fine for many applications, but is not suitable when many different files may be opened at the same time, which may happen to have the same index names. It is also not very good for the GA4GH server, where we want to allow HTTP URLs to be allowed as a data source (see https://github.com/ga4gh/server/pull/232 for details). We don't want our server blocking for an arbitrary amount of time while it downloads index files, and also having an apache process writing lots of essential files (possibly in parallel, overwriting and corrupting partially downloaded files, since there will be several processes) to the file system.\r\n\r\nIt would be much better if we could pre-download the index files, and then provide a base URL from which we can find the data file. This should be straightforward enough to do, but we'd need to have the option of specifying the index file to VariantFile when we open the URL (and others; presumably, we'll want to do the same thing for SAM files too).\r\n\r\nIs this feasible? I don't mind doing the legwork if you give me some pointers on where to start."},"comment":{"url":"https://api.github.com/repos/pysam-developers/pysam/issues/comments/117164609","html_url":"https://github.com/pysam-developers/pysam/issues/87#issuecomment-117164609","issue_url":"https://api.github.com/repos/pysam-developers/pysam/issues/87","id":117164609,"user":{"login":"AndreasHeger","id":4426336,"avatar_url":"https://avatars.githubusercontent.com/u/4426336?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreasHeger","html_url":"https://github.com/AndreasHeger","followers_url":"https://api.github.com/users/AndreasHeger/followers","following_url":"https://api.github.com/users/AndreasHeger/following{/other_user}","gists_url":"https://api.github.com/users/AndreasHeger/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreasHeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreasHeger/subscriptions","organizations_url":"https://api.github.com/users/AndreasHeger/orgs","repos_url":"https://api.github.com/users/AndreasHeger/repos","events_url":"https://api.github.com/users/AndreasHeger/events{/privacy}","received_events_url":"https://api.github.com/users/AndreasHeger/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T12:48:54Z","updated_at":"2015-06-30T12:48:54Z","body":"Thanks. An explicit index filename would indeed be better, but it seems that the current sam_index_load and hts_idx_load seem to work (tested for BAM/CRAM and also remote BAM).\r\nBest,\r\nAndreas"}}