yu-lab-vt / AQuA2

Activity Quantification and Analysis for molecular spatiotemporal signals
GNU General Public License v2.0
14 stars 1 forks source link

seLst2 in aqua_cmd_batch.m #2

Closed Sihao closed 6 months ago

Sihao commented 6 months ago

https://github.com/yu-lab-vt/AQuA2/blob/22252dab7b15fe4028abd8d4e1a3715c059dc3b5/aqua_cmd_batch.m#L117-L143

If both opts.needTemp and opts.singleChannel are true, then the seLst2 variable does not get defined which throws an error at line 143

Works for me with this change:

if(opts.needTemp)
         [seLst1,subEvtLst1,seLabel1,majorInfo1,opts,sdLst1,~,~] = se.seDetection(dF1,datOrg1,arLst1,opts,[]);
         seLst2 = arLst2;
         subEvtLst2 = arLst2;
         if(~opts.singleChannel)
             [seLst2,subEvtLst2,seLabel2,majorInfo2,opts,sdLst2,~,~] = se.seDetection(dF2,dFOrg2,arLst2,opts,[]);
         end
    else
        seLst1 = arLst1;
        seLst2 = arLst2;
        subEvtLst1 = arLst1; 
        subEvtLst2 = arLst2; 
        seLabel1 = 1:numel(seLst1);
        seLabel2 = 1:numel(seLst2);
        majorInfo1 = se.getMajority_Ac(seLst1,seLst1,dF1,opts);
        majorInfo2 = se.getMajority_Ac(seLst2,seLst2,dF2,opts);
    end
XuelongMi commented 6 months ago

Thank you for your reminder and I appreciate it! That's indeed my mistake. Now the issues have been fixed in aqua_cmd_batch.m.

By the way, the issue is because there is some change on GUI pipeline that I didn't synchronize to the aqua_cmd_batch.m file. Although your modification could work, it will be better to use the newest update. Now aqua_cmd_batch is consistent with GUI pipeline.

XuelongMi commented 6 months ago

Thank you for all your comments! Please feel free to propose questions

Sihao commented 6 months ago

Thanks!