Skip to content

Commit

Permalink
pagination issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sureshhewabi committed Apr 23, 2024
1 parent db37322 commit a9fc108
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions app/routes/pdbdev.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ async def get_psm_level_residue_pairs(project_id: Annotated[str, Path(...,
WHERE u.id IN %(upload_ids)s AND mp1.link_site1 > 0 AND mp2.link_site1 > 0 AND pe1.is_decoy = false AND pe2.is_decoy = false
AND si.pass_threshold = true
GROUP BY pe1.dbsequence_ref , dbs1.accession, (pe1.pep_start + mp1.link_site1 - 1), pe2.dbsequence_ref, dbs2.accession , (pe2.pep_start + mp2.link_site1 - 1)
ORDER BY pe1.dbsequence_ref , (pe1.pep_start + mp1.link_site1 - 1), pe2.dbsequence_ref, (pe2.pep_start + mp2.link_site1 - 1)
) as count;"""
else:
count_sql = """SELECT count(*) FROM (SELECT array_agg(si.id) as match_ids, array_agg(u.identification_file_name) as files,
Expand All @@ -209,7 +208,6 @@ async def get_psm_level_residue_pairs(project_id: Annotated[str, Path(...,
upload u on u.id = si.upload_id
WHERE u.id IN %(upload_ids)s AND mp1.link_site1 > 0 AND mp2.link_site1 > 0 AND pe1.is_decoy = false AND pe2.is_decoy = false
GROUP BY pe1.dbsequence_ref , dbs1.accession, (pe1.pep_start + mp1.link_site1 - 1), pe2.dbsequence_ref, dbs2.accession , (pe2.pep_start + mp2.link_site1 - 1)
ORDER BY pe1.dbsequence_ref , (pe1.pep_start + mp1.link_site1 - 1), pe2.dbsequence_ref, (pe2.pep_start + mp2.link_site1 - 1)
) as count;"""

cur.execute(sql, sql_values)
Expand Down

0 comments on commit a9fc108

Please sign in to comment.