{"action":"created","comment":{"url":"https://api.github.com/repos/galaxyproject/tools-iuc/pulls/comments/45651704","id":45651704,"diff_hunk":"@@ -0,0 +1,127 @@\n+<tool id=\"samtools_cram_to_bam\" name=\"samtools CRAM to BAM\" version=\"1.2.a\">\n+    <description>convert CRAM alignments to BAM format</description>\n+\n+    <requirements>\n+        <requirement type=\"package\" version=\"1.2\">samtools</requirement>\n+    </requirements>\n+    \n+    <stdio>\n+        <exit_code range=\"1:\" />\n+        <exit_code range=\":-1\" />\n+    </stdio>\n+\n+    <version_command><![CDATA[ samtools 2>&1 | grep Version ]]></version_command>\n+\n+    <command>\n+    <![CDATA[\n+        ## If no cram index exists, e.g. using planemo test, create one:\n+        #if $parameter_regions.target_region != \"entire_input_file\"","path":"tools/samtools_cram_to_bam/samtools_cram_to_bam.xml","position":18,"original_position":18,"commit_id":"09867f59893ed5c8059497a0a2629d62043fb085","original_commit_id":"09867f59893ed5c8059497a0a2629d62043fb085","user":{"login":"yhoogstrate","id":2264697,"avatar_url":"https://avatars.githubusercontent.com/u/2264697?v=3","gravatar_id":"","url":"https://api.github.com/users/yhoogstrate","html_url":"https://github.com/yhoogstrate","followers_url":"https://api.github.com/users/yhoogstrate/followers","following_url":"https://api.github.com/users/yhoogstrate/following{/other_user}","gists_url":"https://api.github.com/users/yhoogstrate/gists{/gist_id}","starred_url":"https://api.github.com/users/yhoogstrate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yhoogstrate/subscriptions","organizations_url":"https://api.github.com/users/yhoogstrate/orgs","repos_url":"https://api.github.com/users/yhoogstrate/repos","events_url":"https://api.github.com/users/yhoogstrate/events{/privacy}","received_events_url":"https://api.github.com/users/yhoogstrate/received_events","type":"User","site_admin":false},"body":"Samtools index in 1.2 will only crash if a 4th argument (path to the index) is specified. E.g. `samtools index \"${input_alignment}\" \"${input_alignment}.crai\"`. It works as given above, so this line should be preserved since cram indices (*.crai) are not part of the current cram datatype in galaxy.\r\n\r\nThe ideal situation would be to include .crai cram indexes within the galaxy datatype definition, which would make this if-statement unnecessary. I have thought of implementing this, but adding a cram index via a samtools background process becomes a big mess because of the different versions of samtools. Galaxy should come with 1 fixed version of samtools to make this workable. Currently the galaxy datatype definition of bam indices already contains different lines of code for specific versions of samtools. Additional lines would also be required for cram indices (to support samtools or 1.2), etc. So my suggestion would be to include the lines above until crai indices are part of the galaxy datatypes.\r\n","created_at":"2015-11-23T19:52:35Z","updated_at":"2015-11-23T19:52:35Z","html_url":"https://github.com/galaxyproject/tools-iuc/pull/410#discussion_r45651704","pull_request_url":"https://api.github.com/repos/galaxyproject/tools-iuc/pulls/410","_links":{"self":{"href":"https://api.github.com/repos/galaxyproject/tools-iuc/pulls/comments/45651704"},"html":{"href":"https://github.com/galaxyproject/tools-iuc/pull/410#discussion_r45651704"},"pull_request":{"href":"https://api.github.com/repos/galaxyproject/tools-iuc/pulls/410"}}},"pull_request":{"url":"https://api.github.com/repos/galaxyproject/tools-iuc/pulls/410","id":51448753,"html_url":"https://github.com/galaxyproject/tools-iuc/pull/410","diff_url":"https://github.com/galaxyproject/tools-iuc/pull/410.diff","patch_url":"https://github.com/galaxyproject/tools-iuc/pull/410.patch","issue_url":"https://api.github.com/repos/galaxyproject/tools-iuc/issues/410","number":410,"state":"open","locked":false,"title":"Samtools cram bam conversion wrappers","user":{"login":"yhoogstrate","id":2264697,"avatar_url":"https://avatars.githubusercontent.com/u/2264697?v=3","gravatar_id":"","url":"https://api.github.com/users/yhoogstrate","html_url":"https://github.com/yhoogstrate","followers_url":"https://api.github.com/users/yhoogstrate/followers","following_url":"https://api.github.com/users/yhoogstrate/following{/other_user}","gists_url":"https://api.github.com/users/yhoogstrate/gists{/gist_id}","starred_url":"https://api.github.com/users/yhoogstrate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yhoogstrate/subscriptions","organizations_url":"https://api.github.com/users/yhoogstrate/orgs","repos_url":"https://api.github.com/users/yhoogstrate/repos","events_url":"https://api.github.com/users/yhoogstrate/events{/privacy}","received_events_url":"https://api.github.com/users/yhoogstrate/received_events","type":"User","site_admin":false},"body":"This is the second attempt to get BAM `<->` CRAM conversion tools into galaxy. This wrapper uses samtools 1.2 instead of cramtools.","created_at":"2015-11-21T19:55:33Z","updated_at":"2015-11-23T19:52:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f15b028a67e7031ae9047e4e3841798a50a55175","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/galaxyproject/tools-iuc/pulls/410/commits","review_comments_url":"https://api.github.com/repos/galaxyproject/tools-iuc/pulls/410/comments","review_comment_url":"https://api.github.com/repos/galaxyproject/tools-iuc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/galaxyproject/tools-iuc/issues/410/comments","statuses_url":"https://api.github.com/repos/galaxyproject/tools-iuc/statuses/09867f59893ed5c8059497a0a2629d62043fb085","head":{"label":"yhoogstrate:samtools_cram_bam_conversion","ref":"samtools_cram_bam_conversion","sha":"09867f59893ed5c8059497a0a2629d62043fb085","user":{"login":"yhoogstrate","id":2264697,"avatar_url":"https://avatars.githubusercontent.com/u/2264697?v=3","gravatar_id":"","url":"https://api.github.com/users/yhoogstrate","html_url":"https://github.com/yhoogstrate","followers_url":"https://api.github.com/users/yhoogstrate/followers","following_url":"https://api.github.com/users/yhoogstrate/following{/other_user}","gists_url":"https://api.github.com/users/yhoogstrate/gists{/gist_id}","starred_url":"https://api.github.com/users/yhoogstrate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yhoogstrate/subscriptions","organizations_url":"https://api.github.com/users/yhoogstrate/orgs","repos_url":"https://api.github.com/users/yhoogstrate/repos","events_url":"https://api.github.com/users/yhoogstrate/events{/privacy}","received_events_url":"https://api.github.com/users/yhoogstrate/received_events","type":"User","site_admin":false},"repo":{"id":32526715,"name":"tools-iuc","full_name":"yhoogstrate/tools-iuc","owner":{"login":"yhoogstrate","id":2264697,"avatar_url":"https://avatars.githubusercontent.com/u/2264697?v=3","gravatar_id":"","url":"https://api.github.com/users/yhoogstrate","html_url":"https://github.com/yhoogstrate","followers_url":"https://api.github.com/users/yhoogstrate/followers","following_url":"https://api.github.com/users/yhoogstrate/following{/other_user}","gists_url":"https://api.github.com/users/yhoogstrate/gists{/gist_id}","starred_url":"https://api.github.com/users/yhoogstrate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yhoogstrate/subscriptions","organizations_url":"https://api.github.com/users/yhoogstrate/orgs","repos_url":"https://api.github.com/users/yhoogstrate/repos","events_url":"https://api.github.com/users/yhoogstrate/events{/privacy}","received_events_url":"https://api.github.com/users/yhoogstrate/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yhoogstrate/tools-iuc","description":"Tool Shed repositories maintained and developed by the Intergalactic Utilities Commission","fork":true,"url":"https://api.github.com/repos/yhoogstrate/tools-iuc","forks_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/forks","keys_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/teams","hooks_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/hooks","issue_events_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/issues/events{/number}","events_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/events","assignees_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/assignees{/user}","branches_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/branches{/branch}","tags_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/tags","blobs_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/git/refs{/sha}","trees_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/statuses/{sha}","languages_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/languages","stargazers_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/stargazers","contributors_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/contributors","subscribers_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/subscribers","subscription_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/subscription","commits_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/commits{/sha}","git_commits_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/git/commits{/sha}","comments_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/comments{/number}","issue_comment_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/issues/comments{/number}","contents_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/contents/{+path}","compare_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/merges","archive_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/downloads","issues_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/issues{/number}","pulls_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/pulls{/number}","milestones_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/milestones{/number}","notifications_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/labels{/name}","releases_url":"https://api.github.com/repos/yhoogstrate/tools-iuc/releases{/id}","created_at":"2015-03-19T14:35:09Z","updated_at":"2015-03-19T14:35:10Z","pushed_at":"2015-11-22T10:59:27Z","git_url":"git://github.com/yhoogstrate/tools-iuc.git","ssh_url":"git@github.com:yhoogstrate/tools-iuc.git","clone_url":"https://github.com/yhoogstrate/tools-iuc.git","svn_url":"https://github.com/yhoogstrate/tools-iuc","homepage":"https://wiki.galaxyproject.org/IUC","size":38221,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"galaxyproject:master","ref":"master","sha":"59655547b6c5923e4261dfe52497a7e8c6be27b5","user":{"login":"galaxyproject","id":7937847,"avatar_url":"https://avatars.githubusercontent.com/u/7937847?v=3","gravatar_id":"","url":"https://api.github.com/users/galaxyproject","html_url":"https://github.com/galaxyproject","followers_url":"https://api.github.com/users/galaxyproject/followers","following_url":"https://api.github.com/users/galaxyproject/following{/other_user}","gists_url":"https://api.github.com/users/galaxyproject/gists{/gist_id}","starred_url":"https://api.github.com/users/galaxyproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galaxyproject/subscriptions","organizations_url":"https://api.github.com/users/galaxyproject/orgs","repos_url":"https://api.github.com/users/galaxyproject/repos","events_url":"https://api.github.com/users/galaxyproject/events{/privacy}","received_events_url":"https://api.github.com/users/galaxyproject/received_events","type":"Organization","site_admin":false},"repo":{"id":23992530,"name":"tools-iuc","full_name":"galaxyproject/tools-iuc","owner":{"login":"galaxyproject","id":7937847,"avatar_url":"https://avatars.githubusercontent.com/u/7937847?v=3","gravatar_id":"","url":"https://api.github.com/users/galaxyproject","html_url":"https://github.com/galaxyproject","followers_url":"https://api.github.com/users/galaxyproject/followers","following_url":"https://api.github.com/users/galaxyproject/following{/other_user}","gists_url":"https://api.github.com/users/galaxyproject/gists{/gist_id}","starred_url":"https://api.github.com/users/galaxyproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galaxyproject/subscriptions","organizations_url":"https://api.github.com/users/galaxyproject/orgs","repos_url":"https://api.github.com/users/galaxyproject/repos","events_url":"https://api.github.com/users/galaxyproject/events{/privacy}","received_events_url":"https://api.github.com/users/galaxyproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/galaxyproject/tools-iuc","description":"Tool Shed repositories maintained and developed by the Intergalactic Utilities Commission","fork":false,"url":"https://api.github.com/repos/galaxyproject/tools-iuc","forks_url":"https://api.github.com/repos/galaxyproject/tools-iuc/forks","keys_url":"https://api.github.com/repos/galaxyproject/tools-iuc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/galaxyproject/tools-iuc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/galaxyproject/tools-iuc/teams","hooks_url":"https://api.github.com/repos/galaxyproject/tools-iuc/hooks","issue_events_url":"https://api.github.com/repos/galaxyproject/tools-iuc/issues/events{/number}","events_url":"https://api.github.com/repos/galaxyproject/tools-iuc/events","assignees_url":"https://api.github.com/repos/galaxyproject/tools-iuc/assignees{/user}","branches_url":"https://api.github.com/repos/galaxyproject/tools-iuc/branches{/branch}","tags_url":"https://api.github.com/repos/galaxyproject/tools-iuc/tags","blobs_url":"https://api.github.com/repos/galaxyproject/tools-iuc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/galaxyproject/tools-iuc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/galaxyproject/tools-iuc/git/refs{/sha}","trees_url":"https://api.github.com/repos/galaxyproject/tools-iuc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/galaxyproject/tools-iuc/statuses/{sha}","languages_url":"https://api.github.com/repos/galaxyproject/tools-iuc/languages","stargazers_url":"https://api.github.com/repos/galaxyproject/tools-iuc/stargazers","contributors_url":"https://api.github.com/repos/galaxyproject/tools-iuc/contributors","subscribers_url":"https://api.github.com/repos/galaxyproject/tools-iuc/subscribers","subscription_url":"https://api.github.com/repos/galaxyproject/tools-iuc/subscription","commits_url":"https://api.github.com/repos/galaxyproject/tools-iuc/commits{/sha}","git_commits_url":"https://api.github.com/repos/galaxyproject/tools-iuc/git/commits{/sha}","comments_url":"https://api.github.com/repos/galaxyproject/tools-iuc/comments{/number}","issue_comment_url":"https://api.github.com/repos/galaxyproject/tools-iuc/issues/comments{/number}","contents_url":"https://api.github.com/repos/galaxyproject/tools-iuc/contents/{+path}","compare_url":"https://api.github.com/repos/galaxyproject/tools-iuc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/galaxyproject/tools-iuc/merges","archive_url":"https://api.github.com/repos/galaxyproject/tools-iuc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/galaxyproject/tools-iuc/downloads","issues_url":"https://api.github.com/repos/galaxyproject/tools-iuc/issues{/number}","pulls_url":"https://api.github.com/repos/galaxyproject/tools-iuc/pulls{/number}","milestones_url":"https://api.github.com/repos/galaxyproject/tools-iuc/milestones{/number}","notifications_url":"https://api.github.com/repos/galaxyproject/tools-iuc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/galaxyproject/tools-iuc/labels{/name}","releases_url":"https://api.github.com/repos/galaxyproject/tools-iuc/releases{/id}","created_at":"2014-09-13T11:18:49Z","updated_at":"2015-11-09T13:02:18Z","pushed_at":"2015-11-23T19:32:09Z","git_url":"git://github.com/galaxyproject/tools-iuc.git","ssh_url":"git@github.com:galaxyproject/tools-iuc.git","clone_url":"https://github.com/galaxyproject/tools-iuc.git","svn_url":"https://github.com/galaxyproject/tools-iuc","homepage":"https://wiki.galaxyproject.org/IUC","size":104141,"stargazers_count":19,"watchers_count":19,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":70,"forks":44,"open_issues":70,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/galaxyproject/tools-iuc/pulls/410"},"html":{"href":"https://github.com/galaxyproject/tools-iuc/pull/410"},"issue":{"href":"https://api.github.com/repos/galaxyproject/tools-iuc/issues/410"},"comments":{"href":"https://api.github.com/repos/galaxyproject/tools-iuc/issues/410/comments"},"review_comments":{"href":"https://api.github.com/repos/galaxyproject/tools-iuc/pulls/410/comments"},"review_comment":{"href":"https://api.github.com/repos/galaxyproject/tools-iuc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/galaxyproject/tools-iuc/pulls/410/commits"},"statuses":{"href":"https://api.github.com/repos/galaxyproject/tools-iuc/statuses/09867f59893ed5c8059497a0a2629d62043fb085"}}}}