dhkron / PSYCHIC

Code for finding putative enhancers using Hi-C data
25 stars 8 forks source link

Error occured in stage GenerateProbModel #1

Closed shawnzhangyx closed 7 years ago

shawnzhangyx commented 7 years ago

Hi,

I saw your manuscript on BioArxiv and was very interested in using your software. However, as I was running the example data you provided, I got the following error:

Creating a Dixon-compatible matrix... Done! Running stage DixonDI Stage DixonDI done in 0.884799 seconds Running stage DixonDomainHMMCalling Stage DixonDomainHMMCalling done in 673.728319 seconds Running stage DixonDomains1 Stage DixonDomains1 done in 0.092609 seconds Running stage DixonDomains2 Stage DixonDomains2 done in 0.056782 seconds Running stage FixDomainFormat Stage FixDomainFormat done in 0.007951 seconds Running stage FixMatrixFormat Stage FixMatrixFormat done in 0.297036 seconds Skipping stage domain_debug Running stage GenerateProbModel Stage GenerateProbModel done in 13.879662 seconds Error occured in stage GenerateProbModel

Could you help me figure out where the problem is? Thank you!

Best, Shawn

dhkron commented 7 years ago

Hello,

Thanks for the feedback! As for the problem - when GenerateProbModel fails it writes an error log to a file named ".mdump2", could you post some of it? Also, two possible ("known") causes - 1) If the original input matrix is not symmetric, it usually causes some problems down the road. [That is a constraint of an external library] 2) There was an issue with last line of '.domains.txt' (right after stage "DixonDomains2"), that was fixed in the last commit last knight.

Gil

On Tue, Feb 14, 2017 at 12:12 AM, shawn notifications@github.com wrote:

Hi,

I saw your manuscript on BioArxiv and was very interested in using your software. However, as I was running the example data you provided, I got the following error:

Creating a Dixon-compatible matrix... Done! Running stage DixonDI Stage DixonDI done in 0.884799 seconds Running stage DixonDomainHMMCalling Stage DixonDomainHMMCalling done in 673.728319 seconds Running stage DixonDomains1 Stage DixonDomains1 done in 0.092609 seconds Running stage DixonDomains2 Stage DixonDomains2 done in 0.056782 seconds Running stage FixDomainFormat Stage FixDomainFormat done in 0.007951 seconds Running stage FixMatrixFormat Stage FixMatrixFormat done in 0.297036 seconds Skipping stage domain_debug Running stage GenerateProbModel Stage GenerateProbModel done in 13.879662 seconds Error occured in stage GenerateProbModel

Could you help me figure out where the problem is? Thank you!

Best, Shawn

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dhkron/PSYCHIC/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AG1e6W4EoYv9AkKrhBsf44tuMsLearBOks5rcNU2gaJpZM4L_yk8 .

shawnzhangyx commented 7 years ago

Hi Gil,

Thanks for your prompt response! Here is the output in the .mdump2 file:

Creating diag matrix... Done! 0.0888 seconds^M Extracting TAD/Bg matrix-masks... Done! 5.5086 seconds^M Gaussianing... AAABBBCCCAAA ans =

Undefined function or variable "GMModel".

Error in AnalyzeGMM (line 19) a_gmm{i}=GMModel;

Error in GenerateModelFromTADs (line 46) a_gmm_tad = AnalyzeGMM(a_tad,MIN_DIAG,MAX_DIAG,1);

I've run it again. And still crashed at the same place.

dhkron commented 7 years ago

I've found a potential error in AnalyzeGMM.m file, there was an issue with the try-catch block. Should not throw this error now.

On Tue, Feb 14, 2017 at 8:28 PM, shawn notifications@github.com wrote:

Hi Gil,

Thanks for your prompt response! Here is the output in the .mdump2 file:

Creating diag matrix... Done! 0.0888 seconds^M Extracting TAD/Bg matrix-masks... Done! 5.5086 seconds^M Gaussianing... AAABBBCCCAAA ans =

