本文整理汇总了C#中Workspace.pullSNPMetaData方法的典型用法代码示例。如果您正苦于以下问题:C# Workspace.pullSNPMetaData方法的具体用法?C# Workspace.pullSNPMetaData怎么用?C# Workspace.pullSNPMetaData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Workspace
的用法示例。
在下文中一共展示了Workspace.pullSNPMetaData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
//.........这里部分代码省略.........
// all required fields and satisfy the user-defined criteria.
try
{
ws.validate( rtConfig.MaxFDR, rtConfig.MinDistinctPeptides, rtConfig.MaxAmbiguousIds );
} catch( Exception e )
{
Console.Error.WriteLine( "Error while validating workspace: " + e.Message );
return;
}
#endregion
#region SNP annotation stuff (TODO: move this into a Workspace function)
if( rtConfig.FlagUnknownMods.Length > 0 )
{
string[] toks = rtConfig.FlagUnknownMods.Split( new char[] { ' ' } );
if( toks.Length % 2 == 0 )
{
ws.knownModMasses = new float[toks.Length / 2];
ws.knownModResidues = new char[toks.Length / 2];
int index = 0;
for( int i = 0; i < toks.Length - 1; i = i + 2 )
{
ws.knownModResidues[index] = toks[i][0];
ws.knownModMasses[index] = (float) Convert.ToDouble( toks[i + 1] );
++index;
}
}
}
// If the user wants to annotate the SNPs found in the
// dataset then pull the annotations.
if( rtConfig.AnnotateSNPs.Length > 0 )
{
ws.pullSNPMetaData( rtConfig.AnnotateSNPs );
}
#endregion
// Make an output folder and generate files
Console.WriteLine( "Creating output directory for report: " + rtConfig.outputDir );
if( !Directory.Exists( rtConfig.outputDir ) )
Directory.CreateDirectory( rtConfig.outputDir );
Directory.SetCurrentDirectory( rtConfig.outputDir );
StreamWriter outputStream;
#region Web report
if( rtConfig.OutputWebReport )
{
string reportIndexFilename = "index.html";
string idpickerJavascriptFilename = "idpicker-scripts.js";
string idpickerStylesheetFilename = "idpicker-style.css";
string navFrameFilename = rtConfig.outputPrefix + "-nav.html";
string wsSummaryFilename = rtConfig.outputPrefix + "-summary.html";
string wsDataProcessingDetailsFilename = rtConfig.outputPrefix + "-processing.html";
string wsIndexByProteinFilename = rtConfig.outputPrefix + "-index-by-protein.html";
string wsIndexBySpectrumFilename = rtConfig.outputPrefix + "-index-by-spectrum.html";
string wsIndexByModificationFilename = rtConfig.outputPrefix + "-index-by-modification.html";
string wsGroupsFilename = rtConfig.outputPrefix + "-groups.html";
string wsSequencesPerProteinByGroupFilename = rtConfig.outputPrefix + "-sequences-per-protein-by-group.html";
string wsSpectraPerProteinByGroupFilename = rtConfig.outputPrefix + "-spectra-per-protein-by-group.html";
string wsSpectraPerPeptideByGroupFilename = rtConfig.outputPrefix + "-spectra-per-peptide-by-group.html";
try
{
Console.WriteLine( "Writing report index: " + reportIndexFilename );
outputStream = new StreamWriter( reportIndexFilename );