本文整理汇总了Python中NGS_Util类的典型用法代码示例。如果您正苦于以下问题:Python NGS_Util类的具体用法?Python NGS_Util怎么用?Python NGS_Util使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了NGS_Util类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: doNetworkReconstruction
def doNetworkReconstruction(self):
try:
print "doNetworkReconstruction"
curDirectory = os.getcwd()
os.chdir(ScriptsDir.ReconstructionScripts)
orgListFile_fh = open(self.networkReconstructionOrgList)
for orgLine in orgListFile_fh:
organismID = orgLine.strip()
print "Network reconstruction for: " + organismID
call = "bash " + ScriptsDir.ReconstructionScripts_reco_dir + " " + self.modelTrainingModelDir + " " + str(self.intAaccept) + " " + str(self.intReject) + " " + organismID + " " + ScriptsDir.ReconstructionScripts + " " + self.keggDataDir + " " + self.taxonomy
NGS_Util.executeCall(call)
orgListFile_fh.close()
os.chdir(curDirectory)
except Exception:
print traceback.print_exc()
return ""
开发者ID:BioinformaticsArchive,项目名称:CoReCo,代码行数:31,代码来源:MetabolicReconstructionPipeline_NetworkReconstruction.py
示例2: runClusterIPRScan
def runClusterIPRScan(self, organismName):
try:
splitFasta = MetabolicReconstructionPipeline_SplitFasta.MetabolicReconstructionPipeline_SplitFasta()
#numberOfFragments = 10
###############################################################################################################################################
org_fasta = NGS_Util.createFilePath(self.orgFastaDir, organismName+".faa")
splitFasta.splitOrganismDataFile(organismName, org_fasta, self.numberOfFragments)
###################################################################################################################################
clusterArrayCall = "qsub -t 1-" + str(self.numberOfFragments) + ":1 " + ScriptsDir.ClusterIprscan
iprscan = NGS_Util.createFilePath(ScriptsDir.IprscanDir,"interproscan.sh ")
splitFile = splitFasta.organismSplitDataDir + organismName
ipr_raw_file_split = NGS_Util.createFilePath(self.orgIPRScanDir, organismName + "_split" )
call = clusterArrayCall + " " + iprscan + " " + splitFile + " " + ipr_raw_file_split
NGS_Util.executeCall(call)
except Exception:
print traceback.print_exc()
return ""
开发者ID:SandraCastilloPriego,项目名称:CoReCo,代码行数:34,代码来源:MetabolicReconstructionPipeline_ClusterIPRScan.py
示例3: copySequenceFiles
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()
示例4: doCreateSBML
def doCreateSBML(self):
try:
print "doNetworkReconstruction"
curDirectory = os.getcwd()
os.chdir(ScriptsDir.ReconstructionScripts)
orgListFile_fh = open(self.networkReconstructionOrgList)
for orgLine in orgListFile_fh:
organismID = orgLine.strip()
print "Network reconstruction for: " + organismID
intAccept2 = "%.9f" % (self.intAaccept)
intReject2 = "%.9f" % (self.intReject)
call = "bash " + ScriptsDir.ReconstructionScripts_reco_dir_postprocess + " " + self.modelTrainingModelDir + " " + intAccept2 + " " + intReject2 + " " + organismID + " " + ScriptsDir.ReconstructionScripts + " " + self.keggDataDir + " " + self.taxonomy + " " + self.bounds + " " + self.ec2rxnFile + " " + "3" +" " + self.rxnNamesFile + " " + self.pathwayFile
NGS_Util.executeCall(call)
orgListFile_fh.close()
os.chdir(curDirectory)
except Exception:
print traceback.print_exc()
return ""
示例5: run_Org_vs_Uniprot_ClusterBlast
def run_Org_vs_Uniprot_ClusterBlast(self, organismName):
try:
splitFasta = MetabolicReconstructionPipeline_SplitFasta.MetabolicReconstructionPipeline_SplitFasta()
###############################################################################################################################################
org_fasta = NGS_Util.createFilePath(self.orgFastaDir, organismName+".faa")
splitFasta.splitOrganismDataFile(organismName, org_fasta, self.numberOfFragments)
###################################################################################################################################
clusterArrayCall = "qsub -t 1-" + str(self.numberOfFragments) + ":1 " + ScriptsDir.ClusterBlast
blastP = NGS_Util.createFilePath(ScriptsDir.BlastDir,"blastp")
outfmt = str(6)
splitFile = splitFasta.organismSplitDataDir + organismName
org_vs_UniprotBlastDB = NGS_Util.createFilePath(self.orgBlastResDir, organismName + "-vs-up" )
call = clusterArrayCall + " " + blastP + " " + self.uniprot_blast_db + " " + splitFile + " " + outfmt + " " + org_vs_UniprotBlastDB + " " + str(self.blastEValue)
NGS_Util.executeCall(call)
except Exception:
print traceback.print_exc()
示例6: moveGTGResults
def moveGTGResults(self):
try:
print "moveGTGResults"
orgListFile_fh = open(self.orgListFile)
NGS_Util.zipDirectory(self.orgGTGBlastResDir)
NGS_Util.moveDirectoryFiles(self.orgGTGBlastResDir,self.moveToDir_orgGTGBlastResDir)
NGS_Util.zipDirectory(self.GTGBestHitsDir)
NGS_Util.moveDirectoryFiles(self.GTGBestHitsDir,self.moveToDir_GTGBestHitsDir)
for line in orgListFile_fh:
organismNameID, organismName = line.strip().split()
org_gtg_knn_final = NGS_Util.createFilePath(self.GTGKNNDir, organismNameID + ".gtg.knn")
moveto_org_gtg_knn_final = NGS_Util.createFilePath(self.moveToDir_GTGKNNDir, organismNameID + ".gtg.knn")
self.moveFile_createLink(org_gtg_knn_final,moveto_org_gtg_knn_final)
orgListFile_fh.close()
except Exception:
print traceback.print_exc()
示例7: runModelTrainingAlgo
def runModelTrainingAlgo(self):
try:
print "runModelTrainingAlgo"
curDirectory = os.getcwd()
os.chdir(ScriptsDir.ModelTrainingScripts)
self.extract_IPR_EC_Values()
self.computeBlastPvalues()
self.computeMergedScores()
self.computeECscores()
self.computeProbabilityDensityScores()
self.combineProbabilityDensityScores()
self.computeTreeProbabilityDensityScore()
self.runBashScript()
NGS_Util.executeCall("rm *.Rout")
NGS_Util.executeCall("rm *.RData")
os.chdir(curDirectory)
except Exception:
print traceback.print_exc()
开发者ID:BioinformaticsArchive,项目名称:CoReCo,代码行数:34,代码来源:MetabolicRecontructionsPipeline_ModelTraining.py
示例8: concatenate_Org_vs_Uniprot_ClusterBlast_results
def concatenate_Org_vs_Uniprot_ClusterBlast_results(self, organismName):
try:
clusterProcessing = True
for fragment in range(self.numberOfFragments):
org_vs_UniprotBlastDB = NGS_Util.createFilePath(self.orgBlastResDir, organismName + "-vs-up_" + str(fragment+1) + ".blast" )
if not os.path.exists(org_vs_UniprotBlastDB):
clusterProcessing = False
break
if (clusterProcessing):
org_vs_UniprotBlastDB = NGS_Util.createFilePath(self.orgBlastResDir, organismName + "-vs-up.blast" )
call = "cat " + NGS_Util.createFilePath(self.orgBlastResDir, organismName + "-vs-up_*") + " > " + org_vs_UniprotBlastDB
NGS_Util.executeCall(call)
return org_vs_UniprotBlastDB
else:
print organismName + "-vs-Uniprot BLAST incomplete"
except Exception:
print traceback.print_exc()
return ""
示例9: blast_org_vs_nr40_blast_formatted_11
def blast_org_vs_nr40_blast_formatted_11(self, organismName):
try:
org_fasta = NGS_Util.createFilePath(self.orgFastaDir, organismName+".faa")
clusterArrayCall = "qsub -t 1-1 " + ScriptsDir.ClusterGTGBlast
blastP = NGS_Util.createFilePath(ScriptsDir.BlastDir,"blastp")
outfmt = str(11)
org_vs_nr40BlastDB_f11 = NGS_Util.createFilePath(self.orgGTGBlastResDir, organismName + ".nrdb40_v2.txt")
call = clusterArrayCall + " " + blastP + " " + self.nrdb40_blast_db + " " + org_fasta + " " + outfmt + " " + org_vs_nr40BlastDB_f11 + " " + str(self.blastEValue)
NGS_Util.executeCall(call)
return org_vs_nr40BlastDB_f11
except Exception:
print traceback.print_exc()
return ""
示例10: makeBlastDB
def makeBlastDB(self, organismName):
try:
print "Make Blast Database: " + organismName
org_fasta = NGS_Util.createFilePath(self.orgFastaDir, organismName+".faa")
org_dust = NGS_Util.createFilePath(self.orgBlastDustDir, organismName+"_dust.asnb")
org_blast_db = NGS_Util.createFilePath(self.orgBlastDBDir, organismName)
if os.path.exists(org_fasta):
if not os.path.exists(org_blast_db + ".phd") and not os.path.exists(org_blast_db + ".psq"):
self.ngsBlast.makeProteinBlastDBFromDustFile(org_fasta,org_dust,org_blast_db)
return org_blast_db
except Exception:
print traceback.print_exc()
return ""
示例11: rawIPRScan
def rawIPRScan(self, organismName, org_ipr_split_dir):
try:
print "rawIPRScan: " + organismName
for fragment in range(self.numberOfFragments):
org_ipr_split_file = NGS_Util.createFilePath(self.splitFasta.organismSplitDataDir,organismName + "_" + str(fragment+1) )
self.raw_split_IPRScan(organismName, org_ipr_split_file, str(fragment+1))
ipr_raw_file_split = NGS_Util.createFilePath(self.orgIPRScanDir, organismName + "_split_*")
ipr_raw_file = NGS_Util.createFilePath(self.orgIPRScanDir, organismName + ".ipr.raw")
call = "cat " + ipr_raw_file_split + " > " + ipr_raw_file
NGS_Util.executeCall(call)
return ipr_raw_file
except Exception:
print traceback.print_exc()
return ""
示例12: blastP
def blastP(self, blastDB, queryFastaFile, outfmt, blastResultFile, eValue ):
try:
call = self.blastp + " -db " + blastDB + " -query " + queryFastaFile + " -outfmt " + str(outfmt) + " -out " + blastResultFile + " -evalue " + str(eValue) + " " + self.numThreads
NGS_Util.executeCall(call)
except Exception:
print traceback.print_exc()
示例13: convert_raw_xml
def convert_raw_xml(self, inputFile, outputFile):
try:
call = self.converter + " -format xml -input " + inputFile + " -output " + outputFile
NGS_Util.executeCall(call)
except Exception:
print traceback.print_exc()
示例14: blastFormatter
def blastFormatter(self, archive, outfmt, formattedFile):
try:
call = self.blast_formatter + " -archive " + archive + " -outfmt " + str(outfmt) + " -out " + formattedFile
NGS_Util.executeCall(call)
except Exception:
print traceback.print_exc()
示例15: blastP_with_Database_Size
def blastP_with_Database_Size(self, blastDB, queryFastaFile, outfmt, blastResultFile, eValue, uniprotDBSize ):
try:
call = self.blastp + " -db " + blastDB + " -query " + queryFastaFile + " -outfmt " + str(outfmt) + " -out " + blastResultFile + " -evalue " + str(eValue) + " " + self.numThreads + " -dbsize " + str(uniprotDBSize)
NGS_Util.executeCall(call)
except Exception:
print traceback.print_exc()