Skip to content

Commit

Permalink
Merge pull request #132 from EBISPOT/goci#874_Add_number_of_sumstats_…
Browse files Browse the repository at this point in the history
…to_Catalog_overviews

Update stats_file_generator.py
  • Loading branch information
ala-ebi authored Jan 12, 2023
2 parents d615020 + 899ba97 commit 905fdec
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions dataReleaseQC/stats_file_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,27 @@ def get_db_counts(connection):
connection.cursor.execute(snpCountSql)
returnData['snpcount'] = connection.cursor.fetchall()[0][0]

publishedSsCountSql = '''
SELECT COUNT(*)
FROM STUDY S,
PUBLICATION P,
HOUSEKEEPING HK
WHERE S.HOUSEKEEPING_ID = HK.ID
AND S.PUBLICATION_ID = P.ID
AND HK.IS_PUBLISHED = 1
AND S.FULL_PVALUE_SET = 1
'''
connection.cursor.execute(publishedSsCountSql)
publishedSsCount = connection.cursor.fetchall()[0][0]

unpublishedSsCountSql = '''
SELECT COUNT(*)
FROM UNPUBLISHED_STUDY
WHERE SUMMARY_STATS_FILE IS NOT NULL
'''
connection.cursor.execute(unpublishedSsCountSql)
returnData['sscount'] = connection.cursor.fetchall()[0][0] + publishedSsCount

return returnData


Expand Down

0 comments on commit 905fdec

Please sign in to comment.