11from mcp .server .fastmcp import FastMCP
2- from . tools import *
2+
33from .docs import search_docs
4+ from .tools import *
45
56mcp = FastMCP ("gsmap" )
67
@@ -58,11 +59,7 @@ def download_example_dataset(output_dir: str):
5859
5960
6061@mcp .tool ()
61- def gsmap_format_sumstats (
62- sumstats : str ,
63- out : str ,
64- args : list [str ] = []
65- ):
62+ def gsmap_format_sumstats (sumstats : str , out : str , args : list [str ] = []):
6663 """
6764 Convert GWAS summary statistics into gsMap-compatible format.
6865
@@ -107,11 +104,7 @@ def gsmap_format_sumstats(
107104
108105@mcp .tool ()
109106def gsmap_quick_mode (
110- workdir : str ,
111- hdf5_path : str ,
112- sumstats_file : str ,
113- trait_name : str ,
114- args : list [str ] = []
107+ workdir : str , hdf5_path : str , sumstats_file : str , trait_name : str , args : list [str ] = []
115108):
116109 """
117110 Run the gsMap quick_mode pipeline.
@@ -151,21 +144,12 @@ def gsmap_quick_mode(
151144
152145 Use this tool for most spatial GWAS analyses.
153146 """
154- return run_quick_mode (
155- workdir ,
156- hdf5_path ,
157- sumstats_file ,
158- trait_name ,
159- args
160- )
147+ return run_quick_mode (workdir , hdf5_path , sumstats_file , trait_name , args )
161148
162149
163150@mcp .tool ()
164151def gsmap_find_latent_representation (
165- workdir : str ,
166- sample_name : str ,
167- hdf5_path : str ,
168- args : list [str ] = []
152+ workdir : str , sample_name : str , hdf5_path : str , args : list [str ] = []
169153):
170154 """
171155 Step 1 of the gsMap step-by-step pipeline.
@@ -188,21 +172,11 @@ def gsmap_find_latent_representation(
188172 Optional additional CLI parameters for the latent
189173 representation learning step.
190174 """
191- return find_latent_representation (
192- workdir ,
193- sample_name ,
194- hdf5_path ,
195- args
196- )
175+ return find_latent_representation (workdir , sample_name , hdf5_path , args )
197176
198177
199178@mcp .tool ()
200- def gsmap_latent_to_gene (
201- workdir : str ,
202- sample_name : str ,
203- hdf5_path : str ,
204- args : list [str ] = []
205- ):
179+ def gsmap_latent_to_gene (workdir : str , sample_name : str , hdf5_path : str , args : list [str ] = []):
206180 """
207181 Step 2 of the gsMap step-by-step pipeline.
208182
@@ -223,21 +197,11 @@ def gsmap_latent_to_gene(
223197 args : list[str]
224198 Optional additional CLI flags.
225199 """
226- return latent_to_gene (
227- workdir ,
228- sample_name ,
229- hdf5_path ,
230- args
231- )
200+ return latent_to_gene (workdir , sample_name , hdf5_path , args )
232201
233202
234203@mcp .tool ()
235- def gsmap_generate_ldscore (
236- workdir : str ,
237- sample_name : str ,
238- chromosome : int ,
239- args : list [str ] = []
240- ):
204+ def gsmap_generate_ldscore (workdir : str , sample_name : str , chromosome : int , args : list [str ] = []):
241205 """
242206 Step 3 of the gsMap step-by-step pipeline.
243207
@@ -257,21 +221,12 @@ def gsmap_generate_ldscore(
257221 args : list[str]
258222 Optional additional CLI flags.
259223 """
260- return generate_ldscore (
261- workdir ,
262- sample_name ,
263- chromosome ,
264- args
265- )
224+ return generate_ldscore (workdir , sample_name , chromosome , args )
266225
267226
268227@mcp .tool ()
269228def gsmap_spatial_ldsc (
270- workdir : str ,
271- sample_name : str ,
272- sumstats_file : str ,
273- trait_name : str ,
274- args : list [str ] = []
229+ workdir : str , sample_name : str , sumstats_file : str , trait_name : str , args : list [str ] = []
275230):
276231 """
277232 Step 4 of the gsMap step-by-step pipeline.
@@ -296,13 +251,7 @@ def gsmap_spatial_ldsc(
296251 args : list[str]
297252 Optional additional CLI parameters.
298253 """
299- return spatial_ldsc (
300- workdir ,
301- sample_name ,
302- sumstats_file ,
303- trait_name ,
304- args
305- )
254+ return spatial_ldsc (workdir , sample_name , sumstats_file , trait_name , args )
306255
307256
308257@mcp .tool ()
@@ -324,4 +273,4 @@ def search_gsmap_docs(query: str):
324273
325274
326275def main ():
327- mcp .run ()
276+ mcp .run ()
0 commit comments