0

I'm very new to R and I was told to download data from TCGA repository using TCGA assembler2 in R from this github link (https://github.com/compgenome365/TCGA-Assembler-2). and after following the tutorial I managed to get the original code which is downloading MiRNA data working, then i tried to download LungMethylation data then it also originally worked, but class time is up and i haven't finished the download so I just decides to terminate and continue at home

At night I left it to download overnight, but at morning it doesn't seems to make any progress (I thought maybe because the laptop accidentally went to sleep, it disturb the download process). so I terminate the process and re run it only to get this error:

 Error in fromJSON(jsn) : 
  not all data was parsed (0 chars were parsed out of a total of 186 chars)  

and the same error pops out for every data i tried to download, including the original MiRNA code from the tutorial which worked before, here is the full code:

#setting up directory
setwd('D:/Rdata/TCGA-Assembler')
getwd()
dir('D:/Rdata/TCGA-Assembler')

#installing neccesarry packages
install.packages('httr')
install.packages('HGNChelper')
install.packages('RCurl')
install.packages('rjson')
install.packages('stringr')

#executing module A and module B which will also import the packages
source("./Module_A.R")
source("./Module_B.R")

#downloading breast cancer miRNA data
miRNAExp1 <- DownloadmiRNASeqData(cancerType = "BRCA2", assayPlatform ="mir_HiSeq.hg19.mirbase20", saveFolderName = "DownloadmiRNASeqData")

#downloading skin cancer miRNA data
miRNAExp2 <- DownloadmiRNASeqData(cancerType = "SKCM",saveFolderName = "DownloadmiRNASkinCancer")

#topic: DNAmethylation biomarker for metastatic lung cancer 
#downloading Lung adenocarcinoma
MethylLung1 <- DownloadMethylationData(cancerType = "LUAD", assayPlatform ="methylation_450",
                                       saveFolderName = "Lung adenocarcinoma2")
#Downloading Lung squamous cell carcinoma
MethylLung2<- DownloadMethylationData(cancerType = "LUSC", assayPlatform ="methylation_450",
                                      saveFolderName = "Lung squamous cell carcinoma")

I have tried to reinstall R, re-download the TCGA assembler, and move the directory to a new one. I have some experience with coding but i'm not as proficient to be able to pinpoint if the fault lies in the package or something I did. If anyone know what I can do to fix it, it would be greatly appreciated.

Phil
  • 7,287
  • 3
  • 36
  • 66
  • It is difficult to help without access to the source of `Module_A` and `Module_B` (i.e. without a [reproducible example](https://stackoverflow.com/questions/5963269)). The `DownloadmiRNASeqData` etc. functions seem to be defined in those modules. Have a look at the source code for those, and see if they write the downloaded data to disk (rather than to memory) prior to attempting JSON deserialization. In any case, do DL the data to disk, then open it in a text editor to understand its structure and how deserialization went wrong. – Aurèle Mar 23 '23 at 09:34
  • @Aurèle you are correct, the DownloadmiRNASeqData along with all other download functions is defined in the module, specifically Module_A. If I can be honest all of these things are really over my head. Would it be okay for you if I provide a google drive link to those modules or paste the module thing in the post? You can tell me which one you prefer. – Ferdinand Fisranda Mar 23 '23 at 17:35

0 Answers0