Skip to content

Commit

Permalink
added some extra docs
Browse files Browse the repository at this point in the history
  • Loading branch information
manulera committed May 10, 2023
1 parent a9e1ffa commit c2d15de
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
3 changes: 1 addition & 2 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async def root():


@ app.get("/process_allele", response_model=ProcessAlleleResponse)
async def check_allele(allele_name: str = Query(example="pact1-cut11-mch:KanMX6", description="The name of the allele to be checked")):
async def check_allele(allele_name: str = Query(example="ura4+::pact1-cut11-mch:KanMX6", description="The name of the allele to be checked")):

# Here is where your function would take the allele name and return the pattern
allele_pattern = name2pattern(allele_name)
Expand All @@ -54,7 +54,6 @@ async def check_allele(allele_name: str = Query(example="pact1-cut11-mch:KanMX6"
pseudo_grammar = post_process_pseudo_grammar(pseudo_grammar)
input_tree = ParentedTree('ROOT', tree_list)
output_tree = apply_pseudo_grammar(input_tree, pseudo_grammar)
print(allele_pattern)
# response = ProcessAlleleResponse(
# name=allele_name,
# pattern=allele_pattern
Expand Down
1 change: 0 additions & 1 deletion genestorian_module/genestorian_module/build_nltk_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def build_nltk_tag(allele_names, toml_files, separators_path="../../allele_compo
print('finding features using', toml_file.split('/')[-1])
feature_dict, feature_name = build_feature_dict(toml_file)
for allele_dict in output_list:
print(allele_dict['pattern'])
allele_dict['pattern'] = tokenize_allele_features(
feature_dict, allele_dict['pattern'], feature_name, [])

Expand Down
2 changes: 1 addition & 1 deletion interface.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h1>Get allele components</h1>
<div class="row align-items-center mb-3">
<div class="col-auto">
<label for="allele-name">Write your allele</label>
<input type="text" class="form-control" id="allele-name" value="pact1-cut11-mch:KanMX6">
<input type="text" class="form-control" id="allele-name" value="ura4+::pact1-cut11-mch:KanMX6">
</div>
</div>
<input id='submit-button' type="submit" class="btn btn-primary m-2" />
Expand Down
18 changes: 18 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

A project to extract genotype information from lab spreadsheets.

## Quickstart ⏲️

```bash
# Install dependencies
poetry install

# Activate virtual environment
poetry shell

# Download some necessary data to find fluorescence protein
python get_fpbase_data.py ../allele_components/tags_fpbase.toml

# Start a dev server
uvicorn api:app --reload
```

Go to http://127.0.0.1:8000, and you should be able to try the example.

## Installing

For the python dependencies management, we will use [poetry](https://python-poetry.org/). To install the dependencies use:
Expand Down

0 comments on commit c2d15de

Please sign in to comment.