Giter Club home page Giter Club logo

Comments (11)

yanlinlin82 avatar yanlinlin82 commented on June 1, 2024

That depends on how to explain the field which contains the 0/NA values. A preprocessing step of filtering out 0/NA values before plotting by ggvenn would help if required.

By the way, could you provide an example to make the issue clearer?

from ggvenn.

amy-houseman avatar amy-houseman commented on June 1, 2024

Hello,

I am having the same problem - I have three columns but two are shorter than the other so end up having blank cells at the end of their last values - therefore these are appearing as common values between the two groups. I have tried to delete these cells prior to uploading to R but this hasn't worked.

I am not sure how to make an example for you but it was uploaded as a csv - sorry if that isn't enough info!
Thanks,
Amy

from ggvenn.

yanlinlin82 avatar yanlinlin82 commented on June 1, 2024

Hi, @amy-houseman

If you have loaded the csv into R as variable 'a', you can try dput(a) to get the construction command. If the file is too big, I suggest you simplify it first. We just need a minimal case to show the problem.

from ggvenn.

amy-houseman avatar amy-houseman commented on June 1, 2024

Hi,

Thanks for you reply! I managed to fix my problem with

df[df == ''] <- NA
df <- na.omit(df)

Before turning it into a list for ggvenn! Thank you :))

from ggvenn.

yanlinlin82 avatar yanlinlin82 commented on June 1, 2024

Thank you very much for the useful sharing. I think I can close this issue now.

from ggvenn.

amy-houseman avatar amy-houseman commented on June 1, 2024

Hello,

Sorry, me again! I was able to use df[df == ''] <- NA to add na to the blanks but actually df <- na.omit(df) was removing the entire row from being used in the Venn diagram.

csv file uploaded = TEST_overlapping_GOF_LOF_2_plus_denovo

Code:

a <- TEST_overlapping_GOF_LOF_2_plus_denovo
a[a == ''] <- NA
a <- na.omit(a)

library(ggvenn)
a <- list('LOF_2_or_more_list'= a$LOF_2_or_more_list,
          'GOF_2_or_more_list' = a$GOF_2_or_more_list,
          'De_novo' = a$De_novo)

ggvenn(a, c("LOF_2_or_more_list", "GOF_2_or_more_list", "De_novo"),  fill_color = c("pink", "lightblue3", "mediumseagreen"))

I tired to dput(a) but I think it misses out the end of the file which is where the problems occur - I have made a small version of the file attached
TEST_overlapping_GOF_LOF_2_plus_denovo.csv

To produce the venn:

a <- TEST_overlapping_GOF_LOF_2_plus_denovo

library(ggvenn)
a <- list('LOF_2_or_more_list'= a$LOF_2_or_more_list,
          'GOF_2_or_more_list' = a$GOF_2_or_more_list,
          'De_novo' = a$De_novo)
ggvenn(a, c("LOF_2_or_more_list", "GOF_2_or_more_list", "De_novo"),  fill_color = c("pink", "lightblue3", "mediumseagreen"))

As you can see from this example, there should be:
LOF_2_or_more_list Vs De_novo = 3 overlaps (A,B,C).
LOF_2_or_more_list should have 2 of its own values (D,E).
and GOF_2_or_more_list should not overlap with anything but have 1 of its own values (H).

But as you can see:
LOF_2_or_more_list Vs De_novo = 3
LOF_2_or_more_list = 2 own values
GOF_2_or_more_list = 1 of its own
GOF_2_or_more_list Vs De_novo = 1

Image 31-03-2023 at 00 26

This GOF_2_or_more_list Vs De_novo = 1 is caused by the GOF_2_or_more_list and De_novo list both having blank cells which are being detected as shared values.

Do you know what can stop these blanks being detected as values?

Thanks!
Amy

from ggvenn.

yanlinlin82 avatar yanlinlin82 commented on June 1, 2024

Yes, you're right. NA should not be counted in such cases. That is indeed a bug. I will fix it soon.

from ggvenn.

yanlinlin82 avatar yanlinlin82 commented on June 1, 2024

Hi, @amy-houseman

I have fixed this issue in this commit, and published a new release (v0.1.10), as well as on CRAN.

You may upgrade to the new version by either

devtools::install_github("yanlinlin82/ggvenn")

or

install.package("ggvenn")

from ggvenn.

amy-houseman avatar amy-houseman commented on June 1, 2024

Hi, I have installed the new version but I'm still not sure its working - could I send you my file via email for you to test? Thanks! Sorry to be a pain! Amy

from ggvenn.

yanlinlin82 avatar yanlinlin82 commented on June 1, 2024

Hi, I have installed the new version but I'm still not sure its working - could I send you my file via email for you to test? Thanks! Sorry to be a pain! Amy

ok

from ggvenn.

ricmedveterinario avatar ricmedveterinario commented on June 1, 2024

Hello @yanlinlin82 ,

Thank you for updating the package,

I will test again soon,

Sorry, but I believe I missed the updates for this discussion,

Best Regards,

from ggvenn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.