PENELOPE软件包的移植与应用实例
o2plsda软件包说明书

Package‘o2plsda’October14,2022Type PackageTitle Multiomics Data IntegrationVersion0.0.18Description Provides functions to do'O2PLS-DA'analysis for multiple omics data integration.The algorithm came from``O2-PLS,a two-block(X±Y)latent variable regression(LVR)method with an integral OSCfilter''which published by Johan Trygg and Svante Wold at2003<doi:10.1002/cem.775>.'O2PLS'is a bidirectional multivariate regression method that aims to separate the covariance be-tweentwo data sets(it was recently extended to multiple data sets)(Löfst-edt and Trygg,2011<doi:10.1002/cem.1388>;Löfst-edt et al.,2012<doi:10.1016/j.aca.2013.06.026>)from the systematic sources of variance being specific for each data set separately.License GPL-3Imports Rcpp(>=1.0.7),dplyr,magrittr,parallel,ggplot2,ggrepel,methods,statsDependsEncoding UTF-8Suggests knitr,markdown,rmarkdownVignetteBuilder knitrLinkingTo Rcpp,RcppArmadilloRoxygenNote7.1.2NeedsCompilation yesRepository CRANAuthor Kai Guo[aut,cre],Junguk Hur[aut],Eva Feldman[aut]Maintainer Kai Guo<*****************>Date/Publication2022-08-1207:10:02UTC12loadings R topics documented:loadings (2)loadings.o2plsda (3)loadings.plsda (3)o2cv (4)o2pls (5)O2pls-class (7)oplsda (7)plot.O2pls (8)plot.o2plsda (10)plot.plsda (11)plsda (12)print.O2pls (14)print.plsda (14)scores (15)scores.O2pls (15)scores.o2plsda (16)scores.plsda (16)summary.O2pls (17)summary.plsda (18)vip (18)Index20 loadings Extract the loadings from an O2PLSfitDescriptionThis function extracts loading parameters from an O2PLSfitThis function extracts loading parameters from an O2PLSfitUsageloadings(x,...)##S3method for class O2plsloadings(x,loading=c("Xjoint","Yjoint","Xorth","Yorth"),...)Argumentsx Object of class O2pls...For consistencyloading the loadings for one of"Xjoint","Yjoint","Xorth","Yorth"loadings.o2plsda3 ValueLoading matrixLoading matrixloadings.o2plsda extract the loading value from the O2PLSDA analysisDescriptionextract the loading value from the O2PLSDA analysisUsage##S3method for class o2plsdaloadings(x,loading="Xloading",...)Argumentsx Object of class o2plsdaloading the loadings for one of"Xjoint","Yjoint","Xorth","Yorth"...For consistencyloadings.plsda extract the loading value from the PLSDA analysisDescriptionextract the loading value from the PLSDA analysisUsage##S3method for class plsdaloadings(x,...)Argumentsx Object of class plsda...For consistency4o2cv o2cv Cross validation for O2PLSDescriptionCross validation for O2PLSUsageo2cv(X,Y,nc,nx,ny,group=NULL,nr_folds=5,ncores=1,scale=FALSE,center=FALSE)ArgumentsX a Numeric matrix(input)Y a Numeric matrix(input)nc Integer.Number of joint PLS components.nx Integer.Number of orthogonal components in Xny Integer.Number of orthogonal components in Ygroup a vector to indicate the group for Ynr_folds Integer to indicate the folds for cross validationncores Integer.Number of CPUs to use for cross validationscale boolean values determining if data should be scaled or notcenter boolean values determining if data should be centered or notValuea data frame with the Q and RMSE valuesAuthor(s)Kai GuoExamplesset.seed(123)X=matrix(rnorm(500),50,10)Y=matrix(rnorm(500),50,10)X=scale(X,scale=TRUE)Y=scale(Y,scale=TRUE)#group factor could be omitted if you don t have any groupgroup<-rep(c("Ctrl","Treat"),each=25)cv<-o2cv(X,Y,1:2,1:2,1:2,group=group,nr_folds=2,ncores=1)o2plsfit O2PLS model with best nc,nx,nyDescriptionfit O2PLS model with best nc,nx,nyUsageo2pls(X,Y,nc,nx,ny,scale=FALSE,center=FALSE) ArgumentsX a Numeric matrix(input)Y a Numeric matrix(input)nc Integer.Number of joint PLS components.nx Integer.Number of orthogonal components in Xny Integer.Number of orthogonal components in Yscale boolean values determining if data should be scaled or not center boolean values determining if data should be centered or not ValueAn object containingXscore Joint X scoresXloading Joint X loadingsYscore Joint Y scoresYloading Joint Y loadingsTYosc Orthogonal X scoresPYosc Orthogonal X loadingsWYosc Orthogonal X weightsUXosc Orthogonal Y scoresPXosc Orthogonal Y loadingsCXosc Orthogonal Y weightsBU Regression coefficient in Tt~UBT Regression coefficient in U~TtR2Xhat Prediction of X with YR2Yhat Prediction of Y with XR2X Variation of the modeled part in X(defined by Joint+Orthogonal variation)as proportion of total variation in XR2Y Variation of the modeled part in Y(defined by Joint+Orthogonal variation)as proportion of total variation in YR2Xcorr Variation of the joint part in XR2Ycorr Variation of the joint part in YR2Xo Variation of the orthogonal part in X as proportion of variation in XR2Yo Variation of the orthogonal part in Y as proportion of variation in YR2Xp Variation in X joint part predicted by Y Joint partR2Yp Variation in Y joint part predicted by X Joint partvarXj Variation in each Latent Variable(LV)in X Joint partvarYj Variation in each Latent Variable(LV)in Y Joint partvarXorth Variation in each Latent Variable(LV)in X Orthogonal partvarYorth Variation in each Latent Variable(LV)in Y Orthogonal partExy Residuals in XFxy Residuals in YAuthor(s)Kai GuoExamplesset.seed(123)X=matrix(rnorm(500),50,10)Y=matrix(rnorm(500),50,10)X=scale(X,scale=TRUE)Y=scale(Y,scale=TRUE)fit<-o2pls(X,Y,1,2,2)summary(fit)O2pls-class7 O2pls-class Class"O2pls"This class represents the Annotation informationDescriptionClass"O2pls"This class represents the Annotation informationSlotsX a Numeric matrix(input)Y a Numeric matrix(input)params paramaters ysed in o2pls analysisresults list of o2pls resultsAuthor(s)Kai Guooplsda Orthogonal partial least squares discriminant analysisDescriptionComputes orthogonal scores partial least squares regressions with the NIPALS algorithm.It returna comprehensive set of pls outputs(e.g.scores and vip).Usageoplsda(X,Y,nc,scale=FALSE,center=TRUE,maxiter=100,tol=1e-05)ArgumentsX a O2pls object or a matrix of predictor variables.Y a single vector indicate the groupnc the number of pls components(the one joint components+number of orthogo-nal components).scale logical indicating whether X must be scaled(suggest TRUE).center boolean values determining if data should be centered or notmaxiter maximum number of iterations.tol limit for convergence of the algorithm in the nipals algorithm.Valuea list containing the following elements:•nc the number of components used(one joint components+number of orthogonal components •scores a matrix of scores corresponding to the observations in X,The components retrieved correspond to the ones optimized or specified.•Xloadings a matrix of loadings corresponding to the explanatory variables.The components retrieved correspond to the ones optimized or specified.•Yloadings a matrix of partial least squares loadings corresponding to Y•vip the VIP matrix.•xvar a matrix indicating the standard deviation of each component(sd),the variance ex-plained by each single component(explained_var)and the cumulative explained variance(cu-mulative_explained_var).These values are computed based on the data used to create the projection matrices.•projection_matrix the matrix of projection matrix•weight a matrix of partial least squares("pls")weights.Author(s)Kai GuoExamplesX<-matrix(rnorm(50),10,5)Y<-matrix(rnorm(50),10,5)fit<-o2pls(X,Y,2,1,1)yy<-rep(c(0,1),5)fit0<-oplsda(fit,yy,2)plot.O2pls Score or loading plot for the O2PLS resultsDescriptionScore or loading plot for the O2PLS resultsUsage##S3method for class O2plsplot(x,type="score",var="Xjoint",group=NULL,ind=c(1,2),color=NULL,top=20,ellipse=TRUE,order=FALSE,pt.size=3,label=TRUE,label.size=4,repel=TRUE,rotation=FALSE,...)Argumentsx an O2pls objecttype score or loadingvar specify Xjointgroup color used for score plotind which components to be used for score plot or loading plot color color used for score or loading plottop the number of largest loading value to plotellipse TRUE/FALSEorder order by the value or notpt.size point sizelabel plot label or not(TRUE/FALSE)label.size label sizerepel use ggrepel to show the label or notrotationflip thefigure or not(TRUE/FALSE)...For consistencyValuea ggplot2objectAuthor(s)Kai GuoExamplesX<-matrix(rnorm(50),10,5)Y<-matrix(rnorm(50),10,5)fit<-o2pls(X,Y,2,1,1)plot(fit,type="score")plot.o2plsda Score,VIP or loading plot for the O2PLS resultsDescriptionScore,VIP or loading plot for the O2PLS resultsUsage##S3method for class o2plsdaplot(x,type="score",var="Xjoint",group=NULL,ind=c(1,2),color=NULL,top=20,ellipse=TRUE,order=FALSE,pt.size=3,label=TRUE,label.size=4,repel=FALSE,rotation=FALSE,...)Argumentsx an o2plsda objecttype score,vip or loadingvar specify Xjointgroup color used for score plotind which components to be used for score plot or loading plot color color used for score or loading plottop the number of largest loading value to plotellipse TRUE/FALSEorder order by the value or notpt.size point sizelabel plot label or not(TRUE/FALSE)label.size label sizerepel use ggrepel to show the label or notrotationflip thefigure or not(TRUE/FALSE)...For consistencyplot.plsda11 Valuea ggplot2objectAuthor(s)Kai GuoExamplesX<-matrix(rnorm(50),10,5)Y<-matrix(rnorm(50),10,5)fit<-o2pls(X,Y,2,1,1)yy<-rep(c(0,1),5)fit0<-oplsda(fit,yy,2)plot(fit0,type="score",group=factor(yy))plot.plsda Score,VIP or loading plot for the plsda resultsDescriptionScore,VIP or loading plot for the plsda resultsUsage##S3method for class plsdaplot(x,type="score",group=NULL,ind=c(1,2),color=NULL,top=20,ellipse=TRUE,order=FALSE,pt.size=3,label=TRUE,label.size=4,repel=FALSE,rotation=FALSE,...)Argumentsx an plsda objecttype score,vip or loadinggroup color used for score plotind which components to be used for score plot or loading plotcolor color used for score or loading plottop the number of largest loading value to plotellipse TRUE/FALSEorder order by the value or notpt.size point sizelabel plot label or not(TRUE/FALSE)label.size label sizerepel use ggrepel to show the label or notrotationflip thefigure or not(TRUE/FALSE)...For consistencyValuea ggplot2objectAuthor(s)Kai GuoExamplesX<-matrix(rnorm(500),10,50)Y<-rep(c("a","b"),each=5)fit0<-plsda(X,Y,2)plot(fit0,type="score",group=factor(Y))plsda Partial least squares discriminant analysisDescriptionPerform a PLS discriminant analysisUsageplsda(X,Y,nc,scale=TRUE,center=TRUE,cv=TRUE,nr_folds=5)ArgumentsX a matrix of predictor variables.Y a single vector indicate the groupnc the number of pls components(the one joint components+number of orthogo-nal components).scale logical indicating whether X must be scaled(suggest TRUE).center logical indicating whether X must be centered(suggest TRUE).cv logical indicating whether cross-validation will be performed or not(suggest TRUE).nr_folds nr_folds Integer to indicate the folds for cross validation.Valuea list containing the following elements:•nc the number of components used(one joint components+number of orthogonal components •scores a matrix of scores corresponding to the observations in X,The components retrieved correspond to the ones optimized or specified.•Xloadings a matrix of loadings corresponding to the explanatory variables.The components retrieved correspond to the ones optimized or specified.•vip the VIP matrix.•xvar variance explained of X by each single component.•R2Y variance explained of Y by each single component.•codePRESSThe residual sum of squares for the samples which were not used tofit the model •codeQ2quality of cross-validationAuthor(s)Kai GuoExamplesX<-matrix(rnorm(500),10,50)Y<-rep(c("a","b"),each=5)fit<-plsda(X,Y,2)14print.plsda print.O2pls Print the summary of O2PLS results.DescriptionPrint the summary of O2PLS results.Usage##S3method for class O2plsprint(x,...)Argumentsx An O2pls object...For consistencyAuthor(s)Kai GuoExamplesX<-matrix(rnorm(50),10,5)Y<-matrix(rnorm(50),10,5)object<-o2pls(X,Y,1,1,1)print(object)print.plsda Print the summary of plsda results.DescriptionPrint the summary of plsda results.Usage##S3method for class plsdaprint(x,...)Argumentsx An plsda object...For consistencyscores15Author(s)Kai GuoExamplesX<-matrix(rnorm(500),10,50)Y<-rep(c("a","b"),each=5)fit<-plsda(X,Y,2)print(fit)scores Extract the scores from an O2PLSfitDescriptionThis function extracts score matrices from an O2PLSfitUsagescores(x,...)Argumentsx Object of class O2pls...For consistencyValueScores matrixscores.O2pls Extract the scores from an O2PLSfitDescriptionThis function extracts scores parameters from an O2PLSfitUsage##S3method for class O2plsscores(x,score=c("Xjoint","Yjoint","Xorth","Yorth"),...)Argumentsx Object of class O2plsscore the scores matrix for one of"Xjoint","Yjoint","Xorth","Yorth"...Other arguments16scores.plsdaValuescore matrixscores.o2plsda Extract the scores from an O2PLS DA analysisDescriptionExtract the scores from an O2PLS DA analysisUsage##S3method for class o2plsdascores(x,...)Argumentsx Object of class o2plsda...Other argumentsValuescore matrixAuthor(s)Kai Guoscores.plsda Extract the scores PLSDA analysisDescriptionExtract the scores PLSDA analysisUsage##S3method for class plsdascores(x,...)Argumentsx Object of class plsda...Other argumentssummary.O2pls17 Valuescore matrixAuthor(s)Kai Guosummary.O2pls Summary of an O2PLS objectDescriptionSummary of an O2PLS objectUsage##S3method for class O2plssummary(object,...)Argumentsobject a O2pls object...For consistencyValueDetail of O2PLS resultsAuthor(s)Kai GuoExamplesX<-matrix(rnorm(50),10,5)Y<-matrix(rnorm(50),10,5)object<-o2pls(X,Y,1,1,1)summary(object)18vip summary.plsda Summary of an plsda objectDescriptionSummary of an plsda objectUsage##S3method for class plsdasummary(object,...)Argumentsobject a plsda object...For consistencyValueDetail of plsda resultsAuthor(s)Kai GuoExamplesX<-matrix(rnorm(500),10,50)Y<-rep(c("a","b"),each=5)fit<-plsda(X,Y,2)summary(fit)vip Extract the VIP values from the O2PLS-DA objectDescriptionExtract the VIP values from the O2PLS-DA objectUsagevip(x)Argumentsx the o2plsda object or plsda objectvip19Valuea data frameIndex∗classesO2pls-class,7loadings,2loadings.o2plsda,3loadings.plsda,3o2cv,4o2pls,5O2pls-class,7oplsda,7plot.O2pls,8plot.o2plsda,10plot.plsda,11plsda,12print.O2pls,14print.plsda,14scores,15scores.O2pls,15scores.o2plsda,16scores.plsda,16summary.O2pls,17summary.plsda,18vip,1820。
PowerPlay应用程序的移植

