/// <summary> /// compare two domain interfaces /// </summary> /// <param name="domainInterface1"></param> /// <param name="domainInterface2"></param> /// <returns></returns> public DomainInterfacePairInfo CompareEntryDomainInterfaces(DomainInterface domainInterface1, DomainInterface domainInterface2) { double qScore = qFunc.WeightQFunc(domainInterface1, domainInterface2); bool interfaceReversed = false; if (qScore < AppSettings.parameters.simInteractParam.interfaceSimCutoff && domainInterface1.familyCode1 == domainInterface2.familyCode2) { domainInterface2.Reverse(); double reversedQScore = qFunc.WeightQFunc(domainInterface1, domainInterface2); if (qScore < reversedQScore) { qScore = reversedQScore; interfaceReversed = true; } else { domainInterface2.Reverse(); } } DomainInterfacePairInfo interfacePairInfo = new DomainInterfacePairInfo (new DomainInterfaceInfo(domainInterface1), new DomainInterfaceInfo(domainInterface2)); interfacePairInfo.qScore = qScore; interfacePairInfo.isInterface2Reversed = interfaceReversed; return(interfacePairInfo); }
/// <summary> /// compare two domain interfaces /// </summary> /// <param name="domainInterface1"></param> /// <param name="domainInterface2"></param> /// <param name="domainAlignInfoTable"></param> /// <returns></returns> public DomainInterfacePairInfo CompareTwoDomainInterfaces(DomainInterface domainInterface1, DomainInterface domainInterface2, DataTable domainAlignInfoTable) { DomainInterface domainInterface2Copy = new DomainInterface(domainInterface2, true); // keep a deep copy double identity = supDomainInterface.SuperposeDomainInterfaces(domainInterface1, domainInterface2Copy, domainAlignInfoTable); double qScore = qFunc.WeightQFunc(domainInterface1, domainInterface2Copy); // domainInterface2 = domainInterface2Copy; // shadow copy // supDomainInterface.ReverseSupDomainInterfaces(domainInterface1, domainInterface2, domainAlignInfoTable); bool interfaceReversed = false; if (qScore < AppSettings.parameters.simInteractParam.interfaceSimCutoff && domainInterface1.familyCode1 == domainInterface2.familyCode2) { domainInterface2Copy = new DomainInterface(domainInterface2, true); domainInterface2Copy.Reverse(); // keep deep copy double reversedIdentity = supDomainInterface.SuperposeDomainInterfaces(domainInterface1, domainInterface2Copy, domainAlignInfoTable); double reversedQScore = qFunc.WeightQFunc(domainInterface1, domainInterface2Copy); // domainInterface2 = domainInterface2Copy; // supDomainInterface.ReverseSupDomainInterfaces(domainInterface1, domainInterface2, domainAlignInfoTable); if (qScore < reversedQScore) { qScore = reversedQScore; identity = reversedIdentity; interfaceReversed = true; } } DomainInterfacePairInfo interfacePairInfo = new DomainInterfacePairInfo (new DomainInterfaceInfo(domainInterface1), new DomainInterfaceInfo(domainInterface2)); interfacePairInfo.qScore = qScore; if (identity <= 0) { interfacePairInfo.identity = -1.0; } else { interfacePairInfo.identity = identity; } interfacePairInfo.isInterface2Reversed = interfaceReversed; return(interfacePairInfo); }