Пример #1
0
        private void PopulateChoices()
        {
            //CmbxExperimentType.Items.Add(ExperimentType.RNASequencing.ToString());
            //CmbxExperimentType.Items.Add(ExperimentType.WholeGenomeSequencing.ToString());
            //CmbxExperimentType.Items.Add(ExperimentType.ExomeSequencing.ToString());
            //CmbxExperimentType.SelectedIndex = 0; // hard coded selection (for now)

            EnsemblReleases = EnsemblRelease.GetReleases();
        }
Пример #2
0
        protected void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            //// Experiment type selection
            //int iii = CmbxExperimentType.SelectedIndex;
            //if (iii == 0)
            //{
            //    Options.ExperimentType = ExperimentType.RNASequencing.ToString();
            //}
            //else if (iii == 1)
            //{
            //    Options.ExperimentType = ExperimentType.WholeGenomeSequencing.ToString();
            //}
            //else if (iii == 2)
            //{
            //    Options.ExperimentType = ExperimentType.ExomeSequencing.ToString();
            //}
            //else
            //{
            //    MessageBox.Show("Please choose an experiment type selection.");
            //    return;
            //}

            Options.AnalysisDirectory = TrimQuotesOrNull(txtAnalysisDirectory.Text);
            try
            {
                string testDirectory = Path.Combine(Options.AnalysisDirectory, $"TestSpritzPermissions{Options.AnalysisDirectory.GetHashCode()}");
                Directory.CreateDirectory(testDirectory);
                Directory.Delete(testDirectory);
            }
            catch (Exception)
            {
                MessageBox.Show($"Error: Cannot write to specified analysis directory: {Options.AnalysisDirectory}. Please choose another directory.",
                                "Write Permissions", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            if (!Directory.Exists(Options.AnalysisDirectory))
            {
                Directory.CreateDirectory(Options.AnalysisDirectory);
            }

            Options.Threads = Threads;
            EnsemblRelease ensembl = (EnsemblRelease)EnsemblReleaseVersions.SelectedItem;

            Options.Release         = ensembl.Release;
            Options.Species         = EnsemblSpecies.SelectedItem.ToString();
            Options.Reference       = ensembl.Genomes[Options.Species];
            Options.Organism        = ensembl.Organisms[Options.Species];
            Options.AnalyzeVariants = (bool)Cb_AnalyzeVariants.IsChecked;
            Options.AnalyzeIsoforms = (bool)Cb_AnalyzeIsoforms.IsChecked;
            Options.SpritzVersion   = MainWindow.CurrentVersion;
            DialogResult            = true;
        }