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


Python NGS_Util.copyFile方法代码示例

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


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

示例1: copySequenceFiles

# 需要导入模块: import NGS_Util [as 别名]
# 或者: from NGS_Util import copyFile [as 别名]
    def copySequenceFiles(self, srcDataDir):
    
        try:
                
            print("Copy Fasta Files from %s to %s" %(srcDataDir,self.orgFastaDir))

            orgListFile_fh = open(self.orgListFile)

	    for line in orgListFile_fh:

                organismNameID, organismName = line.strip().split()

 		if not os.path.exists( NGS_Util.createFilePath(self.orgFastaDir, organismName + ".faa") ):

 		    orgFasta = NGS_Util.createFilePath(srcDataDir, organismName + ".faa")
		
		    NGS_Util.copyFile(orgFasta, self.orgFastaDir)		    
                    print("Copied fasta file for %s" % (organismName))
                else:
                    print("\tDoing nothing (files already copied) for %s" % (organismName))
                

            orgListFile_fh.close() 
     
        except Exception:
            
            print traceback.print_exc()
开发者ID:SandraCastilloPriego,项目名称:CoReCo,代码行数:29,代码来源:MetabolicReconstructionPipeline_ClusterUtil.py

示例2: getIPRScanScore

# 需要导入模块: import NGS_Util [as 别名]
# 或者: from NGS_Util import copyFile [as 别名]
    def getIPRScanScore(self, mode):
    
        try:
        
                
            print "getIPRScanScore"

            orgListFile_fh = open(self.orgListFile)

            for line in orgListFile_fh:
                
                organismNameID, organismName = line.strip().split()
                
                organism_IPR_final = NGS_Util.createFilePath(self.fungi_InterProScan_result, organismName + ".faa.IPR.final.txt")

               
                if not os.path.exists(organism_IPR_final):
                    
                    print "getIPRScanScore : " + organismName
                    
                    if mode == 1:

                        self.runClusterIPRScan(organismName)
                        
                        time.sleep(21600) # sleep for 6 hrs
                        
                    elif mode == 2:
                        
                        ipr_xml_file = self.concatenate_ClusterIPRScan_results(organismName)                        
                        ipr_raw_file = self.xmlIPRScanToRAWOutput(organismName, ipr_xml_file)
    
                        organism_ipr2go = self.extract_ipr2go_based_on_xml(organismName, ipr_xml_file)
                        organism_ipr2ec = self.map_ipr_to_specific_ecs(organismName, organism_ipr2go)
                        organism_seqid2ec = self.combine_iprscan_raw_result_with_ipr2ec( organismName, organism_ipr2ec, ipr_raw_file)
                        
                       
                        if os.path.exists(ipr_raw_file) and os.path.exists(organism_seqid2ec):
    
    
                            organism_raw_final = NGS_Util.createFilePath(self.fungi_InterProScan_result, organismName + ".faa.raw.txt")                        
                            organism_IPR_final = NGS_Util.createFilePath(self.fungi_InterProScan_result, organismName + ".faa.IPR.final.txt")
                            
                            NGS_Util.copyFile(ipr_raw_file, organism_raw_final)
                            NGS_Util.copyFile(organism_seqid2ec, organism_IPR_final)


            orgListFile_fh.close() 
     
        except Exception:
            
            print traceback.print_exc()
            
        return ""
开发者ID:SandraCastilloPriego,项目名称:CoReCo,代码行数:55,代码来源:MetabolicReconstructionPipeline_ClusterIPRScan.py

示例3: getIPRScanScore

# 需要导入模块: import NGS_Util [as 别名]
# 或者: from NGS_Util import copyFile [as 别名]
    def getIPRScanScore(self):
    
        try:
        
            orgListFile_fh = open(self.orgListFile)

            for line in orgListFile_fh:
                if line.startswith("#"):
                    continue
                organismNameID, organismName = line.strip().split()
                
                organism_IPR_final = NGS_Util.createFilePath(self.fungi_InterProScan_result, organismName + ".faa.IPR.final.txt")

