コード例 #1
0
        protected override void WriteTransition(TextWriter writer,
                                                XmlFastaSequence sequence,
                                                XmlPeptide peptide,
                                                XmlTransition transition)
        {
            char separator = TextUtil.GetCsvSeparator(_cultureInfo);

            writer.Write(transition.PrecursorMz.ToString(_cultureInfo));
            writer.Write(separator);
            writer.Write(transition.ProductMz.ToString(_cultureInfo));
            writer.Write(separator);
            writer.Write(Math.Round(transition.CollisionEnergy, 1).ToString(_cultureInfo));
            writer.Write(separator);
            if (MethodType == ExportMethodType.Scheduled)
            {
                if (!transition.StartRT.HasValue || !transition.StopRT.HasValue)
                {
                    throw new InvalidOperationException(Resources.XmlThermoMassListExporter_WriteTransition_Attempt_to_write_scheduling_parameters_failed);
                }
                writer.Write(transition.StartRT.Value.ToString(_cultureInfo));
                writer.Write(separator);
                writer.Write(transition.StopRT.Value.ToString(_cultureInfo));
                writer.Write(separator);
                writer.Write('1'); // Not L10N
                writer.Write(separator);
            }
            writer.Write(peptide.Sequence);
            writer.Write(separator);
            writer.Write(sequence.Name);
            writer.WriteLine();
        }
コード例 #2
0
        protected override void WriteTransition(TextWriter writer,
                                                XmlFastaSequence sequence,
                                                XmlPeptide peptide,
                                                XmlTransition transition)
        {
            char separator = TextUtil.GetCsvSeparator(_cultureInfo);

            writer.Write(transition.PrecursorMz.ToString(_cultureInfo));
            writer.Write(separator);
            writer.Write(transition.ProductMz.ToString(_cultureInfo));
            writer.Write(separator);
            if (MethodType == ExportMethodType.Standard)
            {
                writer.Write(Math.Round(DwellTime, 2).ToString(_cultureInfo));
            }
            else
            {
                if (!peptide.PredictedRetentionTime.HasValue)
                {
                    throw new InvalidOperationException(Resources.XmlThermoMassListExporter_WriteTransition_Attempt_to_write_scheduling_parameters_failed);
                }
                writer.Write(peptide.PredictedRetentionTime.Value.ToString(_cultureInfo));
            }
            writer.Write(separator);

            // Write special ID for ABI software
            var    fastaSequence       = new FastaSequence(sequence.Name, sequence.Description, null, peptide.Sequence);
            var    newPeptide          = new Peptide(fastaSequence, peptide.Sequence, 0, peptide.Sequence.Length, peptide.MissedCleavages);
            var    nodePep             = new PeptideDocNode(newPeptide);
            string modifiedPepSequence = AbiMassListExporter.GetSequenceWithModsString(nodePep, _document.Settings); // Not L10N;

            string extPeptideId = string.Format("{0}.{1}.{2}.{3}",                                                   // Not L10N
                                                sequence.Name,
                                                modifiedPepSequence,
                                                GetTransitionName(transition),
                                                "light"); // Not L10N : file format

            writer.WriteDsvField(extPeptideId, separator);
            writer.Write(separator);
            writer.Write(Math.Round(transition.DeclusteringPotential ?? 0, 1).ToString(_cultureInfo));

            writer.Write(separator);
            writer.Write(Math.Round(transition.CollisionEnergy, 1).ToString(_cultureInfo));


            writer.WriteLine();
        }
