Exemplo n.º 1
0
        /// <summary>
        /// Creates a fqFile_component_details class from the core information that is best still stored within the programs memory.
        /// These classes populate a dictionary within the fqfilemap class where the component filename is their key.
        /// </summary>
        /// <param name="component">The component who's details are to be stored</param>
        public void BuildFqFileMap(IFqFile component)
        {
            FqFile_Component_Details componentDetails = new FqFile_Component_Details();

            componentDetails.ContructComponentDetails(component);

            fqFileMap.GetFqFileComponentDetailsMap()[component.getFileName()] = componentDetails;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Displays details of the components the file was broken into.
        /// </summary>
        public void DisplayComponentDetais()
        {
            foreach (String dir in fqMap.getFileComponentDirectories())
            {
                FqFile_Component_Details componentDetails = fqMap.GetFqFileComponentDetailsMap()[dir];

                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Bold);
                textBox.AppendText("\t[" + componentDetails.getGraphName() + " CONTENTS]\n\n");

                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText("\tTotal Sequences: ");
                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText(componentDetails.TotalSequences.ToString());

                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText("\t\tTotal Nucleotides: ");
                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText(componentDetails.TotalNucs.ToString() + "\n\n");

                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText("\tCytosine Count: ");
                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText(componentDetails.CCount.ToString());
                textBox.AppendText("\t" + Math.Round(componentDetails.CPercent, 2).ToString() + "(%) \n");

                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText("\tGuanine Count: ");
                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText(componentDetails.GCount.ToString());
                textBox.AppendText("\t" + Math.Round(componentDetails.GPercent, 2).ToString() + "(%) \n");

                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText("\tFailed Read Count: ");
                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText(componentDetails.NCount.ToString());
                textBox.AppendText("\t" + Math.Round(componentDetails.NPercent, 4).ToString() + "(%) \n\n");

                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText("\tSmallest Sequence Length: ");
                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText(componentDetails.MinSeqSize.ToString());

                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText("\tLargest Sequence Length: ");
                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText(componentDetails.MaxSeqSize.ToString() + "\n\n");

                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText("\tNucleotides Cleaned: ");
                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText(componentDetails.NucleotidesCleaned.ToString());

                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText("\t\tSequences Removed: ");
                textBox.SelectionFont = new Font(textBox.Font.ToString(), 8, FontStyle.Regular);
                textBox.AppendText(componentDetails.SequencesRemoved.ToString() + "\n\n");
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Changes the chart type via this combo box
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Charts_Combo_Selector_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (FastqController.CONTROLLER_STATE == FastqController.FastqControllerState.STATE_READY)
            {
                FqFileMap map = FastqController.getInstance().GetFqFileMap();

                if (map != null)
                {
                    SetGraphicTrackBarDataSourceSize();
                    List <String> componentDetails = map.getFileComponentDirectories();
                    Dictionary <string, FqFile_Component_Details> componentMap = map.GetFqFileComponentDetailsMap();
                    if (componentDetails != null && componentMap != null)
                    {
                        int index = graphicsTrackBar.Value;
                        FqFile_Component_Details details;
                        String chartType = Charts_Combo_Selector.SelectedValue.ToString();

                        if (chartType.Equals(FastqGUI_Charts.FastqChartTypes.PerBaseSequenceStatistics.ToString()))
                        {
                            details = componentMap[componentDetails[index]];
                            drawChart(details, chartType);
                        }
                        else
                        {
                            if (index == 0)
                            {
                                details = FastqController.getInstance().GetFqFileMap().GlobalDetails;
                                drawChart(details, chartType);
                            }
                            else if (index > 0)
                            {
                                details = componentMap[componentDetails[index - 1]];
                                drawChart(details, chartType);
                            }
                        }
                    }
                }
            }
        }