#                self.create_new_seq_org_list(organismName,organismNameID)
                
                if not os.path.exists(organism_IPR_final):

		    print "getIPRScanScore : " + organismName

                    org_ipr_split_dir = self.splitFiles(organismName)
                    ipr_raw_file = self.rawIPRScan(organismName,org_ipr_split_dir)
                    ipr_xml_file = self.rawIPRScanToXMlOutput( organismName, ipr_raw_file)

                    organism_ipr2go = self.extract_ipr2go_based_on_xml(organismName, ipr_xml_file)
                    organism_ipr2ec = self.map_ipr_to_specific_ecs(organismName, organism_ipr2go)
                    organism_seqid2ec = self.combine_iprscan_raw_result_with_ipr2ec( organismName, organism_ipr2ec, ipr_raw_file)
                    
                   
                    if os.path.exists(ipr_raw_file) and os.path.exists(organism_seqid2ec):

                        organism_raw_final = NGS_Util.createFilePath(self.fungi_InterProScan_result, organismName + ".faa.raw.txt")                        
                        organism_IPR_final = NGS_Util.createFilePath(self.fungi_InterProScan_result, organismName + ".faa.IPR.final.txt")
                        
                        NGS_Util.copyFile(ipr_raw_file, organism_raw_final)
                        NGS_Util.copyFile(organism_seqid2ec, organism_IPR_final)


            orgListFile_fh.close() 
     
        except Exception:
            
            print traceback.print_exc()
            
        return ""
开发者ID:argju,项目名称:CoReCo,代码行数:46,代码来源:MetabolicReconstructionPipeline_IPRScan.py

示例4: initialize

# 需要导入模块: import NGS_Util [as 别名]
# 或者: from NGS_Util import copyFile [as 别名]
    def initialize(self, seq_org_list, jointBlastDir, GTGFungiKNNDir, fungi_InterProScan_result, phylogeneticTreeFile, modelTrainingDir):
    
        try:
        
	    self.seq_org_list                            = seq_org_list

	    self.jointBlastDir                           = jointBlastDir
	    self.GTGFungiKNNDir                          = GTGFungiKNNDir
	    self.fungi_InterProScan_result               = fungi_InterProScan_result	    

	    self.phylogeneticTreeFile                    = phylogeneticTreeFile
	    
	    self.modelTrainingDir                        = modelTrainingDir
	    self.modelTraining_IPR_EC_Dir                = NGS_Util.createDirectoryPath(self.modelTrainingDir, "IPR_EC")
	    self.modelTrainingBlastPVDir                 = NGS_Util.createDirectoryPath(self.modelTrainingDir, "BlastPValues")
	    self.modelTraining_EC_Scores_Dir             = NGS_Util.createDirectoryPath(self.modelTrainingDir, "ECScores")    
	    self.modelTrainingProbabilityDensityScoreDir = NGS_Util.createDirectoryPath(self.modelTrainingDir, "ProbabilityDensityScore")	    
	    self.modelTrainingTreeDir                    = NGS_Util.createDirectoryPath(self.modelTrainingDir, "Tree")	    
	    self.modelTrainingModelDir                   = NGS_Util.createDirectoryPath(self.modelTrainingDir, "Model")


	    NGS_Util.createDirectory(self.modelTrainingDir)
	    NGS_Util.createDirectory(self.modelTraining_IPR_EC_Dir)
	    NGS_Util.createDirectory(self.modelTrainingBlastPVDir)
	    NGS_Util.createDirectory(self.modelTraining_EC_Scores_Dir)
	    NGS_Util.createDirectory(self.modelTrainingProbabilityDensityScoreDir)
	    NGS_Util.createDirectory(self.modelTrainingTreeDir)
	    NGS_Util.createDirectory(self.modelTrainingModelDir)
	    
	    
	    if (os.path.exists(self.phylogeneticTreeFile)):
		
		NGS_Util.copyFile( self.phylogeneticTreeFile,NGS_Util.createFilePath(self.modelTrainingTreeDir,"tree")   )
		self.phylogeneticTreeFile = NGS_Util.createFilePath(self.modelTrainingTreeDir,"tree")


	    self.treeCPDS = NGS_Util.createFilePath(self.modelTrainingTreeDir,"tree.cpds")
    
        except Exception:
            print traceback.print_exc()
开发者ID:BioinformaticsArchive,项目名称:CoReCo,代码行数:42,代码来源:MetabolicRecontructionsPipeline_ModelTraining.py


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