Hey guys, first time posting because I got really really stumped last night for the first time in R. Hope this is the right forum for a question relating to code. If not, by all means remove. Thanks.
I have this data frame that is 3 columns x 36000 rows. Early in the code I transposed the data frame so the frame I am trying to use when this hiccup occurs somehow becomes 36000c x 2r.
BOP1_flg22_vs_WT_flg22_rnaseq_pre <- read.csv("TEST_DATA_COMPARE.csv")
BOP1_flg22_vs_WT_flg22_rnaseq_pre[1:4, 1:3]
ï..gene WT.flg22.__pd__2..BAM. bop1.6D.flg22.__pd__2..BAM.
1 AT1G01010 1383 1260
2 AT1G01020 742 598
3 AT1G03987 1 5
4 AT1G01030 229 183
BOP1_flg22_vs_WT_flg22_gene_symbols <- BOP1_flg22_vs_WT_flg22_rnaseq_pre$ï..gene
BOP1_flg22_vs_WT_flg22_rnaseq <- t(BOP1_flg22_vs_WT_flg22_rnaseq_pre[, -1])
colnames(BOP1_flg22_vs_WT_flg22_rnaseq) <- BOP1_flg22_vs_WT_flg22_gene_symbols
BOP1_flg22_vs_WT_flg22_rnaseq <- data.frame(BOP1_flg22_vs_WT_flg22_rnaseq)
BOP1_flg22_vs_WT_flg22_rnaseq[1:2, 1:10]
AT1G01010 AT1G01020 AT1G03987 AT1G01030 AT1G01040 AT1G03993 AT1G01046
WT.flg22.__pd__2..BAM. 1383 742 1 229 2023 0 17
bop1.6D.flg22.__pd__2..BAM. 1260 598 5 183 1360 0 1
AT1G01050 AT1G03997 AT1G01060
WT.flg22.__pd__2..BAM. 3865 0 1818
bop1.6D.flg22.__pd__2..BAM. 3289 0 2333
BOP1_flg22_vs_WT_flg22_rnaseq_samples <-rownames(BOP1_flg22_vs_WT_flg22_rnaseq)
BOP1_flg22_vs_WT_flg22_rnaseq_group <- data.frame("group" = c("WT_flg22", "BOP1_flg22"))
row.names(BOP1_flg22_vs_WT_flg22_rnaseq_group) <- BOP1_flg22_vs_WT_flg22_rnaseq_samples
set.seed(1)
BOP1_flg22_vs_WT_flg22_rnaseq_results <- dnapath("BOP1_flg22_vs_WT_flg22_rnaseq", pathway_list = NULL, groups = BOP1_flg22_vs_WT_flg22_rnaseq_group, network_inference = run_pcor, seed = 1)
Error in dnapath("BOP1_flg22_vs_WT_flg22_rnaseq", pathway_list = NULL, :
length(groups) = 2, but nrow(x) = 1. These must be equal.
Does transposing the data somehow turn 3 columns (gene name and 2 values) into 2 rows?
Anyone know what is going on and how to fix??