Undefined function or variable "GMModel".

Error in AnalyzeGMM (line 19) a_gmm{i}=GMModel;

Error in GenerateModelFromTADs (line 46) a_gmm_tad = AnalyzeGMM(a_tad,MIN_DIAG,MAX_DIAG,1);

I'll run it again.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dhkron/PSYCHIC/issues/1#issuecomment-279792763, or mute the thread https://github.com/notifications/unsubscribe-auth/AG1e6f6FbMkh12fkfQXL_ko45ywkAbWPks5rcfJGgaJpZM4L_yk8 .

shawnzhangyx commented 7 years ago

Hi Gil,

The previous bug was fixed, but I ran into another problem:

Stage DebugHierarchies done in 9.144668 seconds Error occured in stage DebugHierarchies

Here is the log in the .dump7 file:

[^HWarning: Struct field assignment overwrites a value with class "double". See MATLAB R14SP2 Release Notes, Assigning Nonstructure Variables As Structures Displays Warning, for details.]^H [^H> In SaveFigure at 2 In PlotHrrcBed at 72]^H AAABBBCCCAAA ans =

Reference to non-existent field 'Position'.

Error in SaveFigure (line 4) handle.PaperPosition = handle.Position;

Error in PlotHrrcBed (line 72) SaveFigure(g,figPath)

dhkron commented 7 years ago

Hello Shawn,

I am not sure why this one happens (could not reproduce), but i've pushed a possible fix. Perhaps 'gcf' function in PlotHrrcBed.m does not pass the figure handle properly on some setups.

On Thu, Feb 16, 2017 at 9:21 PM, shawn notifications@github.com wrote:

Hi Gil,

The previous bug was fixed, but I ran into another problem:

Stage DebugHierarchies done in 9.144668 seconds Error occured in stage DebugHierarchies

Here is the log in the .dump7 file:

[^HWarning: Struct field assignment overwrites a value with class "double". See MATLAB R14SP2 Release Notes, Assigning Nonstructure Variables As Structures Displays Warning, for details.]^H [^H> In SaveFigure at 2 In PlotHrrcBed at 72]^H AAABBBCCCAAA ans =

Reference to non-existent field 'Position'.

Error in SaveFigure (line 4) handle.PaperPosition = handle.Position;

Error in PlotHrrcBed (line 72) SaveFigure(g,figPath)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dhkron/PSYCHIC/issues/1#issuecomment-280431042, or mute the thread https://github.com/notifications/unsubscribe-auth/AG1e6ZXbcM5rPa2YfLMfSN0vuWkaHm6vks5rdKGvgaJpZM4L_yk8 .

shawnzhangyx commented 7 years ago

Hi Gil, Thanks for your time! I'm still having the same issue after updating to your latest commit. Maybe this is system-related. One more question: Is the example you provided working fine on your own machine when you install this software from scratch (clone from Github)?

dhkron commented 7 years ago

Hello Shawn,

Sorry for the delay. I took your advice and cloned the code into a clean MacOS, and was able to reproduce the error :) It was a miss-configured matlab cli argument inside the image saving routine. The example now runs smoothly from a cloned code.

Gil

On Sat, Feb 18, 2017 at 2:08 AM, shawn notifications@github.com wrote:

Hi Gil, Thanks for your time! I'm still having the same issue after updating to your latest commit. Maybe this is system-related. One more question: Is the example you provided working fine on your own machine when you install this software from scratch (clone from Github)?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dhkron/PSYCHIC/issues/1#issuecomment-280800766, or mute the thread https://github.com/notifications/unsubscribe-auth/AG1e6Zn3aEaymIPgeFpQlPepRYHpN9Keks5rdjaAgaJpZM4L_yk8 .

shawnzhangyx commented 7 years ago

Hi Gil,

It is working. Thank you! Closing the ticket.