davidaknowles / leafcutter

Annotation-free quantification of RNA splicing. Yang I. Li, David A. Knowles, Jack Humphrey, Alvaro N. Barbeira, Scott P. Dickinson, Hae Kyung Im, Jonathan K. Pritchard
http://davidaknowles.github.io/leafcutter/
Apache License 2.0
202 stars 113 forks source link

RData file prepared using prepare_results.R is corrupted and can't be read with leafviz() #196

Open gtollefson opened 3 years ago

gtollefson commented 3 years ago

Hi @goldenflaw,

I've prepared an RData file from my differential splicing analysis run using data aligned to the hg38 reference genome from the UCSC hg38 reference genome download page using HISAT2 and have tried to load it using leafviz(). However I receive an error telling me that the RData file is corrupted. Can you help me to trouble shoot? I've pasted my commands and output below. I get the same error when running load() on the RData file, suggesting that the issue isn't with the Shiny app but with the RData output from the prepare_results.R script within leafcutter.

library(leafviz)
leafviz("/Users/George/TPP1_splicing_project/leafcutter/leafcutter_results/SA42.RData")

Welcome to Leafviz! Loading data... Error in load(infile, envir = .GlobalEnv) : bad restore file magic number (file may be corrupted) -- no data loaded In addition: Warning message: file ‘SA23.RData’ has magic number 'RDX3' Use of save versions prior to 2 is deprecated

Thank you very much for your help, George

gtollefson commented 3 years ago

I've noticed that in another issue post #159 , @jackhump mentioned that the annotation files need to have a certain set of expected columns. I see that among the annotation files I created with gtf2leafcutter.pl, the fiveprime.bed.gz file has an additional two columns beyond the seven expected by the prepare_results.R script. Could this cause an error while running prepare_results.R and result in a corrupted RData file? The output of prepare_results.R does not report an error but does have a warning. I've pasted the entire output of prepare_results.R below:

Preparing for visualisation Results to be saved in: SA23.RData Using annotation at: /gpfs/data/dgamsiz/Uzun_Lab/gtollefs/tpp1_splicing_project/data/annotation_codes_hg38/hg38_refgene Loading counts from /gpfs/data/dgamsiz/Uzun_Lab/gtollefs/tpp1_splicing_project/data/comparison_SA23_vs_H9/SA23_perind_numers.counts.gz Loading metadata from /gpfs/data/dgamsiz/Uzun_Lab/gtollefs/tpp1_splicing_project/data/comparison_SA23_vs_H9/group_file_H9_vs_SA23.txt Loading exons from /gpfs/data/dgamsiz/Uzun_Lab/gtollefs/tpp1_splicing_project/data/annotation_codes_hg38/hg38_refgene_all_exons.txt.gz Taking input= as a system command ('zless /gpfs/data/dgamsiz/Uzun_Lab/gtollefs/tpp1_splicing_project/data/annotation_codes_hg38/hg38_refgene_all_exons.txt.gz') and a variable has been used in the expression passed to input=. Please use fread(cmd=...). There is a security concern if you are creating an app, and the app could have a malicious user, and the app is not running in a secure environment; e.g. the app is running as root. Please read item 5 in the NEWS file for v1.11.6 for more information and for the option to suppress this message. Taking input= as a system command ('zcat < /gpfs/data/dgamsiz/Uzun_Lab/gtollefs/tpp1_splicing_project/data/annotation_codes_hg38/hg38_refgene_all_introns.bed.gz') and a variable has been used in the expression passed to input=. Please use fread(cmd=...). There is a security concern if you are creating an app, and the app could have a malicious user, and the app is not running i n a secure environment; e.g. the app is running as root. Please read item 5 in the NEWS file for v1.11.6 for more information and for the option to suppress this message. Taking input= as a system command ('zcat < /gpfs/data/dgamsiz/Uzun_Lab/gtollefs/tpp1_splicing_project/data/annotation_codes_hg38/hg38_refgene_threeprime.bed.gz') and a variable has been used in the expression passed to input=. Please use fread(cmd=...). There is a security concern if you are creating an app, and the app could have a malicious user, and the app is not running in a secure environment; e.g. the app is running as root. Please read item 5 in the NEWS file for v1.11.6 for more information and for the option to suppress this message. Taking input= as a system command ('zcat < /gpfs/data/dgamsiz/Uzun_Lab/gtollefs/tpp1_splicing_project/data/annotation_codes_hg38/hg38_refgene_fiveprime.bed.gz') and a variable has been used i n the expression passed to input=. Please use fread(cmd=...). There is a security concern if you are creating an app, and the app could have a malicious user, and the app is not running in a secure environment; e.g. the app is running as root. Please read item 5 in the NEWS file for v1.11.6 for more information and for the option to suppress this message. [1] "Annotating junctions" [1] "Preparing results" [1] "converting counts to ratios" mutate_all() ignored the following grouping variables: Column clu Use mutate_at(df, vars(-group_cols()), myoperation) to silence the message. Warning message: funs() was deprecated in dplyr 0.8.0. Please use a list of either functions or lambdas:

Simple named list: list(mean = mean, median = median)

Auto named with tibble::lst(): tibble::lst(mean, median)

Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE)) This warning is displayed once every 8 hours. Call lifecycle::last_warnings() to see where this warning was generated. [1] "creating PCA"