コード例 #3
0
ファイル: XmlExport.cs プロジェクト: lgatto/proteowizard
        protected override void WriteTransition(TextWriter writer,
            XmlFastaSequence sequence,
            XmlPeptide peptide,
            XmlTransition transition)
        {
            char separator = TextUtil.GetCsvSeparator(_cultureInfo);
            writer.Write(transition.PrecursorMz.ToString(_cultureInfo));
            writer.Write(separator);
            writer.Write(transition.ProductMz.ToString(_cultureInfo));
            writer.Write(separator);
            if (MethodType == ExportMethodType.Standard)
                writer.Write(Math.Round(DwellTime, 2).ToString(_cultureInfo));
            else
            {
                if (!peptide.PredictedRetentionTime.HasValue)
                    throw new InvalidOperationException(Resources.XmlThermoMassListExporter_WriteTransition_Attempt_to_write_scheduling_parameters_failed);
                writer.Write(peptide.PredictedRetentionTime.Value.ToString(_cultureInfo));
            }
            writer.Write(separator);

            // Write special ID for ABI software
            var fastaSequence = new FastaSequence(sequence.Name, sequence.Description, null, peptide.Sequence);
            var newPeptide = new Peptide(fastaSequence, peptide.Sequence, 0, peptide.Sequence.Length, peptide.MissedCleavages);
            var nodePep = new PeptideDocNode(newPeptide);
            string modifiedPepSequence = AbiMassListExporter.GetSequenceWithModsString(nodePep, _document.Settings); // Not L10N;

            string extPeptideId = string.Format("{0}.{1}.{2}.{3}", // Not L10N
                                                sequence.Name,
                                                modifiedPepSequence,
                                                GetTransitionName(transition),
                                                "light"); // Not L10N : file format

            writer.WriteDsvField(extPeptideId, separator);
            writer.Write(separator);
            writer.Write(Math.Round(transition.DeclusteringPotential ?? 0, 1).ToString(_cultureInfo));

            writer.Write(separator);
            writer.Write(Math.Round(transition.CollisionEnergy, 1).ToString(_cultureInfo));

            writer.WriteLine();
        }
コード例 #4
0
 protected abstract void WriteTransition(TextWriter writer,
                                         XmlFastaSequence sequence,
                                         XmlPeptide peptide,
                                         XmlTransition transition);
コード例 #5
0
ファイル: XmlExport.cs プロジェクト: lgatto/proteowizard
 protected override void WriteTransition(TextWriter writer,
     XmlFastaSequence sequence,
     XmlPeptide peptide,
     XmlTransition transition)
 {
     char separator = TextUtil.GetCsvSeparator(_cultureInfo);
     writer.Write(transition.PrecursorMz.ToString(_cultureInfo));
     writer.Write(separator);
     writer.Write(transition.ProductMz.ToString(_cultureInfo));
     writer.Write(separator);
     writer.Write(Math.Round(transition.CollisionEnergy, 1).ToString(_cultureInfo));
     writer.Write(separator);
     if (MethodType == ExportMethodType.Scheduled)
     {
         if (!transition.StartRT.HasValue || !transition.StopRT.HasValue)
             throw new InvalidOperationException(Resources.XmlThermoMassListExporter_WriteTransition_Attempt_to_write_scheduling_parameters_failed);
         writer.Write(transition.StartRT.Value.ToString(_cultureInfo));
         writer.Write(separator);
         writer.Write(transition.StopRT.Value.ToString(_cultureInfo));
         writer.Write(separator);
         writer.Write('1'); // Not L10N
         writer.Write(separator);
     }
     writer.Write(peptide.Sequence);
     writer.Write(separator);
     writer.Write(sequence.Name);
     writer.WriteLine();
 }
コード例 #6
0
ファイル: XmlExport.cs プロジェクト: lgatto/proteowizard
 protected abstract void WriteTransition(TextWriter writer,
     XmlFastaSequence sequence,
     XmlPeptide peptide,
     XmlTransition transition);
コード例 #7
0
ファイル: XmlSrmDocument.cs プロジェクト: lgatto/proteowizard
        public const string EXT = "sky"; // Not L10N

        #endregion Fields

        #region Constructors

        public XmlSrmDocument(SrmSettings settings, XmlFastaSequence[] proteins)
        {
            Settings = settings;
            Proteins = proteins;
        }