译制作品怎样移植你的POWERPLAY应用程序中青旅尚洋电子技术有限公司数据仓库事业部王晓刚版权所有©二00四年八月一、移植前的准备工作 (2)1.需要进行COGNOS POWERPLAY 应用移植的若干情况 (2)2.进行移植需做的工作 (3)3.移植前的准备工作 (6)二、将应用程序打包 (6)1. 导出安全认证信息源 (6)2.将Upfront数据打包 (7)2.1将Upfront Data Store打包 (7)2.2拷贝Upfront显示主题 (9)3.拷贝PowerPlay对象 (9)4.将文件移到目标环境中 (10)三、将应用程序解包 (10)1. 导入安全认证信息源 (11)2. 建立到数据源的联接 (11)3.将Upfront数据解包 (12)3.1解包Upfront Data Store (16)3.2修改Upfront显示主题 (18)3.3修改NewsItem的URL (18)3.4修改网关的URL (19)4.更新PowerPlay (19)4.1拷贝PPSRoot目录、CUBE和报表 (20)5. 测试目标环境 (21)一、移植前的准备工作1.需要进行COGNOS POWERPLAY 应用移植的若干情况♦从开发环境向生产环境迁移。
♦从开发环境向测试环境迁移。
♦重新部署到不同的机器。
在生产环境中,由于性能的原因,可能需要将COGNOS POWERPLAY 应用的部分组件分布到不同的计算机上。
你的COGNOS POWERPLAY 应用可能已经安装在一台计算机上,但随着访问用户的激增等原因,可能需要将COGNOS POWERPLAY 应用的一个或几个组件分布到另一台或多台计算机上。
♦改变存储在Upfront Data Store中的名字空间(Namespace)COGNOS POWERPLAY 应用的安全认证源被引用为名字空间(Namespace),因为Upfront在Upfront data store存贮了指向namespace的一个引用,当你改变了名字空间(Namespace),你也必须随之改变Upfront data store中对namespace的引用。
openscenegraph项目案例

