Giter VIP home page Giter VIP logo

linket's People

Contributors

hy4m avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

linket's Issues

Caused by error in `spec_dist()`: ! could not find function "spec_dist"

Hi,

Thank you for this great package!

I use your code example (linkET v.0.07.1) below:

mantel_test(varespec, varechem,
spec_select = list(spec01 = 1:5, spec02 = 6:12))
'mantel_test()' using 'bray' dist method for 'spec'.
'mantel_test()' using 'euclidean' dist method for 'env'.

which applies bray to spec.

However, on my 16S amplicon dataset, I would like to manually specify the distance for spec and chem becaue by default it always applies euclidean distances to my species data but I want to use Bray-Curtis.

In the help manual to mantel_test(), I found that you can specify spec_dist = and env_dist =, however, the function dist_func() does not seem to offer the usually applied distances found in e.g. vegan::vegdist(method = "bray").

Could you please provide an example of how to specify e.g. Bray-Curtis using dist_func().
Also when looking up the help page for dist_func() one gets redirected to gdist(), without a clear explanation of how they relate and are supposed to be implemented in the mantel_test().

Thank you for helping and for sharing your expertise!

聚类时报错

library(linkET)
as_matrix_data(mtcars, cluster = "all")
#> Error in attr(x, i) <- attrs[[i]]: cannot set attribute on a symbol

Created on 2021-09-26 by the reprex package (v2.0.0)

关于geom_square函数设定数据范围的问题

您好,我在绘制mantel test相关性热图的时候没有展示对角线上的相关性数据,但是这让我的相关性热图的方块都很小。我的相关性热图的相关性系数范围时-0.2到0.2(排除了对角线上的相关系数),现在我想将geom_square的范围调到-0.2到0.2之间,我应该怎么做呢?

namespace ‘vctrs’ 0.5.1 is already loaded, but >= 0.5.2 is required

Hi Houyun,

When I try to load the linkET package --- library(linkET) today, error shown as below.
Error
namespace ‘vctrs’ 0.5.1 is already loaded, but >= 0.5.2 is required

I tried to reinstall the linkET package and the vctrs package, but failed.
install.packages("devtools")
devtools::install_github("Hy4m/linkET", force = TRUE)
install.packages("vctrs")

What can I do for this problem?

Best,

Bing

Multiple results for CFLAGS found, something is wrong.FALSE

从Github安装失败:错误: Failed to install 'linkET' from GitHub:
Multiple results for CFLAGS found, something is wrong.FALSE
以下是我的版本信息:
_
platform aarch64-apple-darwin20
arch aarch64
os darwin20
system aarch64, darwin20
status
major 4
minor 2.3
year 2023
month 03
day 15
svn rev 83980
language R
version.string R version 4.2.3 (2023-03-15)
nickname Shortstop Beagle

我从您的GitHub库也没找到tar.gz源文件,请问您这怎么解决?

当设置extra_mat参数时报错

library(linkET)
correlate(mtcars) %>% 
  qcorrplot(extra_mat = list(extra = matrix(1, nrow = 11, ncol = 11))) +
  geom_square()
#> Error in as_md_tbl(data, ...): 参数没有用(extra_mat = list(c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)))

Created on 2021-09-23 by the reprex package (v2.0.0)

Feature requirement for showing the positive or negative correlation in the plot

Hi Houyun,

Could you add one feature requirement to show the negative correlation using the dotted curves and the positive correlation using the solid curves? Then it will be easier for people to directly see the negative or positive correlation between two matrixes.

For now, all my correlated curves are solid.
image

Best,

Bing

How to deal with the dataframe with NA?

Hi Houyun,

I want to see the correlation between two dataframe using linkET, but one dataframe has missing values - NA.

Should I move out the rows with NA? Or replace the NA using 0?
What I am doing now is to replace the NA with 0, but not sure if it is right.

Could you give me some suggestions?

Best,

Bing

Data volume

Hello, I would like to inquire if the linkET package can run a data volume of over 20000 lines?

Need a cor_tbl.

When i use the example for qcorrplot
correlate(mtcars) %>% as_md_tbl() %>% qcorrplot()
it's return :
Error: Need a cor_tbl.

rand_forest() error

library(linkET)
data("varespec", package = "vegan")
data("varechem", package = "vegan")
random_forest(varespec[1:3], varechem[1:3])
#> Error:  'rp.importance' is not an exported object from 'namespace:rfPermute'

Created on 2021-10-11 by the reprex package (v2.0.1)

issue in using different distance matrix for mantel test ()

I want give bray curtis distance in spec_dist and euclidean distance in env_dist but unfortunately I unable to give and it automatically taking euclidean distance for both the data. How to set different distance matrix for both the data in matel_test() function.

Unsure about the mantel test result

Hi Houyun,

I carefully looked into the changing trend of my two matrixes, and not sure my command lines were right. So, could you please help me have a check? I attached my data and code.

data_and_code.zip

Thank you very much.

Best,

Bing

How can I use the subscription or superscription in LinkET

as the title, and i had tried several ways to achieve this.

  • scale_x_discrete: not in avail. And there are glaring wrong with the square.
  • ggtext::markdown: not in avail.
  • linkET::element_formula: with parse=T, there is nothing change with the orgin label, that is, remain displaying CO[2] on the figure.
  • linkET::latex_formula: not in avail. this function change CO[2] to CO *'['*, 2, *']'* and then just straightfoward display in the figure.

here's the figure with problem, and code attach it. Figure is the result when try the function ggtext::element_markdown and scale_x_discrete as description above.
github issues

qcorrplot(correlate(na.omit(eda.lon[,3:9])), type = "lower", diag = F)+
  geom_square() +
  # geom_tile()+
  scale_x_discrete(labels = eda.abbr)+
  scale_y_discrete(labels = eda.abbr)
  geom_couple(aes(colour = pd, size = rd), 
              data = mantel.mod, 
              curvature = nice_curvature()) +
  # geom_mark(r = NA,size = 3,only_mark = T)+
  scale_fill_gradientn(colours = RColorBrewer::brewer.pal(11, "RdBu"),breaks = seq(1, -1, -0.4),limits = c(-1,1)) +
  scale_size_manual(values = c(0.5, 1, 2)) +
  scale_colour_manual(values = color_pal(3)) +
  guides(size = guide_legend(title = "Mantel's r",
                             override.aes = list(colour = "grey35"), 
                             order = 2),
         colour = guide_legend(title = "Mantel's p", 
                               override.aes = list(size = 3), 
                               order = 1),
         fill = guide_colorbar(title = "Pearson's r", order = 3))+
  theme(
    axis.text = element_markdown(color = "black",size = 10))

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.