{"action":"created","issue":{"url":"https://api.github.com/repos/RGLab/flowCore/issues/32","labels_url":"https://api.github.com/repos/RGLab/flowCore/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/RGLab/flowCore/issues/32/comments","events_url":"https://api.github.com/repos/RGLab/flowCore/issues/32/events","html_url":"https://github.com/RGLab/flowCore/issues/32","id":58643493,"number":32,"title":"flowSet: read.flowSet documentation about name column, file names are taken from sampleNames of the AnnotatedDataFrame","user":{"login":"SamGG","id":3333348,"avatar_url":"https://avatars.githubusercontent.com/u/3333348?v=3","gravatar_id":"","url":"https://api.github.com/users/SamGG","html_url":"https://github.com/SamGG","followers_url":"https://api.github.com/users/SamGG/followers","following_url":"https://api.github.com/users/SamGG/following{/other_user}","gists_url":"https://api.github.com/users/SamGG/gists{/gist_id}","starred_url":"https://api.github.com/users/SamGG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamGG/subscriptions","organizations_url":"https://api.github.com/users/SamGG/orgs","repos_url":"https://api.github.com/users/SamGG/repos","events_url":"https://api.github.com/users/SamGG/events{/privacy}","received_events_url":"https://api.github.com/users/SamGG/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-23T20:31:33Z","updated_at":"2015-02-24T20:56:54Z","closed_at":null,"body":"Hi,\r\n\r\nAt the beginning I wanted to use/get short name/id in plotdensity plots. So I provided an annotatedDataFrame to read.flowSet to avoid the use of file name as identifier. The following statement in the documentation has mislead me (Rd format here).\r\n```\r\nFirst, if the argument \\code{phenoData} is present and is of class\r\n\\code{\\link[Biobase:class.AnnotatedDataFrame]{AnnotatedDataFrame}}, then the\r\nfile names are obtained from its sample names (i.e. column\r\n\\code{name}. The column is mandatory, and an error will be generated\r\nif it is not there.\r\n```\r\nApart from the missing \")\", I thought that I should provide an ADF with a column called \"name\". But it is not the right interpretation, and the word \"column\" was badly used IMO. The following code is used in read.flowSet.\r\n```\r\nfile.names <- sampleNames(phenoFrame)\r\nfiles <- file.path(path, file.names)\r\n```\r\nThis means that file names are extracted from the sampleNames of the ADF. If sampleNames is not overloaded, this turns to be the following code from Biobase package.\r\n```\r\nsetMethod(\"sampleNames\", \"AnnotatedDataFrame\",\r\n    function(object) row.names(object@data))\r\n```\r\nSo file names are extracted from row names.\r\nI feel the doc should make it clear, unless I am wrong.\r\n\r\nThen I set up an ADF with file names as row names. The read is OK, but the show() failed, because my varMetaData was not filled, ie all description are NA. I think the code of the show method should add a na.rm argument in if(any()), what avoids \"missing value where TRUE/FALSE needed\".\r\n\r\nI tried to understand the many places in the code where the $name may be used, but this brought to my own ignorance. There seems to be dependencies to the special column \"name\" of the flowset phenoData. If this is right, this should also be warned. It should be also told that a name column is filled with file names if this column does not exist. What happens when the name column is supplied by the user and does contains file names, it is too complicated to me.\r\n\r\nI didn't catch the meaning of the final code of read.flowSet, after the main lapply(). I was lost about what is the meaning/use of names(flowSet) and then of GUID and identifier. I don't understand if names are mandatory (it seems not). Hope you still have all this knowledge.Best.\r\n\r\nBest."},"comment":{"url":"https://api.github.com/repos/RGLab/flowCore/issues/comments/75844122","html_url":"https://github.com/RGLab/flowCore/issues/32#issuecomment-75844122","issue_url":"https://api.github.com/repos/RGLab/flowCore/issues/32","id":75844122,"user":{"login":"SamGG","id":3333348,"avatar_url":"https://avatars.githubusercontent.com/u/3333348?v=3","gravatar_id":"","url":"https://api.github.com/users/SamGG","html_url":"https://github.com/SamGG","followers_url":"https://api.github.com/users/SamGG/followers","following_url":"https://api.github.com/users/SamGG/following{/other_user}","gists_url":"https://api.github.com/users/SamGG/gists{/gist_id}","starred_url":"https://api.github.com/users/SamGG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamGG/subscriptions","organizations_url":"https://api.github.com/users/SamGG/orgs","repos_url":"https://api.github.com/users/SamGG/repos","events_url":"https://api.github.com/users/SamGG/events{/privacy}","received_events_url":"https://api.github.com/users/SamGG/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T20:56:54Z","updated_at":"2015-02-24T20:56:54Z","body":"* Nice job!\r\n* Concerning the doc, ```Also column \\code{name} is mandatory, and an error will be generated\r\nif it is not there.``` is not exactly true. My current ADF has no ```name``` column. The current read.flowSet creates it and fills it with the filename (ie rownames) if this column does not exists. If the column already exists, the code does not change it. I like this current behavior although it is not documented. I don't know what happens if the name column is filled with dummy things (ie how flowViz will use it).\r\n* ```names()``` seems to return nothing (neither in the example, neither in my code). Nevertheless the read.flowSet code tries to set it up.\r\n```\r\n    if(!missing(name.keyword)){\r\n        ...\r\n        names(flowSet) <- sapply(flowSet,keyword,name.keyword)\r\n    }else{\r\n        names(flowSet) <- make.unique(file.names)\r\n    }\r\n    flowSet <- as(flowSet,\"flowSet\")\r\n```\r\n* Thanks for pointing the tip. I came to the same conclusion: let the code of ```sampleNames``` do the job including sanity checks."}}