当前位置: 首页>>代码示例>>C#>>正文


C# Workspace.assemblePeptidesXmlToStream方法代码示例

本文整理汇总了C#中Workspace.assemblePeptidesXmlToStream方法的典型用法代码示例。如果您正苦于以下问题:C# Workspace.assemblePeptidesXmlToStream方法的具体用法?C# Workspace.assemblePeptidesXmlToStream怎么用?C# Workspace.assemblePeptidesXmlToStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Workspace的用法示例。


在下文中一共展示了Workspace.assemblePeptidesXmlToStream方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Main


//.........这里部分代码省略.........

                string rootInputDirectory;
                Util.LongestCommonPrefix(inputFilepaths, out rootInputDirectory);
                if (String.IsNullOrEmpty(rootInputDirectory))
                    rootInputDirectory = Directory.GetCurrentDirectory();
                else if (!Directory.Exists(rootInputDirectory))
                    rootInputDirectory = Path.GetDirectoryName(rootInputDirectory);

                QuantifyingTransmogrifier.quantify(ws, rootInputDirectory, rtConfig.quantitationMethod);

                try
                {
                    Console.WriteLine( "Writing overall summary to filepath: " + wsSummaryFilename );
                    outputStream = new StreamWriter( wsSummaryFilename );
                    Presentation.exportSummaryTable( ws, outputStream, rtConfig.outputPrefix, '\t' );
                    outputStream.Close();
                } catch( Exception e )
                {
                    Console.Error.WriteLine( "\nError writing overall summary: " + e.Message );
                }

                Console.WriteLine( "Writing sequences per protein table to filepath: " + wsSequencesPerProteinByGroupFilename );
                try
                {
                    outputStream = new StreamWriter( wsSequencesPerProteinByGroupFilename );
                    Presentation.exportProteinSequencesTable( ws, outputStream, rtConfig.outputPrefix, '\t' );
                    outputStream.Close();
                } catch( Exception e )
                {
                    Console.Error.WriteLine( "\nError writing sequences per protein table: " + e.Message );
                }

                try
                {
                    Console.WriteLine( "Writing spectra per protein table to filepath: " + wsSpectraPerProteinByGroupFilename );
                    outputStream = new StreamWriter( wsSpectraPerProteinByGroupFilename );
                    Presentation.exportProteinSpectraTable( ws, outputStream, rtConfig.outputPrefix, '\t' );
                    outputStream.Close();
                } catch( Exception e )
                {
                    Console.Error.WriteLine( "\nError writing spectra per protein table: " + e.Message );
                }

                try
                {
                    Console.WriteLine( "Writing spectra per peptide table to filepath: " + wsSpectraPerPeptideByGroupFilename );
                    outputStream = new StreamWriter( wsSpectraPerPeptideByGroupFilename );
                    Presentation.exportPeptideSpectraTable(ws, outputStream, rtConfig.outputPrefix, rtConfig.quantitationMethod, '\t');
                    outputStream.Close();
                } catch( Exception e )
                {
                    Console.Error.WriteLine( "\nError writing spectra per peptide table: " + e.Message );
                }

                try
                {
                    Console.WriteLine( "Writing spectra table to filepath: " + wsSpectraTableFilename );
                    outputStream = new StreamWriter( wsSpectraTableFilename );
                    Presentation.exportSpectraTable( ws, outputStream, rtConfig.outputPrefix, rtConfig.quantitationMethod, '\t' );
                    outputStream.Close();
                } catch( Exception e )
                {
                    Console.Error.WriteLine( "\nError writing spectra table: " + e.Message );
                }

                try
                {
                    Console.WriteLine( "Writing protein group to peptide group table to filepath: " + wsProteinGroupToPeptideGroupFilename );
                    outputStream = new StreamWriter( wsProteinGroupToPeptideGroupFilename );
                    Presentation.exportProteinGroupToPeptideGroupTable( ws, outputStream, '\t' );
                    outputStream.Close();
                } catch( Exception e )
                {
                    Console.Error.WriteLine( "\nError protein group to peptide group table: " + e.Message );
                }

                try
                {
                    Console.WriteLine( "Writing spectra per peptide group table to filepath: " + wsSpectraPerPeptideGroupFilename );
                    outputStream = new StreamWriter(wsSpectraPerPeptideGroupFilename);
                    Presentation.exportPeptideGroupSpectraTable(ws, outputStream, rtConfig.outputPrefix, rtConfig.quantitationMethod, '\t');
                    outputStream.Close();
                }
                catch (Exception e)
                {
                    Console.Error.WriteLine( "\nError spectra per peptide group table: " + e.Message );
                }
            }
            #endregion

            #region Xml report
            if( rtConfig.OutputXmlReport )
            {
                string wsAssembledXmlFilename = rtConfig.outputPrefix + "-assembled.idpXML";
                outputStream = new StreamWriter( wsAssembledXmlFilename );
                ws.assemblePeptidesXmlToStream( outputStream );
                outputStream.Close();
            }
            #endregion
        }
开发者ID:hap-adong,项目名称:IDPicker,代码行数:101,代码来源:Program.cs


注:本文中的Workspace.assemblePeptidesXmlToStream方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。