NabaviLab / SigEMD

R package for differential gene expression analysis in single-cell RNAseq
7 stars 2 forks source link

Error occured in "calculate_single" #1

Open ACS0906 opened 6 years ago

ACS0906 commented 6 years ago

I am trying to run your example.R commands but shows error just like bellow.

results<- calculate_single(data, condition, binSize=0.2,nperm=5) do EMD for Hur genes. Calculating pairwise emd scores....................Error in file(con, "w") : cannot open the connection

Any suggestion..???

tianyu-github commented 6 years ago

I have never seen this error before, could you provide more details about the error? What is the RStudio version are you using? Could you try to run function file SigEMDHur.R and SigEMDnonHur.R in your console, then run the example?

79176609 commented 6 years ago

According to your suggestions, I'm tried but failed. After running SigEMDHur.R and SigEMDnonHur.R files in R (version: R.3.4.3) for example.R, I get the error like....

results<- calculate_single(data, condition, binSize=0.2,nperm=100) do EMD for Hur genes. Calculating pairwise emd scores...Error: BiocParallel errors element index: 1, 2, 3, 4, 5, 6, ... first error: could not find function ".emd_gene_pairwise"

Sorry for tardy reply.

Thanks in advance

tianyu-github commented 6 years ago

Hi, I've updated the code. Now you can try agian. Let me know if there are still errors.

79176609 commented 6 years ago

Yeah..! It is working

Thanks again

ACS0906 commented 6 years ago

Dear Mr. Tianyu,

Could you tell me why your method needed TPM normalized data instead of other normalization? I ask you because of the DE genes after TPM normalization is seemed misleading. Thanks in advance.! Kind regards, Singha Atul Chandra

tianyu-github commented 6 years ago

Hi,

We did not include a normalization in this tool, so we need normalized expression values as input. Actually, any kind of normalization can be used to this method, not only log-transformed TPM value.

ACS0906 commented 6 years ago

Ok, Thank you. I see.

adminshuang commented 5 years ago

