def setDomainSOurceInformation(self, jsonData): """ set new domain source information in the database :return: json file with the last domain source information created :rtype: string (json format) """ jsonData = json.dumps(jsonData) result_post = PostRest(function = self.function, dataDict = jsonData).performRequest() return result_post
def set_wholeDNA(self, jsonData): """ set new wholeDNA in the database :return: json file with the last wholeDNA created :rtype: string (json format) """ jsonData = json.dumps(jsonData) result_post = PostRest(function = self.function, dataDict = jsonData).performRequest() return result_post
def setPPICogScore(self, jsonData): """ set new PPI cogs score in the database :return: json file with the last genus created :rtype: string (json format) """ jsonData = json.dumps(jsonData) result_post = PostRest(function = self.function, dataDict = jsonData).performRequest() return result_post
def set_bacteriophage(self, jsonData): """ set new bacteriophage in the database :return: json file with the last bacteriophage created :rtype: string (json format) """ jsonData = json.dumps(jsonData) result_post = PostRest(function=self.function, dataDict=jsonData).performRequest() return result_post
def setProteinPFAM(self, jsonData): """ set new proteinPFAM in the database :return: json file with the last proteinpfam created :rtype: string (json format) """ jsonData = json.dumps(jsonData) result_post = PostRest(function=self.function, dataDict=jsonData).performRequest() return result_post
def createAutenthicationToken(self): loginData = {'username': self.username, 'password': self.password} postRestObj = PostRest(function='login/', dataDict=loginData, includeHeaders=False) jsonResult = postRestObj.performRequest() loginSjonObj = LoginJson(jsonValue=jsonResult) if loginSjonObj.lodingData != None: os.environ["token_api"] = loginSjonObj.jsonData['token'] return loginSjonObj.jsonData['token'] return None
def setCogInterSource(self, jsonData): """ set new cog interaction source in the database :return: json file with the last couple created :rtype: string (json format) """ jsonData = json.dumps(jsonData) result_post = PostRest(function=self.function, dataDict=jsonData).performRequest() return result_post
def set_person_responsible(self, jsonData): """ set new person responsible in the database :return: json file with the last person responsible created :rtype: string (json format) """ jsonData = json.dumps(jsonData) result_post = PostRest(function=self.function, dataDict=jsonData).performRequest() return result_post