在本文中,我将为您撰写一篇关于openscenegraph项目案例的文章。
openscenegraph是一个开源的三维图形和可视化工具包,可用于创建高质量的虚拟现实和增强现实应用程序。
我将从简单的介绍开始,然后逐步深入讨论其项目案例,以帮助您更好地理解这一主题。
1. openscenegraph项目简介openscenegraph是一个强大的三维图形和可视化工具包,具有可伸缩性和高性能。
它广泛用于虚拟现实、增强现实、模拟、游戏开发等领域。
openscenegraph基于C++编程语言开发,提供了丰富的功能和灵活的工具,可以帮助开发人员轻松创建复杂的三维场景和图形效果。
2. openscenegraph项目案例具体来说,openscenegraph可以应用于各种项目中,例如飞行模拟器、医学可视化、工程建模、地理信息系统等。
下面我将为您介绍几个实际的openscenegraph项目案例,以便更好地理解其应用范围和实际效果。
2.1 飞行模拟器openscenegraph被广泛应用于飞行模拟器项目中,它可以模拟真实飞行环境,包括飞机、场景、天气等多个方面。
开发人员可以利用openscenegraph的强大功能,快速构建逼真的飞行模拟器,帮助飞行员进行飞行训练和飞行技能的提升。
2.2 医学可视化在医学领域,openscenegraph可以用于创建高质量的医学可视化工具,用于解剖学教学、手术模拟、病例分析等方面。
通过openscenegraph的渲染和建模技术,医生和学生可以更清晰地观察人体结构、器官功能等内容,有助于提高医学教育和临床实践的效率。
2.3 工程建模在工程领域,openscenegraph可以帮助工程师们进行复杂的工程建模和数据可视化,例如建筑设计、城市规划、工业设计等。
开发人员可以利用openscenegraph的三维建模功能,轻松创建真实的建筑场景,观察工程结构的变化、进行设计优化等工作。
ACNE软件包用户指南说明书

