File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,16 @@ export async function getWorkflowLandingUrl(
54
54
return `${ WORKFLOW_LANDING_URL_PREFIX } ${ encodeURIComponent ( id ) } ?public=true` ;
55
55
}
56
56
57
+ function buildFastaUrl ( identifier : string ) : string {
58
+ const baseUrl = "https://hgdownload.soe.ucsc.edu/hubs/" ;
59
+ const parts = identifier . split ( "_" ) ;
60
+ const formattedPath = `${ parts [ 0 ] } /${ parts [ 1 ] . slice ( 0 , 3 ) } /${ parts [ 1 ] . slice (
61
+ 3 ,
62
+ 6
63
+ ) } /${ parts [ 1 ] . slice ( 6 , 9 ) } /${ identifier } /${ identifier } .fa.gz`;
64
+ return `${ baseUrl } ${ formattedPath } ` ;
65
+ }
66
+
57
67
/**
58
68
* Get the appropriate `request_state` object for the given workflow ID and reference genome.
59
69
* @param workflowId - Workflow ID.
@@ -69,6 +79,11 @@ function getWorkflowLandingsRequestState(
69
79
if ( workflowId === WORKFLOW_ID . VARIANT_CALLING && geneModelUrl ) {
70
80
return {
71
81
"Annotation GTF" : { ext : "gtf.gz" , src : "url" , url : geneModelUrl } ,
82
+ "Genome fasta" : {
83
+ ext : "fasta.gz" ,
84
+ src : "url" ,
85
+ url : buildFastaUrl ( referenceGenome ) ,
86
+ } ,
72
87
} ;
73
88
}
74
89
return { reference_genome : referenceGenome } ;
You can’t perform that action at this time.
0 commit comments