{"action":"created","issue":{"url":"https://api.github.com/repos/broadinstitute/hellbender/issues/658","labels_url":"https://api.github.com/repos/broadinstitute/hellbender/issues/658/labels{/name}","comments_url":"https://api.github.com/repos/broadinstitute/hellbender/issues/658/comments","events_url":"https://api.github.com/repos/broadinstitute/hellbender/issues/658/events","html_url":"https://github.com/broadinstitute/hellbender/issues/658","id":95488392,"number":658,"title":"Write a helper to quickly go from function -> PTransform. ","user":{"login":"jean-philippe-martin","id":10458949,"avatar_url":"https://avatars.githubusercontent.com/u/10458949?v=3","gravatar_id":"","url":"https://api.github.com/users/jean-philippe-martin","html_url":"https://github.com/jean-philippe-martin","followers_url":"https://api.github.com/users/jean-philippe-martin/followers","following_url":"https://api.github.com/users/jean-philippe-martin/following{/other_user}","gists_url":"https://api.github.com/users/jean-philippe-martin/gists{/gist_id}","starred_url":"https://api.github.com/users/jean-philippe-martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jean-philippe-martin/subscriptions","organizations_url":"https://api.github.com/users/jean-philippe-martin/orgs","repos_url":"https://api.github.com/users/jean-philippe-martin/repos","events_url":"https://api.github.com/users/jean-philippe-martin/events{/privacy}","received_events_url":"https://api.github.com/users/jean-philippe-martin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-16T17:48:30Z","updated_at":"2015-07-17T22:27:30Z","closed_at":null,"body":"We have a lot of code in Hellbender that's at its core a simple function, but it needs many lines of Dataflow boilerplate to wrap it into a transform.\r\n\r\nIt would be a great timesaver to create a helper function that goes from function to PTransform.\r\n\r\nWe might for example use it like this:\r\n\r\n`PTransform<A,B> myTransform = Map.<A,B>of( a -> new B(a.start+1, a.end));`\r\n\r\nreferences:\r\nlambda syntax: https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html\r\nserializable lambdas: http://stackoverflow.com/questions/22807912/how-to-serialize-a-lambda\r\n"},"comment":{"url":"https://api.github.com/repos/broadinstitute/hellbender/issues/comments/122435712","html_url":"https://github.com/broadinstitute/hellbender/issues/658#issuecomment-122435712","issue_url":"https://api.github.com/repos/broadinstitute/hellbender/issues/658","id":122435712,"user":{"login":"jean-philippe-martin","id":10458949,"avatar_url":"https://avatars.githubusercontent.com/u/10458949?v=3","gravatar_id":"","url":"https://api.github.com/users/jean-philippe-martin","html_url":"https://github.com/jean-philippe-martin","followers_url":"https://api.github.com/users/jean-philippe-martin/followers","following_url":"https://api.github.com/users/jean-philippe-martin/following{/other_user}","gists_url":"https://api.github.com/users/jean-philippe-martin/gists{/gist_id}","starred_url":"https://api.github.com/users/jean-philippe-martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jean-philippe-martin/subscriptions","organizations_url":"https://api.github.com/users/jean-philippe-martin/orgs","repos_url":"https://api.github.com/users/jean-philippe-martin/repos","events_url":"https://api.github.com/users/jean-philippe-martin/events{/privacy}","received_events_url":"https://api.github.com/users/jean-philippe-martin/received_events","type":"User","site_admin":false},"created_at":"2015-07-17T22:27:30Z","updated_at":"2015-07-17T22:27:30Z","body":"It looks like generic's type erasure is getting in the way of Dataflow's auto-determination of the coder. Let me ask around."}}