Пример #1
0
 def searchExpressionLevelsInDb(self,
                                rnaQuantId,
                                featureIds=[],
                                threshold=0.0,
                                startIndex=0,
                                maxResults=0):
     """
     :param rnaQuantId: string restrict search by quantification id
     :param threshold: float minimum expression values to return
     :return an array of dictionaries, representing the returned data.
     """
     sql = ("SELECT * FROM Expression WHERE "
            "rna_quantification_id = ? "
            "AND expression > ? ")
     sql_args = (rnaQuantId, threshold)
     if len(featureIds) > 0:
         sql += "AND feature_id in ("
         sql += ",".join(['?' for featureId in featureIds])
         sql += ") "
         for featureId in featureIds:
             sql_args += (featureId, )
     sql += sqlite_backend.limitsSql(startIndex=startIndex,
                                     maxResults=maxResults)
     query = self._dbconn.execute(sql, sql_args)
     return sqlite_backend.iterativeFetch(query)
Пример #2
0
 def searchRnaQuantificationsInDb(self, rnaQuantificationId=""):
     """
     :param rnaQuantificationId: string restrict search by id
     :return an array of dictionaries, representing the returned data.
     """
     sql = ("SELECT * FROM RnaQuantification")
     sql_args = ()
     if len(rnaQuantificationId) > 0:
         sql += " WHERE id = ? "
         sql_args += (rnaQuantificationId, )
     query = self._dbconn.execute(sql, sql_args)
     try:
         return sqlite_backend.iterativeFetch(query)
     except AttributeError:
         raise exceptions.RnaQuantificationNotFoundException(
             rnaQuantificationId)
Пример #3
0
 def searchRnaQuantificationsInDb(
         self, rnaQuantificationId=""):
     """
     :param rnaQuantificationId: string restrict search by id
     :return an array of dictionaries, representing the returned data.
     """
     sql = ("SELECT * FROM RnaQuantification")
     sql_args = ()
     if len(rnaQuantificationId) > 0:
         sql += " WHERE id = ? "
         sql_args += (rnaQuantificationId,)
     query = self._dbconn.execute(sql, sql_args)
     try:
         return sqlite_backend.iterativeFetch(query)
     except AttributeError:
         raise exceptions.RnaQuantificationNotFoundException(
             rnaQuantificationId)
Пример #4
0
 def searchExpressionLevelsInDb(
         self, rnaQuantId, featureIds=[], threshold=0.0, startIndex=0,
         maxResults=0):
     """
     :param rnaQuantId: string restrict search by quantification id
     :param threshold: float minimum expression values to return
     :return an array of dictionaries, representing the returned data.
     """
     sql = ("SELECT * FROM Expression WHERE "
            "rna_quantification_id = ? "
            "AND expression > ? ")
     sql_args = (rnaQuantId, threshold)
     if len(featureIds) > 0:
         sql += "AND feature_id in ("
         sql += ",".join(['?' for featureId in featureIds])
         sql += ") "
         for featureId in featureIds:
             sql_args += (featureId,)
     sql += sqlite_backend.limitsSql(
         startIndex=startIndex, maxResults=maxResults)
     query = self._dbconn.execute(sql, sql_args)
     return sqlite_backend.iterativeFetch(query)
Пример #5
0
 def iterativeFetchMethod(self):
     sql = self._readGroupSql
     query = self._dbconn.execute(sql)
     iterator = sqlite_backend.iterativeFetch(query, 2)
     return iterator
Пример #6
0
 def iterativeFetchMethod(self):
     sql = self._readGroupSql
     query = self._dbconn.execute(sql)
     iterator = sqlite_backend.iterativeFetch(query, 2)
     return iterator