Package‘ACNE’June25,2023Version0.9.0Depends R(>=3.0.0),aroma.affymetrix(>=2.14.0)Imports MASS,R.methodsS3(>=1.7.0),R.oo(>=1.23.0),R.utils(>=2.1.0),matrixStats(>=0.50.0),R.filesets(>=2.9.0),aroma.core(>=2.14.0)Suggests DNAcopyTitle Affymetrix SNP Probe-Summarization using Non-Negative MatrixFactorizationDescription A summarization method to estimate allele-specific copy number signals for Affymetrix SNP microarrays using non-negative matrix factorization(NMF).License LGPL(>=2.1)URL https:///HenrikBengtsson/ACNEBugReports https:///HenrikBengtsson/ACNE/issuesLazyLoad TRUEbiocViews aCGH,CopyNumberVariants,SNP,Microarray,OneChannel,TwoChannel,GeneticsNeedsCompilation noAuthor Maria Ortiz[aut],Henrik Bengtsson[aut,cre,cph],Angel Rubio[aut]Maintainer Henrik Bengtsson<*****************>Repository CRANDate/Publication2023-06-2518:30:02UTCR topics documented:ACNE-package (2)doACNE (2)NmfPlm (3)NmfSnpPlm (5)12doACNEIndex7ACNE-package Package ACNEDescriptionA summarization method to estimate allele-specific copy number signals for Affymetrix SNP mi-croarrays using non-negative matrix factorization(NMF).Installation and updatesThis package requires the aroma.affymetrix package.To install this package,do:install.packages("ACNE") To get started1.For a one-command pipeline,see the doACNE()method.2.For other usages,see the NmfPlm class.LicenseLGPL(>=2.1)Author(s)Maria Ortiz,Henrik Bengtsson,Angel RubioReferences[1]M.Ortiz-Estevez,H.Bengtsson,A.Rubio,ACNE:a summarization method to estimate allele-specific copy numbers for Affymetrix SNP arrays,Bioinformatics,2010[PMC2913655].doACNE(ACNE)Description(ACNE)based on[1].The algorithm is processed in bounded memory,meaning virtually anynumber of arrays can be analyzed on also very limited computer systems.Usage##S3method for class AffymetrixCelSetdoACNE(csR,fln=FALSE,drop=TRUE,verbose=FALSE,...)##Default S3method:doACNE(dataSet,...,verbose=FALSE)ArgumentscsR,dataSet An AffymetrixCelSet(or the name of an AffymetrixCelSet).fln If TRUE,CRMAv2-style PCR fragment-length normalization is performed,oth-erwise not.drop If TRUE,the RMA summaries are returned,otherwise a named list of all inter-mediate andfinal results.verbose See Verbose....Additional arguments used to set up AffymetrixCelSet(when argument dataSet is specified).ValueReturns a named list,iff drop==FALSE,otherwise a named list of AromaUnitTotalCnBinarySet and AromaUnitFracBCnBinarySet.Author(s)Henrik BengtssonReferences[1]M.Ortiz-Estevez,H.Bengtsson,A.Rubio,ACNE:a summarization method to estimate allele-specific copy numbers for Affymetrix SNP arrays,Bioinformatics,2010[PMC2913655]. NmfPlm The NmfPlm classDescriptionPackage:ACNEClass NmfPlmObject~~|~~+--ParametersInterface~~~~~~~|~~~~~~~+--Model~~~~~~~~~~~~|~~~~~~~~~~~~+--UnitModel~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~+--MultiArrayUnitModel~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~+--ProbeLevelModel~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~+--NmfPlmDirectly known subclasses:NmfSnpPlmpublic abstract static class NmfPlmextends ProbeLevelModelThis class represents the NMF model of[REF].UsageNmfPlm(...,maxIter=10L,maxIterRlm=20L,refs=NULL,flavor=c("v4","v3","v2","v1"))Arguments...Arguments passed to ProbeLevelModel.maxIter The maximum number of iteration in the NMF step.maxIterRlm A positive integer specifying the maximum number of iterations used in rlm.refs An index vector(integer or logical)specifying the reference samples.IfNULL,all samples are used as a reference.flavor(Internal/developmental only)A character string specifying which algorithmto use.Fields and MethodsMethods:getAsteriskTags-Methods inherited from ProbeLevelModel:calculateResidualSet,calculateWeights,fit,getAsteriskTags,getCalculateResidualsFunction,getChip-EffectSet,getProbeAffinityFile,getResidualSet,getRootPath,getWeightsSetMethods inherited from MultiArrayUnitModel:getListOfPriors,setListOfPriors,validateMethods inherited from UnitModel:findUnitsTodo,getAsteriskTags,getFitSingleCellUnitFunction,getParametersMethods inherited from Model:as.character,fit,getAlias,getAsteriskTags,getDataSet,getFullName,getName,getPath,getRoot-Path,getTags,setAlias,setTagsMethods inherited from ParametersInterface:getParameterSets,getParameters,getParametersAsStringMethods inherited from Object:$,$<-,[[,[[<-,as.character,attach,attachLocally,clearCache,clearLookupCache,clone,detach,equals,extend,finalize,getEnvironment,getFieldModifier,getFieldModifiers,getFields,getInstan-tiationTime,getStaticInstance,hasField,hashCode,ll,load,names,objectSize,print,save,asThis Author(s)Henrik BengtssonReferences[1]M.Ortiz-Estevez,H.Bengtsson,A.Rubio,ACNE:a summarization method to estimate allele-specific copy numbers for Affymetrix SNP arrays,Bioinformatics,2010[PMC2913655].See AlsoInternally,for each SNP the NMF model isfitted using the fitSnpNmf()function. NmfSnpPlm The NmfSnpPlm classDescriptionPackage:ACNEClass NmfSnpPlmObject~~|~~+--ParametersInterface~~~~~~~|~~~~~~~+--Model~~~~~~~~~~~~|~~~~~~~~~~~~+--UnitModel~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~+--MultiArrayUnitModel~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~+--ProbeLevelModel~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~+--NmfPlm~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--SnpPlm~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--NmfSnpPlmDirectly known subclasses:public abstract static class NmfSnpPlmextends SnpPlmUsageNmfSnpPlm(...,mergeStrands=FALSE)Arguments...Arguments passed to NmfPlm.mergeStrands If TRUE,the sense and the anti-sense strands arefitted together,otherwise sepa-rately.Fields and MethodsMethods:No methods defined.Methods inherited from SnpPlm:getCellIndices,getChipEffectSet,getMergeStrands,getParameters,getProbeAffinityFile,setMergeS-trandsMethods inherited from NmfPlm:getAsteriskTagsMethods inherited from ProbeLevelModel:calculateResidualSet,calculateWeights,fit,getAsteriskTags,getCalculateResidualsFunction,getChip-EffectSet,getProbeAffinityFile,getResidualSet,getRootPath,getWeightsSetMethods inherited from MultiArrayUnitModel:getListOfPriors,setListOfPriors,validateMethods inherited from UnitModel:findUnitsTodo,getAsteriskTags,getFitSingleCellUnitFunction,getParametersMethods inherited from Model:as.character,fit,getAlias,getAsteriskTags,getDataSet,getFullName,getName,getPath,getRoot-Path,getTags,setAlias,setTagsMethods inherited from ParametersInterface:getParameterSets,getParameters,getParametersAsStringMethods inherited from Object:$,$<-,[[,[[<-,as.character,attach,attachLocally,clearCache,clearLookupCache,clone,detach, equals,extend,finalize,getEnvironment,getFieldModifier,getFieldModifiers,getFields,getInstan-tiationTime,getStaticInstance,hasField,hashCode,ll,load,names,objectSize,print,save,asThisAuthor(s)Henrik BengtssonIndex∗classesNmfPlm,3NmfSnpPlm,5∗packageACNE-package,2ACNE(ACNE-package),2ACNE-package,2AffymetrixCelSet,3 AromaUnitFracBCnBinarySet,3 AromaUnitTotalCnBinarySet,3 character,4doACNE,2,2fitSnpNmf,5integer,4list,3logical,4Model,3,5MultiArrayUnitModel,3,5NmfPlm,2,3,5,6NmfSnpPlm,4,5NULL,4Object,3,5ParametersInterface,3,5 ProbeLevelModel,3–5SnpPlm,5,6TRUE,3,6UnitModel,3,5vector,4Verbose,37。
PeneloPET:一种PET专用的蒙特卡罗仿真工具

理 组研 发 的 , 目前 的最 新版 本是 20 0 7年 6月 发 布 的 1 1 本 。P nlP T具 有 以下 特 点 : .版 ee E o
Ma Sx平 台 下运 行 Pn lP T 均 不 会 出现 cO ee E , o
移 植 问题 。 而 另 一 仿 真 软 件 G T 则 不 能 在 A E,
刘豪佳 , 书俊 , 赵 张 斌 , 山虎 周
( 郑州大学 , 河南郑州 4 0 0 ) 50 1
摘要 : ee P T是 一种基 于 P N L P P nl E o E E O E的 P T专用 蒙特卡 罗仿真 工具 。文 章介绍 了 P nlP T E ee E o
的主要特点及使用 Pnl E ee P T进行 P T仿真的一般过程 , 以 G e ha 的双环型 e p r Vs i o E 并 EH a c e h r Xle ia — o tm
收稿 日期 : 1 2 0—1 —0 0 1 5
作者简介: 刘豪佳(95 )女, 1 一 , 河南平顶山 硕士 8 人,
研究生 , 研究方向为核医学图像处理。
1 P n lP T的特点 ee E o
Pnl E ee P T是 由马德 里 康 普 顿 斯 大 学 核 物 。
1 43 l
第3卷 1
21 年 01
第 1 O期
1 0月
核 电子 学与探 测 技术
N c e rE e to is& Dee t n T c n l g u la l cr n c t ci e h oo y o
V I 3 No. 0 o_ l 1 0t 2 c. 0l1
P n lP T:一种 P T专 用 的蒙 特 卡 罗仿 真 工 具 ee E o E
PENELOPE软件包的移植与应用实例

