GOChord plot problem when using the chor_dat function to create a matrix
0
0
Entering edit mode
3.1 years ago

Hello All,

I am trying to create a GOChord plot for circular visualization of the results of gene- annotation enrichment analysis. I created all the data frames myself and cross-checked the types of every column in each data frame from the original GitHub page of GOPlot. Everything seems fine. However, when I am trying to run the chor_dat function, I get an error (described below). The data is big so I am unable to share it. I have been struggling to figure out the error and any help will be greatly appreciated.

The code is:

library(GOplot)
library(RColorBrewer)
library(writexl)
library(readxl)
library(ggplot2)
library(gplots)
library(forcats)
library(magrittr)
library(tidyverse)
library(forcats)
library(magrittr)
library(tidyr)
library(dplyr)

Genes_15 <- read_excel("Genes.xlsx")
str(Genes_15)
Genes_15$genes<-as.factor(Genes_15$genes)
str(Genes_15)
Genes_15$logFC <- as.double(Genes_15$logFC)
str(Genes_15)

Circ_data <- read_xlsx("circ.xlsx")
Circ_data_1 <- data.frame(Circ_data)
typeof(Circ_data_1)
str(Circ_data_1)

Process_15 <- read.csv(file = "Process_15_BP.csv")
view(Process_15)
typeof(Process_15)
Process_15_1 <- as.character(Process_15)
str(Process_15_1)

chord <- chord_dat(Circ_data_1, Genes_15, Process_15_1)

The error I am getting is:

Error in as.numeric(levels(genes[, 2]))[genes[, 2]] : invalid subscript type 'list' In addition: Warning message: In if (class(genes[, 2]) != "numeric") genes[, 2] <- as.numeric(levels(genes[, : the condition has length > 1 and only the first element will be used

R GOChord • 801 views
ADD COMMENT

Login before adding your answer.

Traffic: 1313 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6