R Text progress bar error
3
0
Entering edit mode
devyani66 • 0
@devyani66-9451
Last seen 5.1 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 • 4.2k views
ADD COMMENT
1
Entering edit mode
@paultheodorpyl-9453
Last seen 8.3 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.

Cheers,

Paul

 

ADD COMMENT
0
Entering edit mode
devyani66 • 0
@devyani66-9451
Last seen 5.1 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.

Command-

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

 

ADD COMMENT

Login before adding your answer.

Traffic: 946 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