第5卷第3期 上海大学学报(自然科学版) V o l.5,N o.3 1999年6月 JOU RNAL O F SHAN GHA IUN I V ER S IT Y(NA TU RAL SC IEN CE) June1999PENELO PE软件包的移植与应用实例X罗文芸 王传珊 黄 伟 (化学与化工学院) (理学院) 提 要 PEN ELO PE是电子2光子簇射的M on te2Carlo模拟计算软件包(F.Salvat,1996),能量范围为1keV至几百M eV;模拟计算方法为混合模拟,即硬事件的详细模拟与软事件的压缩模拟相结合;有构造简单的几何软件包,能模拟光子2电子在由二次曲面构成的复杂几何体中的输运过程.本文作者在133微机上实现了对PEN ELO PE的移植,并给出了两个应用实例.关键词 M on te2Carlo方法;混合模拟;能量沉积;电子2光子簇射中图法分类号 T P311.54;TL99The Portable of PENELOPE and Appl ied Exam plesL uo W enyun W ang Chuan shan(Schoo l of Chem istry and Chem ical Engineering,ShanghaiU n iversity)H uang W ei(Schoo l of Sciences,ShanghaiU n iversity)Abstract:PEN ELO PE p erfo rm s M on te2Carlo si m u lati on of electron2p ho ton show ers in arb itrary fo r a w ide energy range,from1keV to several hundred M eV.T he m ethod of si m u lati on is a m ixed p rocedu re,w h ich com b ines detailed si m u lati on of hard even ts w ith conden sed si m u lati on of soft in teracti on s.A si m p le geom etry p ackage p erm its the generati on of random electron2p ho ton show ers in m aterial system s con sisting of hom ogeneou s bodies li m ited by quadric su rface.T he po rtab le of th is code and tw o app lied exam p les have been given.Key words:M on te2Carlo m ethod;m ixed si m u lati on;depo sited energy;electron2p ho ton show ers M on te2Carlo方法在粒子输运上的应用是它最成功的应用,多年来M on te2Carlo方法编制的软件和研究论文一直很多,仅对高能电子而言,常用的就有ETRAN[1](B erger,1988)、IT S3[2](H alb leib, 1992)、EGS4[3](N elson,1985)、GEAN T[4](B run, 1986)等.可是,高能电子的详细模拟是有困难的,因为电子在与介质的一次相互作用后损失的能量很小,只有几十个电子伏特量级,这样,一个高能电子在被介质吸收之前与介质相互作用的次数相当巨大,详细模拟效率非常低.多次散射理论的引入,是将给定路程段中的大量事件作为一个整体效应处理,这样的M on te2Carlo模拟叫做压缩(Conden sed) M on te2Carlo方法.基于多次散射的压缩M on te2 Carlo方法是近似的模拟,有系统误差,而且模拟结果与所取步长有关,只有当步长足够小时,计算结果才稳定,故耗费的机时太多.同时过小的步长也可能X收稿日期:1998211226 罗文芸,女,1965年生,硕士,助研;上海大学化学与化工学院射线应用研究所,上海市嘉定区城中路20号(201800)阻止某些相互作用的发生而影响模拟结果的准确性.此外,这种方法在介质存在界面时也会产生新的困难.上述的M on te2Carlo程序都是这种方法.F. Salvat于1988年提出了压缩M on te2Carlo方法与微分截面的解析解相结合的方法,其散射模型是将数值的总截面(阻止本领)和不同相互作用机制下解析的微分截面(对不同反应道)结合起来,因此程序的结构非常简单.在对电子进行模拟时,采用这种混合过程,即对散射角或能量损失大于截止值的硬相互作用事件详细模拟,只要截止值选择适当,每个径迹中的硬事件数是相对较小的,详细模拟完全可行.而对散射角和能量损失都不超过截止值的软相互作用事件用多次散射方法处理.这样,所引起的横向歧离小,跨越界面时的误差也小.这种M on te2Carlo方法,对具有复杂辐射环境和复杂几何条件问题提供了解决方法.我们的目的是建立一个可以方便地在普通微机上实现的高能电子的M on te2Carlo程序,基于PEN ELO PE[5]较之其他程序的优势,故选择了对PEN ELO PE的移植和开发.1 软件移植PEN ELO PE是模拟电子2光子簇射的M on te2 Carlo软件包(F.Salvat,1996),能量范围为1keV 至几百M eV;有很全面的数据库,自然界中存在的92种元素和由其组成的近300种常用材料的有关信息,都有现成的数据可调用,对这300种以外的材料,可以自己生成数据;还有一个灵活可变的几何软件,运行几何软件可以生成任何可以用二次曲面表示的几何体的组合;除此之外,它还有强大的计算功能,对于有复杂结构物体的剂量分布通过一次计算就可以全部得出.整个软件主要由三个程序包和一个数据库组成:(a)模拟程序包该程序包是软件的核心,即主体程序,由几十个子程序组成,模拟电子2光子在介质中的运动历史.(b)几何程序包该程序包主要是解决由于介质的整体不均匀性给电子模拟带来的困难.用它可以检验径迹是否跨界面,自动实现模拟的几何要求.(c)材料程序包该程序包由一个辅助程序M A T ER I AL和若干子程序组成,实现从数值的数据库中提取相关原子的相互作用数据,形成反映介质各种特性的材料数据文件.(d)数据库该数据库除包含序号1~92的92种元素的相互作用截面和核外电子层数据,还附有包括92种元素在内的近三百种不同材料的组成数据.主程序的流程图可由图1表示.图1 主程序流程图我们在通读整个软件包的基础上,对其源程序进行了适当修改,特别是对电子(或光子)入射部分,使其不仅适用点源和面源,也适用于其他复杂几何的入射情况.根据实践,由于模拟过程涉及众多的变量,而且模拟结果的可靠性在很大程度上取决于模拟的初始粒子数是否足够多,因此PEN ELO PE的・412・ 上海大学学报(自然科学版) 第5卷实际运行对所用计算机的内存和速度有比较高的要求.在安装了W I NDOW S 下的FO R TRAN 编译系统、内存容量为32M 的奔腾133微机上,该软件的运行情况是比较理想的.下面给出两个应用实例.2 模拟计算2.1 半无限厚平板介质被模拟的介质由三层组成,第一层钛窗(0.03mm ),第二层空气(10c m ),第三层为半无限厚的平板碳材料;电子能量2M eV ,平行正入射.跟踪10万个入射电子,给出电子在平板碳材料中的能量沉积深度分布,并与实验进行比较,结果符合较好,见图2.图中实验数据摘自参考文献[6].图2 2M eV 电子在碳中的能量沉积分布2.2 电缆选择铝芯交联聚乙烯绝缘架空电缆为模拟对象,电缆的外半径为1c m ,铝芯的半径为0.75c m ,聚乙烯绝缘层厚度为0.25c m .假设加速器产生的电子为平行电子束,能量为2M eV ,在辐照过程中电缆线不进行旋转,即单面辐照,见示意图(图3).图3 电缆截面示意图把绝缘层沿径向从外到里分为5层(layer 1~layer 5),每层厚度为0.05c m ,再沿极角方向(见图3)将每层36等分,算出电子在每个小体积元内能量沉积的平均值,跟踪20万个入射电子后,给出在每层绝缘层中,电子能量沉积沿极角H 的分布情况,见图4.图4 2M eV 电子在电缆绝缘层中能量沉积分布由图4可以看出,绝缘层上表面(0°≤H <180°)最外层(layer 1)电子能量沉积小,而里层(layer 5)反而大,但在近0°和180°处,出现相反现象,外层大里层小.这主要是铝芯背散射的结果,因为背散射系数与原子序数成正比[7],铝的原子序数大于聚乙烯的等效原子序数,受铝芯背散射效应的影响,绝缘层上表面里层的电子能量沉积明显增大,而在近0°和180°处,背散射影响小,则出现相反现象;其次,在电子平行正入射的情况下,根据深度剂量分布规律[8],电子在吸收体中的能量沉积并不是呈线性下降的趋势,而总是呈一个先上升再下降的分布形状(见图2),峰位和宽度与电子能量、吸收体原子序数和阻止本领等因素有关,在本例模拟计算中,由于假设电缆线是受单面辐照,平行电子束只有在上表面正中间的地方可以近似为正入射,其它地方电子的入射情况都只能看作斜入射,能量沉积分布更为复杂.这也是导致上述结果的原因之一.绝缘层下表面(180°≤H <360°)电子能量沉积几乎为零,这表明电子大部分截止在铝芯内,电缆绝缘层下表面基本辐照不到.如果将电缆线不停地进行旋转,电子的入射方向可以近似为沿径向的正入射,加上铝芯的背散射作用,对绝缘层稍厚一些的电缆线,也能基本达到均匀辐照的效果.因此,在辐照・512・第3期 罗文芸等:PEN ELO PE 软件包的移植与应用实例过程中,电缆线的旋转是十分必要的.3 讨 论PEN ELO PE软件包采用混合的M on te2Carlo 模拟方法,把电子与物质的相互作用区分为硬、软碰撞,仅仅对硬碰撞做详细模拟,对软碰撞用多次散射理论模拟,这样可以相应缩短机时,提高计算效率,同时,混合模拟使介质中界面的处理也变得十分容易,当电子在两次硬碰撞之间遇到界面时,自动调整步长,使电子停止在界面处,调用新材料的有关信息后,再继续模拟下一次碰撞,这样处理在程序上容易实现,对复杂几何体的模拟也能得到比较准确的结果.PEN ELO PE作为模拟电子2光子簇射的M on te2Carlo软件包,能在微机上实现,有很宽的能量范围,能模拟任意材料和有复杂结构的介质,这对射线应用而言,无疑是增加了一种很好的研究手段.本文对PEN ELO PE应用于多层平板介质和多层圆柱体作了模拟计算,其中,多层平板介质的计算结果与其它实验室的实验结果作了比较.多层平板和多层圆柱体都是结构比较简单的几何体,我们将PEN ELO PE应用在模拟电子加速器和卫星空间辐射环境上,得到了令人满意的结果,以后将另文发表.参 考 文 献1 Jenk in s T W,N elson W R,R indi A.M on te Carlo tran spo rt of electron s and pho ton s,19882 H alb leib J A,Ken sek R P,M eh lho rn T A,et al.R e2 po rt SAND9121632Sandia N ati onal L abo rato ries,1992 3 N elson W R,H irayam a H,Rogers D W O.Stanfo rd lin2 ear accelerato r cen ter repo rt.SLA C2265,19854 B run R,B ruyan t F,M aireM,et al.CERN R epo rt DD EE8421,19865 Salvat F,Fernandez2V area J M,Baro J,et rm es tecn ico s ciem at,1996.7996 A ndreo P,Ito R,T abata T.A tom ic data and nuclear data tab les,1994,56:1057 王传珊等.电子束在多层材料中的背散射效应.核技术, 1995,18(3):1668 地人书馆(日本).R adiati on do si m etry of electron beam s fo r radiati on p rocessing,1992.122^・612・ 上海大学学报(自然科学版) 第5卷。
openscenegraph编译