I have run the example.R perfectly well.But while I try my own data with the instruction: results<- calculate_single(data = data,condition = condition,Hur_gene = Hur_gene, binSize=0.2,nperm=100) it always gives the terrified error as below: do EMD for Hur genes. Calculating pairwise emd scores...Error in seq.default(floor(min(c(dataA, dataB))), ceiling(max(c(dataA, : 'from' must be a finite number I get little confused with the intrinsic code logic.What is wrong with my instruction??

tianyu-github commented 5 years ago

I think the reason is your data has some rows (genes) that are zeros among all the columns. You may try to remove those genes to clean up the data. I may include a function in the code to clean up data in the future.

tianyu-github commented 5 years ago

I've updated the codes and added a function "dataclean", you may want to have a try. Let me know if you still have errors.

On Thu, Mar 21, 2019 at 6:07 AM TOWARDSzs notifications@github.com wrote:

I have run the example.R perfectly well.But while I try my own data with the instruction: results<- calculate_single(data = data,condition = condition,Hur_gene = Hur_gene, binSize=0.2,nperm=100) it always gives the terrified error as below: do EMD for Hur genes. Calculating pairwise emd scores...Error in seq.default(floor(min(c(dataA, dataB))), ceiling(max(c(dataA, : 'from' must be a finite number I get little confused with the intrinsic code logic.What is wrong with my instruction??

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNabaviLab%2FSigEMD%2Fissues%2F1%23issuecomment-475172145&data=02%7C01%7Ctianyu.wang%40uconn.edu%7Ce752629449c0413cc47108d6ade51354%7C17f1a87e2a254eaab9df9d439034b080%7C0%7C0%7C636887596730852997&sdata=kBxJKwNrLoMKADntMR3We3k7yKQbtPZek4Bdtjsac9Y%3D&reserved=0, or mute the thread https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAUVKI4RTBIQcHOmcDhertlPMEO-CcvX2ks5vY1n0gaJpZM4RpI6P&data=02%7C01%7Ctianyu.wang%40uconn.edu%7Ce752629449c0413cc47108d6ade51354%7C17f1a87e2a254eaab9df9d439034b080%7C0%7C0%7C636887596730863001&sdata=6YU21wRyotib21Qo459rVY%2Bs2yzoan6RlZWFwp6Gmuc%3D&reserved=0 .

adminshuang commented 5 years ago

I've updated the codes and added a function "dataclean", you may want to have a try. Let me know if you still have errors. On Thu, Mar 21, 2019 at 6:07 AM TOWARDSzs @.***> wrote: I have run the example.R perfectly well.But while I try my own data with the instruction: results<- calculate_single(data = data,condition = condition,Hur_gene = Hur_gene, binSize=0.2,nperm=100) it always gives the terrified error as below: do EMD for Hur genes. Calculating pairwise emd scores...Error in seq.default(floor(min(c(dataA, dataB))), ceiling(max(c(dataA, : 'from' must be a finite number I get little confused with the intrinsic code logic.What is wrong with my instruction?? — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNabaviLab%2FSigEMD%2Fissues%2F1%23issuecomment-475172145&data=02%7C01%7Ctianyu.wang%40uconn.edu%7Ce752629449c0413cc47108d6ade51354%7C17f1a87e2a254eaab9df9d439034b080%7C0%7C0%7C636887596730852997&sdata=kBxJKwNrLoMKADntMR3We3k7yKQbtPZek4Bdtjsac9Y%3D&reserved=0, or mute the thread https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAUVKI4RTBIQcHOmcDhertlPMEO-CcvX2ks5vY1n0gaJpZM4RpI6P&data=02%7C01%7Ctianyu.wang%40uconn.edu%7Ce752629449c0413cc47108d6ade51354%7C17f1a87e2a254eaab9df9d439034b080%7C0%7C0%7C636887596730863001&sdata=6YU21wRyotib21Qo459rVY%2Bs2yzoan6RlZWFwp6Gmuc%3D&reserved=0 .

Well, thanks to your quickly reply. But the solution doesn't solved the problem. I applied my data to the new update version, it doesn't work.......And I checked the genes, it was filtered 0 out before. What a shame! It seems to have another reason. I will try to find out. The error recall I got still like this :

Calculating pairwise emd scores...Error in seq.default(floor(min(c(dataA, dataB))), ceiling(max(c(dataA, : 'from' must be a finite number Calls: calculate_single ... tryCatch -> tryCatchList -> tryCatchOne -> In addition: Warning messages: 1: In min(c(dataA, dataB)) : no non-missing arguments to min; returning Inf 2: In max(c(dataA, dataB)) : no non-missing arguments to max; returning -Inf Execution halted

tianyu-github commented 5 years ago

I've updated the codes and added a function "dataclean", you may want to have a try. Let me know if you still have errors. On Thu, Mar 21, 2019 at 6:07 AM TOWARDSzs @.***> wrote: I have run the example.R perfectly well.But while I try my own data with the instruction: results<- calculate_single(data = data,condition = condition,Hur_gene = Hur_gene, binSize=0.2,nperm=100) it always gives the terrified error as below: do EMD for Hur genes. Calculating pairwise emd scores...Error in seq.default(floor(min(c(dataA, dataB))), ceiling(max(c(dataA, : 'from' must be a finite number I get little confused with the intrinsic code logic.What is wrong with my instruction?? — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNabaviLab%2FSigEMD%2Fissues%2F1%23issuecomment-475172145&data=02%7C01%7Ctianyu.wang%40uconn.edu%7Ce752629449c0413cc47108d6ade51354%7C17f1a87e2a254eaab9df9d439034b080%7C0%7C0%7C636887596730852997&sdata=kBxJKwNrLoMKADntMR3We3k7yKQbtPZek4Bdtjsac9Y%3D&reserved=0, or mute the thread https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAUVKI4RTBIQcHOmcDhertlPMEO-CcvX2ks5vY1n0gaJpZM4RpI6P&data=02%7C01%7Ctianyu.wang%40uconn.edu%7Ce752629449c0413cc47108d6ade51354%7C17f1a87e2a254eaab9df9d439034b080%7C0%7C0%7C636887596730863001&sdata=6YU21wRyotib21Qo459rVY%2Bs2yzoan6RlZWFwp6Gmuc%3D&reserved=0 .

Well, thanks to your quickly reply. But the solution doesn't solved the problem. I applied my data to the new update version, it doesn't work.......And I checked the genes, it was filtered 0 out before. What a shame! It seems to have another reason. I will try to find out. The error recall I got still like this :

Calculating pairwise emd scores...Error in seq.default(floor(min(c(dataA, dataB))), ceiling(max(c(dataA, : 'from' must be a finite number Calls: calculate_single ... tryCatch -> tryCatchList -> tryCatchOne -> In addition: Warning messages: 1: In min(c(dataA, dataB)) : no non-missing arguments to min; returning Inf 2: In max(c(dataA, dataB)) : no non-missing arguments to max; returning -Inf Execution halted

Hi, The error occurred because function (min(x)) where x is a numeric(0) which means x is nothing. Could you check your variable "condition"? Set names for "condition", you could add "names(condition) <- colnames(data)" right after generating the vectors for "condition". Please let me know if it works or not.

adminshuang commented 5 years ago

Yeah,that's the problem,The solution solved my problem perfectly!!Thanks a lot.