Beispiel #1
0
        //static string mzmlFileBaseName="MS_QC_240min";
        public static void ExtractFeatures(String ms2File, out String extractedFeatureSavedFile_posAndNeg, out String extractedFeatureSavedFile_posAndNonPos)
        {
            Console.WriteLine("Extracting features from {0}", ms2File);

            InputFileOrganizer.MS2SimulationTestFile = ms2File;
            //InputFileOrganizer.MZMLSimulationTestFile = mzmlFile;
            String ms2FileBaseName = Path.GetFileNameWithoutExtension(ms2File);

            OutputFile_PositiveAndNegative            = Path.Combine(InputFileOrganizer.OutputFolderOfTheRun, ms2FileBaseName + "_extractedFeatures_PositiveAndNegative.tsv");
            OutputFile_PositiveAndNonPositive         = Path.Combine(InputFileOrganizer.OutputFolderOfTheRun, ms2FileBaseName + "_extractedFeatures_positiveAndNonPositive.tsv");
            OutputFile_PositiveAndNonPositive_NoDecoy = Path.Combine(InputFileOrganizer.OutputFolderOfTheRun, ms2FileBaseName + "_extractedFeatures_positiveAndNonPositive_NoDecoy.tsv");

            //the current feature extraction will include decoy proteins in the database and testing set
            SimulationWithDecoyParamsSetUp();

            //placeholder values, dont matter
            GlobalVar.ppmTolerance            = 1;
            GlobalVar.retentionTimeWindowSize = 1;
            GlobalVar.AccordThreshold         = 1;
            GlobalVar.XCorr_Threshold         = 1;
            GlobalVar.NumDBThreshold          = 1;
            //

            log.Info("Running No Exclusion Simulation");
            ExclusionProfile exclusionProfile = ExclusionExplorer.SingleSimulationRun(ExclusionProfileEnum.NO_EXCLUSION_PROFILE);

            log.Info("Extracting identification feature from exclusion profile");
            List <IdentificationFeatures> idf = exclusionProfile.getFeatures();

            log.Info("Recalibrating stDev");
            idf = IdentificationFeatureExtractionUtil.recalibrateStDev(idf);

            writeFeatures(idf);
            extractedFeatureSavedFile_posAndNeg    = OutputFile_PositiveAndNegative;
            extractedFeatureSavedFile_posAndNonPos = OutputFile_PositiveAndNonPositive;
            Console.WriteLine("Extracted Feature written to {0} and {1}", OutputFile_PositiveAndNegative, OutputFile_PositiveAndNonPositive);
        }