openscenegraph编译OpenSceneGraph是一个强大的开源3D图形引擎,可以用于游戏开发、模拟和数据可视化等领域。
如果你想学习和使用OpenSceneGraph,那么编译它是一个重要的步骤。
以下是一些基本的步骤,可以帮助你编译OpenSceneGraph:1. 下载OpenSceneGraph源代码。
可以从OpenSceneGraph官网或GitHub上下载源代码。
选择你想要的版本,下载后解压缩到一个目录中。
2. 安装必要的依赖项。
OpenSceneGraph需要一些依赖项,包括OpenGL、GLUT、OpenAL、FreeType等。
你需要安装它们的开发库。
在Ubuntu上,可以使用以下命令安装:sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev libglut-dev libopenal-dev libfreetype6-dev在Fedora上,可以使用以下命令安装:sudo dnf install mesa-libGL-devel mesa-libGLU-devel freeglut-devel openal-soft-devel freetype-devel在Windows上,你需要安装OpenGL、GLUT、OpenAL和FreeType 的开发库,并将它们添加到系统路径中。
你也可以使用第三方工具(如CMake)来自动化此过程。
3. 配置和编译。
在Linux上,可以使用以下命令进行配置和编译:./configuremake -j4sudo make install在Windows上,你可以使用Visual Studio或MinGW等IDE进行配置和编译。
你需要将OpenSceneGraph源代码添加到项目中,设置依赖项并进行编译。
4. 测试。
编译完成后,你可以使用OpenSceneGraph提供的示例程序来测试它是否正常工作。
permPATH软件包用户指南说明书

