FMBuffa / sigQC

signature QC protocol
GNU General Public License v3.0
1 stars 0 forks source link

test case #36138 weird autocorrelation_matrices #2

Closed ansel2025 closed 7 years ago

ansel2025 commented 7 years ago

sigQC: v1.0.2

============================= Output ==============================

Mean vs SD graphs created successfully. Mean vs SD tables written to file successfully. Expression and density graphs created successfully. There was an error, likely due to NA values in data, for dataset: TCGA1 hypoxiaSig Error in gplots::heatmap.2(stats::na.omit(autocors), col = gplots::colorpanel(100, : `x' must have at least 2 rows and 2 columns

Error occurred during the evaluation of compactness: Error in x[[1]][[2]]: subscript out of bounds

Error occurred, likely due to inability to calculate PCA, because of missing values: Error in svd(x, nu = 0): a dimension is zero

Standardisation compared successfully. Error occurred in eval_struct_loc: Error in .local(object, ...): nrow of all heatmaps should be the same.

Radar chart made successfully.

============================= Data ============================== TCGA2.txt.gz TCGA3.txt.gz TCGA4.txt.gz TCGA5.txt.gz TCGA6.txt.gz TCGA7.txt.gz TCGA8.txt.gz TCGA9.txt.gz TCGA10.txt.gz TCGA11.txt.gz TCGA12.txt.gz TCGA13.txt.gz TCGA14.txt.gz TCGA15.txt.gz gene_sigs_list.txt.gz names.txt.gz names_sigs.txt.gz TCGA1.txt.gz

andrewdhawan commented 7 years ago

Hi Wei-Chen, would you be able to post the R code that you are using to load in the data / run the package? I think this error is occurring because the code can't find any signature genes in one of the datasets, but I'm not 100% sure why, because it looks like it should be there.

Thanks,

Andrew

ansel2025 commented 7 years ago

Sure, here is the code for loading.

I see you point. It make sense. Right, it's possible user includes a data that doesn't contain the gene in the signature, accidentally or on purpose. Then... not sure what should we do

names = as.matrix(read.table('names.txt.gz', header = TRUE, row.names=1, sep=',', stringsAsFactors=FALSE)); names_sigs = as.matrix(read.table('names_sigs.txt.gz', header = TRUE, row.names=1, sep=',', stringsAsFactors=FALSE)); gene_sigs_list = as.matrix(read.table('gene_sigs_list.txt.gz', header = TRUE, row.names=1, sep=',', stringsAsFactors=FALSE));

mRNA_expr_matrix = list() for(i in 1:length(names)){ mRNA_expr_matrix[[names[i,1]]] = as.matrix(read.table(paste0(names[i,1], '.txt.gz'), header = TRUE, row.names=1, sep=',', stringsAsFactors=FALSE)); }

make_all_plots(names_datasets = names, names_sigs = names_sigs, gene_sigs_list = gene_sigs_list, mRNA_expr_matrix = mRNA_expr_matrix, out_dir = out_dir, showResults = FALSE)

andrewdhawan commented 7 years ago

Hi Wei-Chen,

I believe that this error is occurring because there is such a high proportion of NA values in the matrix for TCGA1 (at least), that autocorrelation cannot be computed (as there are probably no pairwise complete sets). What we can do is instead of throwing an error, is to produce a warning from the user in this case.

Do you think this fix is ok?

Cheers, Andrew

andrewdhawan commented 7 years ago

Hi Wei-Chen,

I believe that the latest release - v1.03, has corrected this issue. Please feel free to test at your earliest and let me know.

Thanks, Andrew

EDIT: To further clarify, I know you will likely still have an issue with the expression heatmaps (and I believe that Alessandro is looking into this issue, as it seems complexHeatmap may not have the capability we need...)