Exemple #1
0
        public void Run()
        {
            // fire up R
            STATCONNECTORSRVLib.StatConnector statConn = new StatConnector();
            statConn.Init("R");

            // read the custom functions from the dir
            RFunctions rfunc = new RFunctions(_customFunctionsDir, statConn);

            rfunc.Reload();

            // for each set of assay results, associate the results with the substructure libraries
            foreach (AssayResults aResults in _hsAssayResults.Values)
            {
                // associate the stats collection with the results
                aResults.StatCollection = _stats.Copy();
                // associate the results with the substructure library
                _substructureLibrary.AddResults(aResults);
                // now, calculate the statistics for this result set (which will also calculate statistics for
                // all results sets that were added to the substructure library entries).
                aResults.CalculateStatistics(statConn);
            }
            // close the connection
            statConn.Close();
        }
Exemple #2
0
        /// <summary>
        /// prepare to perform the analysis
        /// </summary>
        public void PrepAnalysisInteractive()
        {
            CheckREnvironment();
            // clear out the library
            _subsLib.FilteredLibrary.ClearResults();

            // read the custom functions from the dir
            _rfunc = new RFunctions(_functionsDir, _statConn);
            _rfunc.Reload();

            // get the size of this run so we can update interested parties
            _analysisSize  = _subsLib.FilteredLibrary.NumEntries * _hsAssayResults.Count;
            _analysisCount = 0;

            _enum = _hsAssayResults.GetEnumerator();
            // Enumerators start out _before_ the beginning of the collection, so we have to
            // MoveNext to be at the first value
            _enum.MoveNext();
            _currResults = ((AssayResults)_enum.Value).FilteredResults;
            // associate the stats collection with the results
            _currResults.StatCollection = _stats.Copy();
            // clear subresults
            _currResults.ClearSubResults();
            // associate the results with the substructure library
            _subsLib.FilteredLibrary.AddResults(_currResults);
            // prep the statistics run
            _currResults.PrepInteractiveStatisticsRun(_statConn);
        }
Exemple #3
0
        /// <summary>
        /// Non-interactive, one-shot method of running analysis
        /// </summary>
        public void RunAnalysis()
        {
            // read the custom functions from the dir
            _rfunc = new RFunctions(_functionsDir, _statConn);
            _rfunc.Reload();

            // for each set of assay results, associate the results with the substructure libraries
            foreach (AssayResults aResults in _hsAssayResults.Values)
            {
                // associate the stats collection with the results
                aResults.FilteredResults.StatCollection = _stats.Copy();
                // associate the results with the substructure library
                _subsLib.FilteredLibrary.AddResults(aResults.FilteredResults);
                // now, calculate the statistics for this result set (which will also calculate statistics for
                // all results sets that were added to the substructure library entries).
                aResults.FilteredResults.CalculateStatistics(_statConn);
            }
            // close the connection
            _statConn.Close();
        }