You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.3 KiB

  1. {% extends "base.html" %}
  2. {% block content %}
  3. <h2>Batch Query Chemicals</h2>
  4. <a href="https://git.junickim.me/junikimm717/walker-database/raw/master/validate.py"> Source Code with required type definitions </a>
  5. <br>
  6. <a href="{{ url_for ('static', filename='search.txt')}}">Sample TSV file to upload</a>
  7. <form method="post" enctype="multipart/form-data">
  8. <label for="input">Input (tab-delimited text file): </label>
  9. <input type="file" name="input">
  10. <input type="submit" value="Submit">
  11. </form>
  12. {% if invalid %}
  13. <p style="color: red;">Data Points are Incorrectly added: {{invalid}}</p>
  14. {% endif %}
  15. {% if success %}
  16. <p style="color: green;">Success!</p>
  17. {% for result in data %}
  18. <hr>
  19. <h2>Query {{loop.index}}</h2>
  20. <p>
  21. {{result.query.mz_min}} &lt; M/Z Ratio &lt; {{result.query.mz_max}},
  22. {{result.query.rt_min}} &lt; Retention Time &lt; {{result.query.rt_max}}
  23. </p>
  24. {% for hit in result.hits %}
  25. <div>
  26. <a href="{{hit.url}}">
  27. <h3>{{hit.name}}</h3>
  28. </a>
  29. <table>
  30. <tr>
  31. <td>Retention Time</td>
  32. <td>{{hit.rt}}</td>
  33. </tr>
  34. <tr>
  35. <td>M/Z Ratio</td>
  36. <td>{{hit.mz}}</td>
  37. </tr>
  38. </table>
  39. </div>
  40. {% endfor %}
  41. {% endfor %}
  42. {% endif %}
  43. {% endblock %}