{"action":"created","issue":{"url":"https://api.github.com/repos/samtools/htslib/issues/92","labels_url":"https://api.github.com/repos/samtools/htslib/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/samtools/htslib/issues/92/comments","events_url":"https://api.github.com/repos/samtools/htslib/issues/92/events","html_url":"https://github.com/samtools/htslib/issues/92","id":33415598,"number":92,"title":"CRAM can't load reference data over a network","user":{"login":"jmarshall","id":70921,"avatar_url":"https://avatars.githubusercontent.com/u/70921?v=3","gravatar_id":"","url":"https://api.github.com/users/jmarshall","html_url":"https://github.com/jmarshall","followers_url":"https://api.github.com/users/jmarshall/followers","following_url":"https://api.github.com/users/jmarshall/following{/other_user}","gists_url":"https://api.github.com/users/jmarshall/gists{/gist_id}","starred_url":"https://api.github.com/users/jmarshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmarshall/subscriptions","organizations_url":"https://api.github.com/users/jmarshall/orgs","repos_url":"https://api.github.com/users/jmarshall/repos","events_url":"https://api.github.com/users/jmarshall/events{/privacy}","received_events_url":"https://api.github.com/users/jmarshall/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/samtools/htslib/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/samtools/htslib/milestones/3","labels_url":"https://api.github.com/repos/samtools/htslib/milestones/3/labels","id":607991,"number":3,"title":"wishlist","description":"","creator":{"login":"jmarshall","id":70921,"avatar_url":"https://avatars.githubusercontent.com/u/70921?v=3","gravatar_id":"","url":"https://api.github.com/users/jmarshall","html_url":"https://github.com/jmarshall","followers_url":"https://api.github.com/users/jmarshall/followers","following_url":"https://api.github.com/users/jmarshall/following{/other_user}","gists_url":"https://api.github.com/users/jmarshall/gists{/gist_id}","starred_url":"https://api.github.com/users/jmarshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmarshall/subscriptions","organizations_url":"https://api.github.com/users/jmarshall/orgs","repos_url":"https://api.github.com/users/jmarshall/repos","events_url":"https://api.github.com/users/jmarshall/events{/privacy}","received_events_url":"https://api.github.com/users/jmarshall/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2014-03-24T16:01:55Z","updated_at":"2015-02-09T09:49:33Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2014-05-13T16:33:54Z","updated_at":"2015-02-09T11:16:22Z","closed_at":null,"body":"(Migrated from samtools/samtools#145.)\r\n\r\nThe CRAM code currently isn't plugged into a networking library (quoting @jkbonfield on the samtools issue):\r\n\r\n> That's one thing currently missing from CRAM. It only support\r\nUR:file at the moment as I wasn't sure what network library we'd end\r\nup with for fetching remote data.\r\n>\r\n> It could be extended at some time to use full ftp: and http: accessor\r\nmethods, although it's probably not the correct solution as it'll end\r\nup being slow vs using the local MD5 archive.\r\n\r\nSee also notes in that issue re handling `-T ref.fa` and calling `cram_load_reference`."},"comment":{"url":"https://api.github.com/repos/samtools/htslib/issues/comments/73492829","html_url":"https://github.com/samtools/htslib/issues/92#issuecomment-73492829","issue_url":"https://api.github.com/repos/samtools/htslib/issues/92","id":73492829,"user":{"login":"jkbonfield","id":2210525,"avatar_url":"https://avatars.githubusercontent.com/u/2210525?v=3","gravatar_id":"","url":"https://api.github.com/users/jkbonfield","html_url":"https://github.com/jkbonfield","followers_url":"https://api.github.com/users/jkbonfield/followers","following_url":"https://api.github.com/users/jkbonfield/following{/other_user}","gists_url":"https://api.github.com/users/jkbonfield/gists{/gist_id}","starred_url":"https://api.github.com/users/jkbonfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkbonfield/subscriptions","organizations_url":"https://api.github.com/users/jkbonfield/orgs","repos_url":"https://api.github.com/users/jkbonfield/repos","events_url":"https://api.github.com/users/jkbonfield/events{/privacy}","received_events_url":"https://api.github.com/users/jkbonfield/received_events","type":"User","site_admin":false},"created_at":"2015-02-09T11:16:22Z","updated_at":"2015-02-09T11:16:22Z","body":"On Mon, Feb 09, 2015 at 01:49:30AM -0800, John Marshall wrote:\n> Looking at  the code, I am unsure whether this has yet been plugged\n> in.  In particular, I don't think we will look for a `.fai` for and\n> chromosomes in `UR:http://host/ref/organism.fa`... @jkbonfield? \n\nWe could probably add it, but right now it only uses local UR codes\n(ie straight filenames or file://).  It's not just the .fai searching\nbit either, but also the requirement to have the reference itself.\n\nThis only really matters for converting from SAM/BAM to CRAM though.\nOnce you have a CRAM the headers are mandated to have an M5 tag, which\nis the preferred accession route for fetching the reference.\n\nJames\n\n-- \nJames Bonfield (jkb@sanger.ac.uk) | Hora aderat briligi. Nunc et Slythia Tova\n                                  | Plurima gyrabant gymbolitare vabo;\n  A Staden Package developer:     | Et Borogovorum mimzebant undique formae,\nhttps://sf.net/projects/staden/   | Momiferique omnes exgrabure Rathi. \n\n\n-- \n The Wellcome Trust Sanger Institute is operated by Genome Research \n Limited, a charity registered in England with number 1021457 and a \n company registered in England with number 2742969, whose registered \n office is 215 Euston Road, London, NW1 2BE. \n"}}