public void Combine_FqFile_Component_DetailsScores(FqFile_Component_Details inputDetails)
        {
            this.sequencerType       = inputDetails.sequencerType;
            this.TotalNucs          += inputDetails.TotalNucs;
            this.TotalSequences     += inputDetails.TotalSequences;
            this.NucleotidesCleaned += inputDetails.NucleotidesCleaned;
            this.NCount             += inputDetails.NCount;
            this.CCount             += inputDetails.CCount;
            this.GCount             += inputDetails.GCount;
            this.SequencesRemoved   += inputDetails.SequencesRemoved;

            if (inputDetails.MaxSeqSize > this.MaxSeqSize)
            {
                this.MaxSeqSize = inputDetails.MaxSeqSize;
            }

            if (this.MinSeqSize == 0)
            {
                this.MinSeqSize = inputDetails.MinSeqSize;
            }
            else if (inputDetails.MinSeqSize < this.MinSeqSize)
            {
                this.MinSeqSize = inputDetails.MinSeqSize;
            }

            CalculatePercents();
            CombineDistributionLists(inputDetails.Distribution);
            CombineSequenceLengthDistributionLists(inputDetails.SequenceLengthDistribution);
        }
예제 #2
0
 private void drawChart(FqFile_Component_Details drawDetails, String chartType)
 {
     if (FastqController.CONTROLLER_STATE == FastqController.FastqControllerState.STATE_READY)
     {
         Console.WriteLine("Detail to draw: {0} With {1}", drawDetails.FileName, chartType);
         charts.DrawCurrentChartSelection(drawDetails, chartType, zedGraphControl1);
     }
 }
예제 #3
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;
        }
예제 #4
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");
            }
        }
예제 #5
0
        public void CalculateGlobalFileScores()
        {
            GlobalDetails = new FqFile_Component_Details();

            for (int i = 0; i < fqFileDirectories.Count; i++)
            {
                FqFile_Component_Details currentDetails = ComponentMap[fqFileDirectories[i]];

                GlobalDetails.Combine_FqFile_Component_DetailsScores(currentDetails);
            }
        }
        /// <summary>
        /// This method called from the GUI decides which chart to draw and is generally called from the GUI.  It checks that the chart type 
        /// and component details to be drawn are not already the current ones available within the class and then draws
        /// a graph based on the chart type string that corresponds to the enum FastqChartTypes within this class.
        /// </summary>
        /// <param name="details">Current details to draw</param>
        /// <param name="chartType">The chart type to draw, based on the enum FastqChartTypes</param>
        /// <param name="chart">The ZedGraph control panel. ie the panel the charts are to be drawn on</param>
        public void DrawCurrentChartSelection(FqFile_Component_Details details, String chartType, ZedGraphControl chart)
        {
            if (!chartType.Equals(currentChartType) || !details.Equals(componentDetails))
            {
                this.componentDetails = details;
                this.currentChartType = chartType;
                this.graphControl = chart;

                Console.WriteLine("Drawing new chart");
                if (currentChartType == FastqChartTypes.PerBaseSequenceStatistics.ToString())
                    DrawSequenceStatistics();
                else if (currentChartType == FastqChartTypes.Distribution.ToString())
                    DrawDistribution();
                else if (currentChartType == FastqChartTypes.SequenceLengthDistribution.ToString())
                    DrawSequenceLengthDistribution();
            }
        }
        /// <summary>
        /// This method called from the GUI decides which chart to draw and is generally called from the GUI.  It checks that the chart type
        /// and component details to be drawn are not already the current ones available within the class and then draws
        /// a graph based on the chart type string that corresponds to the enum FastqChartTypes within this class.
        /// </summary>
        /// <param name="details">Current details to draw</param>
        /// <param name="chartType">The chart type to draw, based on the enum FastqChartTypes</param>
        /// <param name="chart">The ZedGraph control panel. ie the panel the charts are to be drawn on</param>
        public void DrawCurrentChartSelection(FqFile_Component_Details details, String chartType, ZedGraphControl chart)
        {
            if (!chartType.Equals(currentChartType) || !details.Equals(componentDetails))
            {
                this.componentDetails = details;
                this.currentChartType = chartType;
                this.graphControl     = chart;

                Console.WriteLine("Drawing new chart");
                if (currentChartType == FastqChartTypes.PerBaseSequenceStatistics.ToString())
                {
                    DrawSequenceStatistics();
                }
                else if (currentChartType == FastqChartTypes.Distribution.ToString())
                {
                    DrawDistribution();
                }
                else if (currentChartType == FastqChartTypes.SequenceLengthDistribution.ToString())
                {
                    DrawSequenceLengthDistribution();
                }
            }
        }
 private void drawChart(FqFile_Component_Details drawDetails, String chartType)
 {
     if (FastqController.CONTROLLER_STATE == FastqController.FastqControllerState.STATE_READY)
     {
         Console.WriteLine("Detail to draw: {0} With {1}", drawDetails.FileName, chartType);
         charts.DrawCurrentChartSelection(drawDetails, chartType, zedGraphControl1);
     }
 }
        public void CalculateGlobalFileScores()
        {
            GlobalDetails = new FqFile_Component_Details();

            for (int i = 0; i < fqFileDirectories.Count; i++)
            {
                FqFile_Component_Details currentDetails = ComponentMap[fqFileDirectories[i]];

                GlobalDetails.Combine_FqFile_Component_DetailsScores(currentDetails);
            }
        }
        /// <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;
        }
        public void Combine_FqFile_Component_DetailsScores(FqFile_Component_Details inputDetails)
        {
            this.sequencerType = inputDetails.sequencerType;
            this.TotalNucs += inputDetails.TotalNucs;
            this.TotalSequences += inputDetails.TotalSequences;
            this.NucleotidesCleaned += inputDetails.NucleotidesCleaned;
            this.NCount += inputDetails.NCount;
            this.CCount += inputDetails.CCount;
            this.GCount += inputDetails.GCount;
            this.SequencesRemoved += inputDetails.SequencesRemoved;

            if (inputDetails.MaxSeqSize > this.MaxSeqSize)
                this.MaxSeqSize = inputDetails.MaxSeqSize;

            if (this.MinSeqSize == 0)
                this.MinSeqSize = inputDetails.MinSeqSize;
            else if (inputDetails.MinSeqSize < this.MinSeqSize)
                this.MinSeqSize = inputDetails.MinSeqSize;

            CalculatePercents();
            CombineDistributionLists(inputDetails.Distribution);
            CombineSequenceLengthDistributionLists(inputDetails.SequenceLengthDistribution);
        }