Question: R interface to the Enrichr - Error in scan
3
gravatar for adrianstankiewicz85
2.2 years ago by
adrianstankiewicz8540 wrote:

Dear all,

Ive been using R interface to the Enrichr tool. It works well, but for some (very few) gene-list - database combinations I get errors:

Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line yyy did not have zzz elements

with yyy being for example 1 or 109 and zzz - 2 or 9. After removing offending database from query, everything goes well.

Due to random nature of the errors, I dont think my input or database itself is a problem.

Here is a function that I am using: https://github.com/AdrianS85/varia/blob/temp4/Working_with_RRBS_data.r#L109-L158 and an exemplary input file: https://github.com/AdrianS85/varia/blob/master/i_vs_rest_overview_placenta_enrich_gene_list.txt

Does anyone have any ideas?

Best, Adrian

enrichment enrichr • 972 views
ADD COMMENTlink modified 2.2 years ago • written 2.2 years ago by adrianstankiewicz8540

This error of scan means that you are scanning a "data.frame" like object, but the offending lines have not the right number of elements (or columns). It happens usually when some of the values in some rows are missing (or less frequently if some rows contain more values than the header)

Could you post just the relevant part of the code, with a minimal input data to reproduce the error?

ADD REPLYlink written 2.2 years ago by Santosh Anand5.2k
1
gravatar for adrianstankiewicz85
2.2 years ago by
adrianstankiewicz8540 wrote:

After some testing I found out that the error is generated when input gene list is very large (e.g. ~13 000 gene ids provided in this input data: https://github.com/AdrianS85/varia/blob/master/enrichr_R_interface_example_input)

This code reproduces the problem:

install.packages("enrichR")

x <- read.table(### https://github.com/AdrianS85/varia/blob/master/enrichr_R_interface_example_input ###, stringsAsFactors = F)

enrichR::enrichr(x$V1, "GO_Molecular_Function_2018")
ADD COMMENTlink written 2.2 years ago by adrianstankiewicz8540
1

May be it's a bug. Download the latest version from Github, and if still a problem, report an issue at their Github page

https://github.com/wjawaid/enrichR/issues/7 https://github.com/wjawaid/enrichR/issues/1

ADD REPLYlink written 2.2 years ago by Santosh Anand5.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2400 users visited in the last hour
_