The dataframe v8 is created from a progenesis analysis and read into R as a .csv file. Then
v8$HGNC_Symbol = trimws(v8$HGNC_Symbol)
v8<- v8[1:5,3:8]
str(v8)
# 'data.frame': 5 obs. of 6 variables:
# $ v5.max_fold_change : num 2.15 2.33 5.03 1.75 2.37
# $ v5.highest_mean_condition: Factor w/ 5 levels "","---","0% Suspension",..: 3 3 4 3 3
# $ v5.lowest_mean_condition : Factor w/ 5 levels "","---","0% Suspension",..: 4 4 3 4 4
# $ gene : chr "gene" "gene" "gene" "gene" ...
# $ HGNC_Symbol : chr "COA3" "LPL" "RDX" "IDH1" ...
# $ Refseq : chr "XP_007618708" "XP_007607328" "XP_007616235" "XP_007638219" ...
dput(v8)
# structure(list(v5.max_fold_change = c(2.14, 2.33, 5.02, 1.74, 2.36),
# v5.highest_mean_condition = structure(c(3L, 3L, 4L, 3L, 3L),
.Label = c("", #"---", "0% Suspension","5% Suspension","Highest mean condition"), class = #"factor"),
# v5.lowest_mean_condition = structure(c(4L, 4L, 3L, 4L, 4L),
.Label = c("", #"---", "0% Suspension", "5% Suspension", "Lowest mean condition"), class = #"factor"),
# gene = c("gene", "gene", "gene", "gene", "gene"),
# HGNC_Symbol = c("COA3", "LPL", "RDX", "IDH1", "HSPG2"),
# Refseq = c("XP_007618708", "XP_007607328", "XP_007616235", "XP_007638219", #"XP_007617255")),
# row.names = c(NA, 5L), class = "data.frame")
library("biomaRt")
mart_1<-useMart (biomart="ensembl", dataset="cgcrigri_gene_ensembl")
go <- getBM(attributes=c("go_id", "external_gene_name", "namespace_1003"),
filters = 'external_gene_name',
values = v8$HGNC_Symbol,
bmHeader = T,
mart=mart_1)
Results in:
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
line 1 did not have 3 elements"
All my research indicates that there's an issue in the first line of the v8 file but I've checked and there's no missing entry or special characters in that line. Indeed there's no missing entry anywhere in the v8 file.
I even tried creating a new v8 file with just 3 columns and got the same error.
Any advice/suggestions would be great.
@ MikeSmith, Thanks for that help. I also found this post getBM error while using bioMart which gave some more background to the BiomaRt issues and suggested installing the latest version of BiomaRt. I did this and am happy to report the issue is fixed.
I just started to get the exact same error with
getLDS
of Biomart with R version 4.0.3 (Updated today) and the latest Bioconductor version 3.11. Googled it and arrived at this post of yours. Apparently, the server issue still seems to be present. I am trying the development version right now. Hopefully, it fixes the error.You've posted in two threads with different reports, but not included the code you're running or exactly which error you're encountering.
Is it:
or
It was
It was fixed after I restarted R session. Thank you for following up.