Skip to content

Commit

Permalink
more paged variants
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudis committed Jun 6, 2024
1 parent 8178e76 commit 13f9daf
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/searchResults/DatasetResultBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export function DatasetResultBox({ data: responseSet, responseMeta, query }) {
const handoverById = (givenId) =>
resultsHandovers.find(({ info: { contentId } }) => contentId === givenId)

// obviously should be looped somehow...

const biosamplesHandover = handoverById(HANDOVER_IDS.biosamples)
const biocount = biosamplesHandover.info.count
const biosamplesReply = useProgenetixApi(
Expand All @@ -77,20 +79,24 @@ export function DatasetResultBox({ data: responseSet, responseMeta, query }) {
const variantsReply = useProgenetixApi(
variantsHandover && replaceWithProxy(variantsHandover.url)
)
const vcfHandover = handoverById(HANDOVER_IDS.vcf)
const pgxsegHandover = handoverById(HANDOVER_IDS.pgxseg)
variantsHandover.pages = []
vcfHandover.pages = []
pgxsegHandover.pages = []
cntr = 0
skpr = 0
while (cntr < varcount) {
const pagu = "&skip=" + skpr + "&limit=" + limit
cntr += limit
skpr += 1
variantsHandover.pages.push({"url": variantsHandover.url + pagu, "label": "Part" + skpr})
vcfHandover.pages.push({"url": vcfHandover.url + pagu, "label": "Part" + skpr})
pgxsegHandover.pages.push({"url": pgxsegHandover.url + pagu, "label": "Part" + skpr})
}


// const phenopacketsHandover = handoverById(HANDOVER_IDS.phenopackets)
// const vcfHandover = handoverById(HANDOVER_IDS.vcf)
// const pgxsegHandover = handoverById(HANDOVER_IDS.pgxseg)
const UCSCbedHandoverURL = handoverById(HANDOVER_IDS.UCSClink) === undefined ? false : handoverById(HANDOVER_IDS.UCSClink).url


Expand Down Expand Up @@ -296,7 +302,6 @@ export function DatasetResultBox({ data: responseSet, responseMeta, query }) {
</div>
</div>
)}
{/*
{vcfHandover?.pages && (
<div className="tabs ">
<div>
Expand All @@ -323,6 +328,7 @@ export function DatasetResultBox({ data: responseSet, responseMeta, query }) {
</div>
</div>
)}
{/*
{phenopacketsHandover?.pages && (
<div className="tabs">
<div>
Expand Down

0 comments on commit 13f9daf

Please sign in to comment.