Package‘permPATH’September5,2023Type PackageTitle Permutation Based Gene Expression Pathway AnalysisVersion1.3Description Can be used to carry out permutation based gene expression pathway analy-sis.This work was supported by a National Institute of Allergy and Infectious Dis-ease/National Institutes of Health contract(No.HHSN272200900059C).Depends R(>=3.4.0),R2HTML(>=2.3.2),xtable(>=1.8-2)VignetteBuilder knitrSuggests knitrLicense GPL-3LazyLoad yesNeedsCompilation yesAuthor Ivo D.Shterev[aut,cre],Kouros Owzar[aut],Gregory D.Sempowski[aut],Kenneth Wilder[ctb,cph](wrote original version of ranker.h)Maintainer Ivo D.Shterev<*******************>Repository CRANDate/Publication2023-09-0504:00:03UTCR topics documented:permPath-package (2)perm.path (2)permPATH2HTML (4)Index61permPath-package Permutation Based Gene Expression Pathway Analysis.DescriptionCan be used to carry out permutation based gene expression pathway analysis.This work was supported by a National Institute of Allergy and Infectious Disease/National Institutes of Health contract(No.HHSN272200900059C).Author(s)I.D.Shterev,K.Owzar and G.D.SempowskiMaintainer:I.D.Shterev<******************>ReferencesB.Efron,R.Tibshirani(2007)On Testing the Significance of Sets of Genes.The Annals of AppliedStatistics.Vol.1,No1,107–129.A.Subramanian,P.Tamayo,V.K.Mootha,S.Mukherjee,B.L.Ebert,M.A.Gillette,A.Paulovich,S.L.Pomeroy,T.R.Golub,nder and J.P.Mesirov(2005),Gene Set Enrichment Analysis:A knowledge-based Approach for Interpreting Genome-Wide Expression Profiles.Proc.Natl.A.Vol.102,No43,15545–15550.perm.path Perform Permutation Based Pathway AnalysisDescriptionThis is the package main function.Usageperm.path(expr,y,local.test,global.test="wilcoxon",B,gset,min.num=2,max.num, imputeval=NULL,transfun=function(x){x},sort="pval",anno=NULL)Argumentsexpr An K×n matrix of gene expression data,where K is the number of genes and n is the number of samples.y An outcome vector of length n.local.test Local test statistic of each gene.Current possible choices are t−test,W ilcoxon test,P earson,Spearman and JT test.global.test Global test statictic,used to compute the score.Current possible choices are mean,meanabs(mean of absolute values)and maxmean.B specifies the number of random permutations to be performed.gset A list of pathways.Each element is a vector of gene names.The list element names are the pathway names.min.num Specifies the minimum number of genes that a pathway should have.Pathways with smaller number of genes will be excluded.max.num Specifies the maximum number of genes that a pathway should have.Pathways with larger number of genes will be excluded.imputeval The gene expression value to be imputed in case of missing values.The default choice is NULL in which case no imputation is done.transfun Specifies transformation of the gene expression data.The default option is un-transformed gene expression data.sort Specifies sorting of the results.If sort=”pval”sorting is done in order of increasing p−values.If sort=”score”sorting is done in order of decreasingscores.anno If T RUE the output contains annotation of each pathway.ValueThis function returns a list consisting of the following elements:res Data frame consisting of the pathway names(Pathway),the genes involved in each pathway(Genes),the number of genes in each pathway(Size),thescore for each pathway(Score),the permutation raw p-value(pval),the FWER-adjusted permutation p-value(pfwer),the FDR-adjusted permutation p-value,the Bonferroni-adjusted permutation p-value(bonferroni)stats The individual test statistic for each genescores A matrix of scores.The matrix is of dimension(B+1)×K,where K is the number of pathways.Thefirst column contains the unpermuted scores,theremaining B columns contain the scores computed after each permutation. ReferencesB.Efron,R.Tibshirani(2007)On Testing the Significance of Sets of Genes.The Annals of AppliedStatistics.Vol.1,No1,107–129.A.Subramanian,P.Tamayo,V.K.Mootha,S.Mukherjee,B.L.Ebert,M.A.Gillette,A.Paulovich,S.L.Pomeroy,T.R.Golub,nder and J.P.Mesirov(2005),Gene Set Enrichment Analysis:A knowledge-based Approach for Interpreting Genome-Wide Expression Profiles.Proc.Natl.A.Vol.102,No43,15545–15550.Examplesset.seed(1234)##Generate toy phenotype and gene expression data sets##This example consists of40genes grouped into5pathways and100patients##grp is a binary trait(e.g.,case vs control)##bp is a continuous trait(e.g.,blood pressure)##g is a group indicatorn=100K=40grp=rep(1:0,each=n/2)bp=rnorm(n)g=rep(1:(n/20),rep(20,n/20))pdat=data.frame(grp,bp,g)rm(grp,bp)expdat=matrix(rnorm(K*n),K,n)##Assign marker names g1,...,gK to the expression data set and##patient ids id1,...,idn to the expression and phenotype datagnames=paste("g",1:K,sep="")rownames(expdat)=gnamespatid=paste("id",1:n,sep="")rownames(pdat)=patidcolnames(expdat)=patid#Group the K genes into M pathways of sizes n1,...,nMM=5p=runif(M)p=p/sum(p)nM=rmultinom(1,size=K,prob=p)gset=lapply(nM,function(x){gnames[sample(x)]})names(gset)=paste("pathway",1:M,sep="")##Carry out permutation analysis with grp as the outcome##using the two-sample Wilcoxon with B=100random permutationsperm.path(expdat,y=pdat[["grp"]],local.test="wilcoxon",global.test="maxmean",B=100, gset=gset,min.num=2,max.num=50,sort="score")##Carry out permutation analysis with g as the outcome##using the JT test with B=100random permutationsperm.path(expdat,y=pdat[["g"]],local.test="jt",global.test="maxmean",B=100,gset=gset,min.num=2,max.num=50,sort="score")permPATH2HTML This is a function for creating an HTMLfileDescriptionThe function creates an HTMLfile.UsagepermPATH2HTML(dat,dir,fname,title=NULL,bgcolor="#BBBBEE")Argumentsdat A data frame.dir Directory in which to store thefile.fname File name.title The title of the htmlfile.bgcolor Color for the html background.Examples##Generate toy phenotype and gene expression data sets##This example consists of40genes grouped into5pathways and100patients##grp is a binary trait(e.g.,case vs control)##bp is a continuous trait(e.g.,blood pressure)set.seed(1234)n=100K=40grp=rep(1:0,each=n/2)bp=rnorm(n)pdat=data.frame(grp,bp)rm(grp,bp)expdat=matrix(rnorm(K*n),K,n)##Assign marker names g1,...,gK to the expression data set and##patient ids id1,...,idn to the expression and phenotype datagnames=paste("g",1:K,sep="")rownames(expdat)=gnamespatid=paste("id",1:n,sep="")rownames(pdat)=patidcolnames(expdat)=patid#Group the K genes into M pathways of sizes n1,...,nMM=5p=runif(M)p=p/sum(p)nM=rmultinom(1,size=K,prob=p)gset=lapply(nM,function(x){gnames[sample(x)]})names(gset)=paste("pathway",1:M,sep="")##Carry out permutation analysis with grp as the outcome##using the two-sample Wilcoxon with B=100random permutationsres=perm.path(expdat,y=pdat[["grp"]],local.test="wilcoxon",global.test="maxmean", B=100,gset=gset,min.num=2,max.num=50,sort="score")#create an html file#epermPATH2HTML(rstab,dir="/dir/",fname="tophits")Indexperm.path,2permPath(permPath-package),2permPATH-package(permPath-package),2 permPath-package,2permPATH2HTML,46。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
第5卷第3期 上海大学学报(自然科学版) V o l.5,N o.3 1999年6月 JOU RNAL O F SHAN GHA IUN I V ER S IT Y(NA TU RAL SC IEN CE) June1999PENELO PE软件包的移植与应用实例X罗文芸 王传珊 黄 伟 (化学与化工学院) (理学院) 提 要 PEN ELO PE是电子2光子簇射的M on te2Carlo模拟计算软件包(F.Salvat,1996),能量范围为1keV至几百M eV;模拟计算方法为混合模拟,即硬事件的详细模拟与软事件的压缩模拟相结合;有构造简单的几何软件包,能模拟光子2电子在由二次曲面构成的复杂几何体中的输运过程.本文作者在133微机上实现了对PEN ELO PE的移植,并给出了两个应用实例.关键词 M on te2Carlo方法;混合模拟;能量沉积;电子2光子簇射中图法分类号 T P311.54;TL99The Portable of PENELOPE and Appl ied Exam plesL uo W enyun W ang Chuan shan(Schoo l of Chem istry and Chem ical Engineering,ShanghaiU n iversity)H uang W ei(Schoo l of Sciences,ShanghaiU n iversity)Abstract:PEN ELO PE p erfo rm s M on te2Carlo si m u lati on of electron2p ho ton show ers in arb itrary fo r a w ide energy range,from1keV to several hundred M eV.T he m ethod of si m u lati on is a m ixed p rocedu re,w h ich com b ines detailed si m u lati on of hard even ts w ith conden sed si m u lati on of soft in teracti on s.A si m p le geom etry p ackage p erm its the generati on of random electron2p ho ton show ers in m aterial system s con sisting of hom ogeneou s bodies li m ited by quadric su rface.T he po rtab le of th is code and tw o app lied exam p les have been given.Key words:M on te2Carlo m ethod;m ixed si m u lati on;depo sited energy;electron2p ho ton show ers M on te2Carlo方法在粒子输运上的应用是它最成功的应用,多年来M on te2Carlo方法编制的软件和研究论文一直很多,仅对高能电子而言,常用的就有ETRAN[1](B erger,1988)、IT S3[2](H alb leib, 1992)、EGS4[3](N elson,1985)、GEAN T[4](B run, 1986)等.可是,高能电子的详细模拟是有困难的,因为电子在与介质的一次相互作用后损失的能量很小,只有几十个电子伏特量级,这样,一个高能电子在被介质吸收之前与介质相互作用的次数相当巨大,详细模拟效率非常低.多次散射理论的引入,是将给定路程段中的大量事件作为一个整体效应处理,这样的M on te2Carlo模拟叫做压缩(Conden sed) M on te2Carlo方法.基于多次散射的压缩M on te2 Carlo方法是近似的模拟,有系统误差,而且模拟结果与所取步长有关,只有当步长足够小时,计算结果才稳定,故耗费的机时太多.同时过小的步长也可能X收稿日期:1998211226 罗文芸,女,1965年生,硕士,助研;上海大学化学与化工学院射线应用研究所,上海市嘉定区城中路20号(201800)阻止某些相互作用的发生而影响模拟结果的准确性.此外,这种方法在介质存在界面时也会产生新的困难.上述的M on te2Carlo程序都是这种方法.F. Salvat于1988年提出了压缩M on te2Carlo方法与微分截面的解析解相结合的方法,其散射模型是将数值的总截面(阻止本领)和不同相互作用机制下解析的微分截面(对不同反应道)结合起来,因此程序的结构非常简单.在对电子进行模拟时,采用这种混合过程,即对散射角或能量损失大于截止值的硬相互作用事件详细模拟,只要截止值选择适当,每个径迹中的硬事件数是相对较小的,详细模拟完全可行.而对散射角和能量损失都不超过截止值的软相互作用事件用多次散射方法处理.这样,所引起的横向歧离小,跨越界面时的误差也小.这种M on te2Carlo方法,对具有复杂辐射环境和复杂几何条件问题提供了解决方法.我们的目的是建立一个可以方便地在普通微机上实现的高能电子的M on te2Carlo程序,基于PEN ELO PE[5]较之其他程序的优势,故选择了对PEN ELO PE的移植和开发.1 软件移植PEN ELO PE是模拟电子2光子簇射的M on te2 Carlo软件包(F.Salvat,1996),能量范围为1keV 至几百M eV;有很全面的数据库,自然界中存在的92种元素和由其组成的近300种常用材料的有关信息,都有现成的数据可调用,对这300种以外的材料,可以自己生成数据;还有一个灵活可变的几何软件,运行几何软件可以生成任何可以用二次曲面表示的几何体的组合;除此之外,它还有强大的计算功能,对于有复杂结构物体的剂量分布通过一次计算就可以全部得出.整个软件主要由三个程序包和一个数据库组成:(a)模拟程序包该程序包是软件的核心,即主体程序,由几十个子程序组成,模拟电子2光子在介质中的运动历史.(b)几何程序包该程序包主要是解决由于介质的整体不均匀性给电子模拟带来的困难.用它可以检验径迹是否跨界面,自动实现模拟的几何要求.(c)材料程序包该程序包由一个辅助程序M A T ER I AL和若干子程序组成,实现从数值的数据库中提取相关原子的相互作用数据,形成反映介质各种特性的材料数据文件.(d)数据库该数据库除包含序号1~92的92种元素的相互作用截面和核外电子层数据,还附有包括92种元素在内的近三百种不同材料的组成数据.主程序的流程图可由图1表示.图1 主程序流程图我们在通读整个软件包的基础上,对其源程序进行了适当修改,特别是对电子(或光子)入射部分,使其不仅适用点源和面源,也适用于其他复杂几何的入射情况.根据实践,由于模拟过程涉及众多的变量,而且模拟结果的可靠性在很大程度上取决于模拟的初始粒子数是否足够多,因此PEN ELO PE的・412・ 上海大学学报(自然科学版) 第5卷实际运行对所用计算机的内存和速度有比较高的要求.在安装了W I NDOW S 下的FO R TRAN 编译系统、内存容量为32M 的奔腾133微机上,该软件的运行情况是比较理想的.下面给出两个应用实例.2 模拟计算2.1 半无限厚平板介质被模拟的介质由三层组成,第一层钛窗(0.03mm ),第二层空气(10c m ),第三层为半无限厚的平板碳材料;电子能量2M eV ,平行正入射.跟踪10万个入射电子,给出电子在平板碳材料中的能量沉积深度分布,并与实验进行比较,结果符合较好,见图2.图中实验数据摘自参考文献[6].图2 2M eV 电子在碳中的能量沉积分布2.2 电缆选择铝芯交联聚乙烯绝缘架空电缆为模拟对象,电缆的外半径为1c m ,铝芯的半径为0.75c m ,聚乙烯绝缘层厚度为0.25c m .假设加速器产生的电子为平行电子束,能量为2M eV ,在辐照过程中电缆线不进行旋转,即单面辐照,见示意图(图3).图3 电缆截面示意图把绝缘层沿径向从外到里分为5层(layer 1~layer 5),每层厚度为0.05c m ,再沿极角方向(见图3)将每层36等分,算出电子在每个小体积元内能量沉积的平均值,跟踪20万个入射电子后,给出在每层绝缘层中,电子能量沉积沿极角H 的分布情况,见图4.图4 2M eV 电子在电缆绝缘层中能量沉积分布由图4可以看出,绝缘层上表面(0°≤H <180°)最外层(layer 1)电子能量沉积小,而里层(layer 5)反而大,但在近0°和180°处,出现相反现象,外层大里层小.这主要是铝芯背散射的结果,因为背散射系数与原子序数成正比[7],铝的原子序数大于聚乙烯的等效原子序数,受铝芯背散射效应的影响,绝缘层上表面里层的电子能量沉积明显增大,而在近0°和180°处,背散射影响小,则出现相反现象;其次,在电子平行正入射的情况下,根据深度剂量分布规律[8],电子在吸收体中的能量沉积并不是呈线性下降的趋势,而总是呈一个先上升再下降的分布形状(见图2),峰位和宽度与电子能量、吸收体原子序数和阻止本领等因素有关,在本例模拟计算中,由于假设电缆线是受单面辐照,平行电子束只有在上表面正中间的地方可以近似为正入射,其它地方电子的入射情况都只能看作斜入射,能量沉积分布更为复杂.这也是导致上述结果的原因之一.绝缘层下表面(180°≤H <360°)电子能量沉积几乎为零,这表明电子大部分截止在铝芯内,电缆绝缘层下表面基本辐照不到.如果将电缆线不停地进行旋转,电子的入射方向可以近似为沿径向的正入射,加上铝芯的背散射作用,对绝缘层稍厚一些的电缆线,也能基本达到均匀辐照的效果.因此,在辐照・512・第3期 罗文芸等:PEN ELO PE 软件包的移植与应用实例过程中,电缆线的旋转是十分必要的.3 讨 论PEN ELO PE软件包采用混合的M on te2Carlo 模拟方法,把电子与物质的相互作用区分为硬、软碰撞,仅仅对硬碰撞做详细模拟,对软碰撞用多次散射理论模拟,这样可以相应缩短机时,提高计算效率,同时,混合模拟使介质中界面的处理也变得十分容易,当电子在两次硬碰撞之间遇到界面时,自动调整步长,使电子停止在界面处,调用新材料的有关信息后,再继续模拟下一次碰撞,这样处理在程序上容易实现,对复杂几何体的模拟也能得到比较准确的结果.PEN ELO PE作为模拟电子2光子簇射的M on te2Carlo软件包,能在微机上实现,有很宽的能量范围,能模拟任意材料和有复杂结构的介质,这对射线应用而言,无疑是增加了一种很好的研究手段.本文对PEN ELO PE应用于多层平板介质和多层圆柱体作了模拟计算,其中,多层平板介质的计算结果与其它实验室的实验结果作了比较.多层平板和多层圆柱体都是结构比较简单的几何体,我们将PEN ELO PE应用在模拟电子加速器和卫星空间辐射环境上,得到了令人满意的结果,以后将另文发表.参 考 文 献1 Jenk in s T W,N elson W R,R indi A.M on te Carlo tran spo rt of electron s and pho ton s,19882 H alb leib J A,Ken sek R P,M eh lho rn T A,et al.R e2 po rt SAND9121632Sandia N ati onal L abo rato ries,1992 3 N elson W R,H irayam a H,Rogers D W O.Stanfo rd lin2 ear accelerato r cen ter repo rt.SLA C2265,19854 B run R,B ruyan t F,M aireM,et al.CERN R epo rt DD EE8421,19865 Salvat F,Fernandez2V area J M,Baro J,et rm es tecn ico s ciem at,1996.7996 A ndreo P,Ito R,T abata T.A tom ic data and nuclear data tab les,1994,56:1057 王传珊等.电子束在多层材料中的背散射效应.核技术, 1995,18(3):1668 地人书馆(日本).R adiati on do si m etry of electron beam s fo r radiati on p rocessing,1992.122^・612・ 上海大学学报(自然科学版) 第5卷。