ajitjohnson / imsig

Immune Cell Gene Signatures for Profiling the Microenvironment of Solid Tumours
26 stars 7 forks source link

Error in fastCor(t(exp)) : invalid nSplit: 0 #3

Closed s7hegde closed 6 years ago

s7hegde commented 6 years ago

When I run gene_stat or imsig on my dataset, I see the following:

---> Maximum number of splits: floor(n/2) = 0
---> WARNING: number of splits nSplit > 0
---> WARNING: using maximum number of splits: nSplit = 0
Error in fastCor(t(exp)) : invalid nSplit: 0

Example of my data

head(exp)[1:6]

      sample.39954 sample.39549 sample.39340 sample.39335 sample.39782 sample.39476

Gnai3-201 1834.61000 774.60800 1965.65000 2226.2400 293.46900 230.23 Pbsn-201 0.00000 0.00000 0.00000 0.0000 0.00000 0.00 Hoxb9-201 6.10689 0.00000 7.74459 0.0000 1.24906 0.00 Cdc45-201 40.13370 8.42056 26.81490 25.5792 7.60989 0.00 Igf2-201 244.81500 15.69920 403.01100 316.1610 15.89030 0.00 Apoh-201 0.00000 115.75100 114.91700 0.0000 0.00000 0.00

is this due to low read values? Any help would be appreciated. Thanks, s7 <R 3.5.1 GUI 1.70 El Capitan build (7543)>

ajitjohnson commented 6 years ago

Hi s7,

Looking at your example data, I am assuming that your genes names are in the following format -"Gnai3-201". The function requires the gene names to be in HGNC format i.e. (GNAI3). If this is the issue, fix the gene names and it should work. Let me know if that helped.

Best regards, Ajit.

s7hegde commented 6 years ago

Thanks for that suggestion; it still doesnt work despite standardizing the gene names. I'm fairly certain this is similar to the previous user's issue with multiple "drop out" values of zero or close to zero.

ajitjohnson commented 6 years ago

Not sure about that. I need to look at the data to be able to troubleshoot.

To check if what you suspect is right, I would subset about 15-20 samples and run imputation on it using ‘MAGIC’ package. Then try and re run the analysis on the imputed data.

https://github.com/KrishnaswamyLab/MAGIC

immuneAI commented 6 years ago

I tried with your example data, facing the same error. Can you please help

ajitjohnson commented 6 years ago

Hi Venkat,

I'm not able to reproduce this error. Did you try a different computer? (https://github.com/ajitjohnson/imsig/issues/1)

If it still doesn't work can you please give me more details on the error? Thanks.

Best regards, Ajit.

s7hegde commented 6 years ago

I tried with your example data, facing the same error. Can you please help

I havent had this issue with example dataset, it works great !

ajitjohnson commented 6 years ago

Hi s7,

Does it work on a different dataset? Or if you send me parts of your data, I can figure out what is going on. If that helps.

Best regards, Ajit.

s7hegde commented 6 years ago

Here's a part of the overall transcript data with HGNC nomenclature. Thanks for looking into it !

all.transcript_counts_SH for troubleshooting.txt

ajitjohnson commented 6 years ago

Hi S7,

Your expression matrix seems to contain duplicate gene names and that was why it did not work. As mentioned in the description every row needs to be unique. Just aggregate the different probes into one gene and then run the analysis. Something like below.

library(imsig) exp = read.table('exp.txt', header = T, sep = '\t') exp$X <- as.factor(exp$X) y=aggregate(.~X, data=exp, mean) rownames(y)=y[,1] y=y[,-1]

now run the imsig analysis

imsig (exp = y, r = 0.9)

Hope this helps.

Best regards, Ajit.