-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
names() does not include the description #273
Comments
parameter descriptions is referring to "desc" column, which is marker/protein name |
Hi Mike. |
names() aims to combine the name and description columns as it is stated in its heading comment and in the doc. It is even clearly described in the vignette that never changed. In its code, names() combines the results of colnames() and featureNames(). colnames() always reported the same values, ie the name column. featureNames() reports values from the name column since Bioc 2.2, but not before. In Bioc 2.1, names() reports the desc column. Currently, colnames() and featureNames() are said synonyms in the doc, which they are. Functions that perform the same thing should sound suspect IMHO and are misleading package users. names() changes in Bioc 2.2 (2007-2008), and I don't know why Nolwenn did it. The current doc and vignette are still misleading in some parts since and did mislead me a few times. names() does not fill the original goal which is to get a string combining name ($PnN) and description ($PnS, if present). As names() currently combines the same information twice, which sounds useless IMO, could we revert to something more useful and centralized in flowCore? I mean, either changing featureNames() to report desc column, or changing names() to really combine name and desc column. I think the latter is safer. It implies changing line 41 in names-methods.R IIRC. If none of these changes are OK, please, update the documentation. Thanks guys for reading. Lines 31 to 50 in 152b8e4
flowCore/R/flowFrame-accessors.R Lines 556 to 564 in 152b8e4
Lines 278 to 280 in 152b8e4
Lines 294 to 295 in 152b8e4
flowCore/vignettes/HowTo-flowCore.Rnw Lines 180 to 188 in 152b8e4
https://code.bioconductor.org/browse/flowCore/blob/RELEASE_2_1/R/flowFrame-accessors.R#L90 https://code.bioconductor.org/browse/flowCore/blob/RELEASE_2_2/R/flowFrame-accessors.R#L283 |
Hi Samuel, while you might be right in principle, I would be worried that
there are potentially thousands of people/scripts out in the wild that
depend on the current functionality, and that we might break things for
them. I'd therefore rather only make backwards compatible changes (e.g.
addition of methods as opposed to changing the semantic of the current
methods).
That's my 2c.
Best,
Josef
…On Fri, Jan 24, 2025, 4:34 AM Samuel Granjeaud ***@***.***> wrote:
names() aims to combine the name and description columns as it is stated
in its heading comment and in the doc. It is even clearly described in the
vignette that never changed. In its code, names() combines the results of
colnames() and featureNames().
colnames() always reported the same values, ie the name column.
featureNames() reports values from the name column since Bioc 2.2, but not
before. In Bioc 2.1, names() reports the desc column. Currently, colnames()
and featureNames() are said synonyms in the doc, which they are. Functions
that perform the same thing should sound suspect IMHO and are misleading
package users.
names() changes in Bioc 2.2 (2007-2008), and I don't know why Nolwenn did
it. The current doc and vignette are still misleading in some parts since
and did mislead me a few times.
names() does not fill the original goal which is to get a string combining
name ($PnN) and description ($PnS, if present).
As names() currently combines the same information twice, which sounds
useless IMO, could we revert to something more useful and centralized in
flowCore?
I mean, either changing featureNames() to report desc column, or changing
names() to really combine name and desc column. I think the latter is
safer. It implies changing line 41 in names-methods.R IIRC.
If none of these changes are OK, please, update the documentation.
Thanks guys for reading.
@mikejiang <https://github.com/mikejiang> @gfinak
<https://github.com/gfinak> @jspidlen <https://github.com/jspidlen>
@DillonHammill <https://github.com/DillonHammill>
https://github.com/RGLab/flowCore/blob/152b8e4903039aceb32e7393a98ee2dc69f89759/R/names-methods.R#L31-L50
https://github.com/RGLab/flowCore/blob/152b8e4903039aceb32e7393a98ee2dc69f89759/R/flowFrame-accessors.R#L556-L564
https://github.com/RGLab/flowCore/blob/152b8e4903039aceb32e7393a98ee2dc69f89759/R/AllClasses.R#L278-L280
https://github.com/RGLab/flowCore/blob/152b8e4903039aceb32e7393a98ee2dc69f89759/R/AllClasses.R#L294-L295
https://github.com/RGLab/flowCore/blob/152b8e4903039aceb32e7393a98ee2dc69f89759/vignettes/HowTo-flowCore.Rnw#L180-L188
https://code.bioconductor.org/browse/flowCore/blob/RELEASE_2_1/R/flowFrame-accessors.R#L90
https://code.bioconductor.org/browse/flowCore/blob/RELEASE_2_2/R/flowFrame-accessors.R#L283
—
Reply to this email directly, view it on GitHub
<#273 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADJJWWY3WWWMY3U2AF4HLT2MIXMJAVCNFSM6AAAAABVPXMJT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJSGQZDQMJQGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi Josef, I agree with this principle in general. Changing featuresNames() back to its orign, my first proposal, is probably problematic as developer could hesitate between featureName() and colnames(). As they both return the same information we could imagine that developers used both.
|
OK, thank you. I'll leave it up to the maintainers as I haven't touched the
flowCore code in many years.
Thank you for bringing this up Samuel.
Best, Josef
…On Fri, Jan 24, 2025 at 8:24 AM Samuel Granjeaud ***@***.***> wrote:
Hi Josef, I agree with this principle in general. Changing featuresNames()
back to its orign, my first proposal, is probably problematic as developer
could hesitate between featureName() and colnames(). As they both return
the same information we could imagine that developers used both.
Changing names() to match its definition would not break any code in my
view. The current result is a string (and will stay a string) and this
string is nearly useless as it repeats the same information. So I don't
think any developer is using it and relies on it. I saw names() called in
flowViz. In those calls, the change brings back sense to the label of the x
and y axes of the plot.
In the end, it would take less work changing L41 than changing the doc and
vignette, what should be done as they are not in agreement with the code.
This is what I did, and I think dropping a single line in the NEWS would be
sufficient.
> names(GvHD[[1]])
[1] "<FSC-H> FSC-Height" "<SSC-H> SSC-Height" "<FL1-H> CD15 FITC" "<FL2-H> CD45 PE"
[5] "<FL3-H> CD14 PerCP" "<FL2-A>" "<FL4-H> CD33 APC" "<Time> Time (51.20 sec.)
—
Reply to this email directly, view it on GitHub
<#273 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADJJWVLDXQGBUAWCXO5RID2MJSMPAVCNFSM6AAAAABVPXMJT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJSHEYTQNZWGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi guys,
I noticed that the documentation of the
names()
function/method does not match its result as the description is not included.Best,
Samuel
Created on 2025-01-20 with reprex v2.1.1
The text was updated successfully, but these errors were encountered: