Beispiel #1
0
 public Comparison(InvestigationSourceInfo sourceInfo1, InvestigationSourceInfo sourceInfo2, ComparisonSettings settings, ComparisonPrescanInfo prescanInfo)
 {
     MySourceInfo1 = sourceInfo1;
     MySourceInfo2 = sourceInfo2;
     MySettings    = settings;
     MyPrescanInfo = prescanInfo;
 }
        private InvestigationSourceInfo Parse(InvestigationSourceInfo sourceInfo, ComparisonPrescanInfo prescanInfo)
        {
            //Read genotype results for the items and experiments present in both sources.
            DataTable results;

            switch (sourceInfo.SourceType)
            {
            case InvestigationSourceType.Session:
                results = ParseFromSession(sourceInfo.Session,
                                           sourceInfo.ItemTypes,
                                           sourceInfo.GenotypeStatuses,
                                           prescanInfo.ItemsUnion,
                                           prescanInfo.ExperimentsUnion);
                break;

            case InvestigationSourceType.ReferenceSet:
                results = ParseFromReferenceSet(sourceInfo.SourceName, prescanInfo.ItemsUnion, prescanInfo.ExperimentsUnion);
                break;

            case InvestigationSourceType.File:
                results = ParseFromFile(sourceInfo.SourceName,
                                        prescanInfo.ItemsUnion,
                                        prescanInfo.ExperimentsUnion);
                break;

            default:
                throw new Exception("Unknown comparison source type.");
            }
            sourceInfo.Load(results, MySettings.Mode);

            return(sourceInfo);
        }