public new void InitializeWorkflow() { _resultsFolder = string.IsNullOrEmpty(ExecutorParameters.OutputFolderBase) ? RunUtilities.GetDatasetParentFolder(DatasetPath) : GetResultsFolder(ExecutorParameters.OutputFolderBase); MassTagsForTargetedAlignment = GetMassTagTargets(GetTargetFilePathForIqAlignment()); var targetsFilePathIsEmpty = (String.IsNullOrEmpty(ExecutorParameters.TargetsFilePath)); var currentTargetsFilePath = targetsFilePathIsEmpty ? TryFindTargetsForCurrentDataset() : ExecutorParameters.TargetsFilePath; Targets = CreateTargets(ExecutorParameters.TargetType, currentTargetsFilePath); if (ExecutorParameters.TargetType == Globals.TargetType.LcmsFeature) { UpdateTargetMissingInfo(); } if (_workflowParameters == null) { _workflowParameters = WorkflowParameters.CreateParameters(ExecutorParameters.WorkflowParameterFile); _workflowParameters.LoadParameters(ExecutorParameters.WorkflowParameterFile); } if (ExecutorParameters.TargetedAlignmentIsPerformed) { if (string.IsNullOrEmpty(ExecutorParameters.TargetedAlignmentWorkflowParameterFile)) { throw new FileNotFoundException( "Cannot initialize workflow. TargetedAlignment is requested but TargetedAlignmentWorkflowParameter file is not found. Check path for the 'TargetedAlignmentWorkflowParameterFile' "); } TargetedAlignmentWorkflowParameters = new TargetedAlignerWorkflowParameters(); TargetedAlignmentWorkflowParameters.LoadParameters(ExecutorParameters.TargetedAlignmentWorkflowParameterFile); } TargetedWorkflow = TargetedWorkflow.CreateWorkflow(_workflowParameters); }
public void InitializeWorkflow() { if (string.IsNullOrEmpty(ExecutorParameters.OutputFolderBase)) { _resultsFolder = RunUtilities.GetDatasetParentFolder(DatasetPath); } else { _resultsFolder = GetResultsFolder(ExecutorParameters.OutputFolderBase); } if (ExecutorParameters.TargetedAlignmentIsPerformed) { MassTagsForTargetedAlignment = GetMassTagTargets(GetTargetFilePathForIqAlignment()); } var targetsFilePathIsEmpty = (String.IsNullOrEmpty(ExecutorParameters.TargetsFilePath)); string currentTargetsFilePath; if (targetsFilePathIsEmpty) { currentTargetsFilePath = TryFindTargetsForCurrentDataset(); //check for a _targets file specifically associated with dataset } else { currentTargetsFilePath = ExecutorParameters.TargetsFilePath; } Targets = CreateTargets(ExecutorParameters.TargetType, currentTargetsFilePath); Check.Ensure(Targets != null && Targets.TargetList.Count > 0, "Target massTags is empty (or all peptides contain unknown modifications). Check the path to the massTag data file."); IqLogger.Log.Info("Total targets loaded= " + Targets.TargetList.Count); if (ExecutorParameters.TargetType == Globals.TargetType.LcmsFeature) { UpdateTargetMissingInfo(); } if (TargetedWorkflow == null) { if (_workflowParameters == null) { _workflowParameters = WorkflowParameters.CreateParameters(ExecutorParameters.WorkflowParameterFile); _workflowParameters.LoadParameters(ExecutorParameters.WorkflowParameterFile); } TargetedWorkflow = TargetedWorkflow.CreateWorkflow(_workflowParameters); } else { _workflowParameters = TargetedWorkflow.WorkflowParameters; } if (ExecutorParameters.TargetedAlignmentIsPerformed) { if (string.IsNullOrEmpty(ExecutorParameters.TargetedAlignmentWorkflowParameterFile)) { throw new FileNotFoundException( "Cannot initialize workflow. TargetedAlignment is requested but TargetedAlignmentWorkflowParameter file is not found. Check path for the 'TargetedAlignmentWorkflowParameterFile' "); } TargetedAlignmentWorkflowParameters = new TargetedAlignerWorkflowParameters(); TargetedAlignmentWorkflowParameters.LoadParameters(ExecutorParameters.TargetedAlignmentWorkflowParameterFile); } }