{"action":"created","issue":{"url":"https://api.github.com/repos/bigdatagenomics/adam/issues/676","labels_url":"https://api.github.com/repos/bigdatagenomics/adam/issues/676/labels{/name}","comments_url":"https://api.github.com/repos/bigdatagenomics/adam/issues/676/comments","events_url":"https://api.github.com/repos/bigdatagenomics/adam/issues/676/events","html_url":"https://github.com/bigdatagenomics/adam/issues/676","id":81022368,"number":676,"title":"BAMHeader not set when running on a cluster","user":{"login":"arahuja","id":455755,"avatar_url":"https://avatars.githubusercontent.com/u/455755?v=3","gravatar_id":"","url":"https://api.github.com/users/arahuja","html_url":"https://github.com/arahuja","followers_url":"https://api.github.com/users/arahuja/followers","following_url":"https://api.github.com/users/arahuja/following{/other_user}","gists_url":"https://api.github.com/users/arahuja/gists{/gist_id}","starred_url":"https://api.github.com/users/arahuja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arahuja/subscriptions","organizations_url":"https://api.github.com/users/arahuja/orgs","repos_url":"https://api.github.com/users/arahuja/repos","events_url":"https://api.github.com/users/arahuja/events{/privacy}","received_events_url":"https://api.github.com/users/arahuja/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-26T15:51:09Z","updated_at":"2015-06-01T16:53:58Z","closed_at":null,"body":"When running `transform` with `.bam` file as the output, I see the following error:\r\n```\r\nException in thread \"main\" java.lang.AssertionError: assertion failed: Cannot return header if not attached.\r\n        at scala.Predef$.assert(Predef.scala:179)\r\n        at org.bdgenomics.adam.rdd.read.ADAMBAMOutputFormat$.getHeader(ADAMBAMOutputFormat.scala:60)\r\n        at org.bdgenomics.adam.rdd.read.ADAMBAMOutputFormat.<init>(ADAMBAMOutputFormat.scala:68)\r\n        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)\r\n        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)\r\n        at java.lang.Class.newInstance(Class.java:379)\r\n        at org.apache.spark.rdd.InstrumentedOutputFormat.<init>(InstrumentedOutputFormat.scala:33)\r\n        at org.bdgenomics.adam.rdd.read.InstrumentedADAMBAMOutputFormat.<init>(ADAMBAMOutputFormat.scala:71)\r\n        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)\r\n        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)\r\n        at java.lang.Class.newInstance(Class.java:379)\r\n        at org.apache.spark.rdd.PairRDDFunctions.saveAsNewAPIHadoopDataset(PairRDDFunctions.scala:958)\r\n```\r\n\r\nI tried to fix this with a similar strategy used by @fnothaft for the VCF header (see https://github.com/bigdatagenomics/adam/compare/master...hammerlab:bam-save-header?expand=1), but did not seem to take.  Any ideas on this?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bigdatagenomics/adam/issues/comments/107635754","html_url":"https://github.com/bigdatagenomics/adam/issues/676#issuecomment-107635754","issue_url":"https://api.github.com/repos/bigdatagenomics/adam/issues/676","id":107635754,"user":{"login":"ryan-williams","id":465045,"avatar_url":"https://avatars.githubusercontent.com/u/465045?v=3","gravatar_id":"","url":"https://api.github.com/users/ryan-williams","html_url":"https://github.com/ryan-williams","followers_url":"https://api.github.com/users/ryan-williams/followers","following_url":"https://api.github.com/users/ryan-williams/following{/other_user}","gists_url":"https://api.github.com/users/ryan-williams/gists{/gist_id}","starred_url":"https://api.github.com/users/ryan-williams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryan-williams/subscriptions","organizations_url":"https://api.github.com/users/ryan-williams/orgs","repos_url":"https://api.github.com/users/ryan-williams/repos","events_url":"https://api.github.com/users/ryan-williams/events{/privacy}","received_events_url":"https://api.github.com/users/ryan-williams/received_events","type":"User","site_admin":false},"created_at":"2015-06-01T16:53:58Z","updated_at":"2015-06-01T16:53:58Z","body":"Just tried with https://github.com/bigdatagenomics/adam/compare/master...ryan-williams:sam-attempt, still see the issue. Will dig through logs and see if I can verify whether the executors attempted to set the header."}}