{"action":"created","issue":{"url":"https://api.github.com/repos/HenrikBengtsson/affxparser/issues/17","labels_url":"https://api.github.com/repos/HenrikBengtsson/affxparser/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/HenrikBengtsson/affxparser/issues/17/comments","events_url":"https://api.github.com/repos/HenrikBengtsson/affxparser/issues/17/events","html_url":"https://github.com/HenrikBengtsson/affxparser/issues/17","id":106424514,"number":17,"title":"convertCel(..., newChipType) does not update 'datheader'","user":{"login":"HenrikBengtsson","id":1616850,"avatar_url":"https://avatars.githubusercontent.com/u/1616850?v=3","gravatar_id":"","url":"https://api.github.com/users/HenrikBengtsson","html_url":"https://github.com/HenrikBengtsson","followers_url":"https://api.github.com/users/HenrikBengtsson/followers","following_url":"https://api.github.com/users/HenrikBengtsson/following{/other_user}","gists_url":"https://api.github.com/users/HenrikBengtsson/gists{/gist_id}","starred_url":"https://api.github.com/users/HenrikBengtsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HenrikBengtsson/subscriptions","organizations_url":"https://api.github.com/users/HenrikBengtsson/orgs","repos_url":"https://api.github.com/users/HenrikBengtsson/repos","events_url":"https://api.github.com/users/HenrikBengtsson/events{/privacy}","received_events_url":"https://api.github.com/users/HenrikBengtsson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/HenrikBengtsson/affxparser/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-14T20:47:13Z","updated_at":"2015-09-14T21:19:39Z","closed_at":null,"body":"`convertCel(..., newChipType)` updated 'chiptype' and 'header' fields in the CEL header, but not the  `datheader` field.  For example, a CEL header may look like:\r\n```r\r\nBrowse[2]> str(hdr)\r\nList of 14\r\n $ filename      : chr \"C:/Users/hb/R/win-library/3.3/AffymetrixDataTestFiles/ra\r\nwData/FusionSDK_Test3/Test3/2.Calvin/Test3-1-121502.CEL\"\r\n $ version       : int 1\r\n $ cols          : int 126\r\n $ rows          : int 126\r\n $ total         : int 15876\r\n $ algorithm     : chr \"Percentile\"\r\n $ parameters    : chr \"Percentile:75;CellMargin:2;OutlierHigh:1.500;OutlierLow:\r\n1.004;GridULX:154.000000;GridULY:164.000000;GridURX:995.000000;GridURY:\"| __trun\r\ncated__\r\n $ chiptype      : chr \"Test3\"\r\n $ header        : chr \"\"\r\n $ datheader     : chr \"[12..40151]  Fetal 3:CLS=1167 RWS=1167 XIN=3  YIN=3  VE=\r\n17        2.0 08/16/01 17:28:31    \\024  \\024 Test3.1sq \\024  \\024  \\02\"| __trun\r\ncated__\r\n $ librarypackage: chr \"\"\r\n $ cellmargin    : int 2\r\n $ noutliers     : int 5\r\n $ nmasked       : int 0\r\n```\r\nNote how the chip type is encoded also in the `datheader` fields.  In other words, depending on CEL file/header, the output may or may not get the new chip type set."},"comment":{"url":"https://api.github.com/repos/HenrikBengtsson/affxparser/issues/comments/140208897","html_url":"https://github.com/HenrikBengtsson/affxparser/issues/17#issuecomment-140208897","issue_url":"https://api.github.com/repos/HenrikBengtsson/affxparser/issues/17","id":140208897,"user":{"login":"HenrikBengtsson","id":1616850,"avatar_url":"https://avatars.githubusercontent.com/u/1616850?v=3","gravatar_id":"","url":"https://api.github.com/users/HenrikBengtsson","html_url":"https://github.com/HenrikBengtsson","followers_url":"https://api.github.com/users/HenrikBengtsson/followers","following_url":"https://api.github.com/users/HenrikBengtsson/following{/other_user}","gists_url":"https://api.github.com/users/HenrikBengtsson/gists{/gist_id}","starred_url":"https://api.github.com/users/HenrikBengtsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HenrikBengtsson/subscriptions","organizations_url":"https://api.github.com/users/HenrikBengtsson/orgs","repos_url":"https://api.github.com/users/HenrikBengtsson/repos","events_url":"https://api.github.com/users/HenrikBengtsson/events{/privacy}","received_events_url":"https://api.github.com/users/HenrikBengtsson/received_events","type":"User","site_admin":false},"created_at":"2015-09-14T21:19:39Z","updated_at":"2015-09-14T21:19:39Z","body":"It looks like [`.getCelHeaderV4()`](https://github.com/HenrikBengtsson/affxparser/blob/master/R/traverseCcg.R#L122-L147) is the bad guy.  For Calvin/v1 CEL files, `.getCelHeaderV4(header)` will re-read the CEL header, use it to override the header already set."}}