private InvestigationSourceInfo Parse(InvestigationSourceInfo sourceInfo, IdentificationPrescanInfo 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.Items,
                                           prescanInfo.Experiments);
                break;

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

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

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

            return(sourceInfo);
        }
示例#2
0
 public Comparison(InvestigationSourceInfo sourceInfo1, InvestigationSourceInfo sourceInfo2, ComparisonSettings settings, ComparisonPrescanInfo prescanInfo)
 {
     MySourceInfo1 = sourceInfo1;
     MySourceInfo2 = sourceInfo2;
     MySettings    = settings;
     MyPrescanInfo = prescanInfo;
 }
 public IdentificationReportGenerator(InvestigationSourceInfo sourceInfo, IdentificationSettings settings, string connectionString)
     :
     base(connectionString)
 {
     MySourceInfo = sourceInfo;
     MySettings   = settings;
 }
        private IdentificationPrescanInfo GetPrescanInfo(InvestigationSourceInfo sourceInfo)
        {
            //Get information about used items and experiments from one source.
            CIStringCollection items, experiments;

            //Get used items and experiments in source 1.
            switch (sourceInfo.SourceType)
            {
            case InvestigationSourceType.Session:
                ScanSession(sourceInfo.Session, out items, out experiments);
                break;

            case InvestigationSourceType.ReferenceSet:
                ScanReferenceSet(sourceInfo.SourceName, out items, out experiments);
                break;

            case InvestigationSourceType.File:
                ScanFile(sourceInfo.SourceName, out items, out experiments);
                break;

            default:
                throw new Exception("Unknown comparison source type.");
            }

            return(new IdentificationPrescanInfo(items, experiments));
        }
 public Identification(InvestigationSourceInfo sourceInfo, IdentificationSettings settings, IdentificationPrescanInfo prescanInfo)
 {
     MySourceInfo  = sourceInfo;
     MySettings    = settings;
     MyPrescanInfo = prescanInfo;
     MyResultList  = new List <IdentificationResults>();
 }
 public ComparisonReportGenerator(InvestigationSourceInfo sourceInfo1, InvestigationSourceInfo sourceInfo2, ComparisonSettings settings, string connectionString)
     :
     base(connectionString)
 {
     MySourceInfo1 = sourceInfo1;
     MySourceInfo2 = sourceInfo2;
     MySettings    = settings;
 }
        private ComparisonPrescanInfo GetPrescanInfo(InvestigationSourceInfo sourceInfo1, InvestigationSourceInfo sourceInfo2)
        {
            //Get information about used items and experiments from both sources.
            CIStringCollection itemsSource1, experimentsSource1, itemsSource2, experimentsSource2;

            //Get used items and experiments in source 1.
            switch (sourceInfo1.SourceType)
            {
            case InvestigationSourceType.Session:
                ScanSession(sourceInfo1.Session, out itemsSource1, out experimentsSource1);
                break;

            case InvestigationSourceType.ReferenceSet:
                ScanReferenceSet(sourceInfo1.SourceName, out itemsSource1, out experimentsSource1);
                break;

            case InvestigationSourceType.File:
                ScanFile(sourceInfo1.SourceName, out itemsSource1, out experimentsSource1);
                break;

            default:
                throw new Exception("Unknown comparison source type.");
            }

            //Get used items and experiments in source 2.
            switch (sourceInfo2.SourceType)
            {
            case InvestigationSourceType.Session:
                ScanSession(sourceInfo2.Session, out itemsSource2, out experimentsSource2);
                break;

            case InvestigationSourceType.ReferenceSet:
                ScanReferenceSet(sourceInfo2.SourceName, out itemsSource2, out experimentsSource2);
                break;

            case InvestigationSourceType.File:
                ScanFile(sourceInfo2.SourceName, out itemsSource2, out experimentsSource2);
                break;

            default:
                throw new Exception("Unknown comparison source type.");
            }

            return(new ComparisonPrescanInfo(itemsSource1, itemsSource2, experimentsSource1, experimentsSource2));
        }
        override public string GenerateReport()
        {
            IdentificationPrescanInfo prescanInfo;
            Identification            idf;

            //Scan the sources for used items and experiments to avoid loading unnecessary results into memory.
            OnStatusChange("Prescanning");
            prescanInfo = GetPrescanInfo(MySourceInfo);

            //Get the results and do internal checking using the information found by the pre-scan.
            OnStatusChange("Loading results");
            MySourceInfo = Parse(MySourceInfo, prescanInfo);

            //Perform the actual identification.
            OnStatusChange("Performing identification");
            idf = new Identification(MySourceInfo, MySettings, prescanInfo);
            idf.StatusChange += new Investigation.InvestigationStatusChangeHandler(Investigation_StatusChanged);
            idf.Identify();

            OnStatusChange("Preparing report");
            return(idf.ToString());
        }
        override public string GenerateReport()
        {
            ComparisonPrescanInfo prescanInfo;
            Comparison            cmp;

            //Scan the sources for used items and experiments to avoid loading unnecessary results into memory.
            OnStatusChange("Prescanning");
            prescanInfo = GetPrescanInfo(MySourceInfo1, MySourceInfo2);

            //Get the results and do internal checking using the information found by the pre-scan.
            OnStatusChange("Loading results from source 1");
            MySourceInfo1 = Parse(MySourceInfo1, prescanInfo);
            OnStatusChange("Loading results from source 2");
            MySourceInfo2 = Parse(MySourceInfo2, prescanInfo);

            //Perform the actual comparison.
            OnStatusChange("Performing comparison");
            cmp = new Comparison(MySourceInfo1, MySourceInfo2, MySettings, prescanInfo);
            cmp.StatusChange += new Investigation.InvestigationStatusChangeHandler(Investigation_StatusChanged);
            cmp.Compare();

            OnStatusChange("Preparing report");
            return(cmp.ToString());
        }