R Text progress bar error
Entering edit mode
devyani66 • 0
Last seen 2.9 years ago

I was trying to execute TCGAbiolink package in R. I am facing a error while preparing the file after download... i.e during TCGAprepare function.
Command is-  Dev.met <- TCGAprepare(query = query, dir = "D:/TCGA_DATA/TCGAbiolink/", save = TRUE, filename = "MetDev.rda", reannotate = TRUE)

The error is - Error in txtProgressBar(min = 0, max = length(files), style = 3) :   must have 'max' > 'min'

Can anyone please let me know what I might have done wrong.


Thank you.


TCGA • 2.9k views
Entering edit mode
Last seen 6.0 years ago

The error points out that max has to be larger than min and it would seem that the command length(files) is the likely culprit. My guess would be that somehow your list of files is empty, making length(files) equal zero.

When you check the source code of the function you are calling (e.g. on github here: https://github.com/Bioconductor-mirror/TCGAbiolinks/blob/master/R/TCGAPrepare.R#L99-L127) you can see that it uses all files (expect some specific ones like README etc.) from the directory you specified. Are the files there? Did you provide the path correctly?

Probably the files are either not where you point the function ("D:/TCGA_DATA/TCGAbiolink/"), or you are missing some extra slashes or backslashes in the directory name. I am not a Windows user so I am unsure about how it would have to look, but you should maybe look at ?normalizePath and run the example to see how paths should be formatted on your system.




Entering edit mode
devyani66 • 0
Last seen 2.9 years ago

Thank you for your reply. Yes indeed it was a path problem and it was solved. But now I am getting another error :(

The error is -  

0%Error in fread(files[i], header = TRUE, sep = "\t", stringsAsFactors = FALSE,  :
  colClasses is unnamed and length 5 but there are 4 columns. See ?data.table for colClasses usage.

You can see the snapshot of the command. I am new to using R too. Any help will be greatly appreciated. Thank you.


sarc.met <- TCGAprepare(query = sarc.query,
  dir = "D:/TCGA_data/TCGAbiolinks/",
  save = TRUE,
  filename = "metasarc.rda",
  reannotate = TRUE)



Login before adding your answer.

Traffic: 459 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6