Ejemplo n.º 1
0
    def test_write_normal_output(self):
        self.proteins = self.spi.readInputFile(
            self.runner.pcssConfig['fasta_file'])
        modelColumns = pcssModels.PcssModelTableColumns(
            self.runner.internalConfig['model_table_column_file'])
        self.modelTable = pcssModels.PcssModelTable(self.runner, modelColumns)
        pcssProtein = self.getProtein(
            "76c3a409540532138c6b44bde9e4d248MDDRDENQ", self.proteins)

        disopredFileHandler = pcssFeatureHandlers.DisopredFileHandler(
            self.pcssConfig, self.runner.pdh)
        disopredReader = pcssFeatureHandlers.DisopredReader(
            disopredFileHandler)
        disopredRunner = pcssFeatureHandlers.SequenceFeatureRunner(
            disopredFileHandler)
        pcssProtein.processDisopred(disopredReader, disopredRunner)

        psipredFileHandler = pcssFeatureHandlers.PsipredFileHandler(
            self.pcssConfig, self.runner.pdh)
        psipredReader = pcssFeatureHandlers.PsipredReader(psipredFileHandler)
        psipredRunner = pcssFeatureHandlers.SequenceFeatureRunner(
            psipredFileHandler)
        pcssProtein.processPsipred(psipredReader, psipredRunner)

        pcssProtein.addModels(self.modelTable)
        pcssProtein.processDssp()
        rankedModels = pcssProtein.getRankedModels()

        afw = pcssIO.AnnotationFileWriter(self.runner)
        afw.writeAllOutput(self.proteins)

        annotationFileName = self.runner.pdh.getFullOutputFile(
            "annotationOutput.txt")
        reader = pcssIO.AnnotationFileReader(self.runner)
        reader.readAnnotationFile(annotationFileName)
        newProteins = reader.getProteins()

        for newProtein in newProteins:

            oldProtein = self.getProtein(newProtein.modbaseSequenceId,
                                         self.proteins)
            self.assertTrue(oldProtein.isEqual(newProtein))
Ejemplo n.º 2
0
 def setupSpecificTest(self):
     self.readProteins()
     self.seqData = DisopredData()
     self.fileHandler = pcssFeatureHandlers.DisopredFileHandler(
         self.pcssConfig, self.runner.pdh)
     self.sequenceFeatureReader = pcssFeatureHandlers.DisopredReader(
         self.fileHandler)
     self.sequenceFeatureRunner = pcssFeatureHandlers.SequenceFeatureRunner(
         self.fileHandler)
     self.errorDirName = "disopredErrors"
     self.name = "disopred"
Ejemplo n.º 3
0
    def runDisopred(self):

        disopredFileHandler = pcssFeatureHandlers.DisopredFileHandler(
            self.pcssConfig, self.pdh)
        disopredReader = pcssFeatureHandlers.DisopredReader(
            disopredFileHandler)
        disopredRunner = pcssFeatureHandlers.SequenceFeatureRunner(
            disopredFileHandler)

        for protein in self.proteins:
            protein.processDisopred(disopredReader, disopredRunner)
Ejemplo n.º 4
0
    def addPeptideFeatures(self):

        modelColumns = pcssModels.PcssModelTableColumns(
            self.internalConfig['model_table_column_file'])
        modelTable = pcssModels.PcssModelTable(self, modelColumns)

        disopredFileHandler = pcssFeatureHandlers.DisopredFileHandler(
            self.pcssConfig, self.pdh)
        disopredReader = pcssFeatureHandlers.DisopredReader(
            disopredFileHandler)
        disopredRunner = pcssFeatureHandlers.SequenceFeatureRunner(
            disopredFileHandler)

        psipredFileHandler = pcssFeatureHandlers.PsipredFileHandler(
            self.pcssConfig, self.pdh)
        psipredReader = pcssFeatureHandlers.PsipredReader(psipredFileHandler)
        psipredRunner = pcssFeatureHandlers.SequenceFeatureRunner(
            psipredFileHandler)

        for protein in self.proteins:
            protein.processDisopred(disopredReader, disopredRunner)
            protein.processPsipred(psipredReader, psipredRunner)
            protein.addModels(modelTable)
            protein.processDssp()