Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhixu Ni committed Apr 13, 2020
2 parents 9641ed0 + acae532 commit 33e276b
Show file tree
Hide file tree
Showing 20 changed files with 327 additions and 8 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# LipidLynxX ![LipidLynx_Logo](doc/images/LipidLynxX_Logo_128.jpg)

![Platforms](https://img.shields.io/badge/Platform-Linux%20%7C%20macOS%20%7C%20Windows-blue.svg)
[![Travis (.com) all](https://img.shields.io/travis/com/SysMedOs/LipidLynxX/master.svg)](https://travis-ci.com/SysMedOs/LipidLynx)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f2180cda82034653ba57eed4473ed135)](https://app.codacy.com/gh/SysMedOs/LipidLynxX?utm_source=github.com&utm_medium=referral&utm_content=SysMedOs/LipidLynxX&utm_campaign=Badge_Grade_Dashboard)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/c02db70257b64538af60df36c480b042)](https://app.codacy.com/app/zhixu.ni/LipidLynx?utm_source=github.com&utm_medium=referral&utm_content=SysMedOs/LipidLynx&utm_campaign=Badge_Grade_Dashboard)
![GitHub last commit](https://img.shields.io/github/last-commit/SysMedOs/LipidLynxX.svg)

The LipidLynxX project is aimed to provide a unified identifier for major lipids, especially oxidized lipids
Expand All @@ -14,8 +13,8 @@ in the epilipidome.
The current LipidLynxX source code was tested using our collection of lipid abbreviations
for major lipid classes from following databases and programs:

- Databases (3):
- `HMDB`, `LIPID MAPS`, `Swisslipid`
- Databases (4):
- `HMDB`, `LIPID MAPS`, `LipidHome`, `SwissLipids`

- Programs (17):

Expand Down
12 changes: 12 additions & 0 deletions doc/sample_data/input/LipidLynxX_conveter_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
palmitic acid
DHA
HETE
DPPE
Plasmanyl-PC O-16:0_18:2
GPEtn(18:0/22:6(4Z,7Z,10Z,13Z,16Z,19Z))
Cer(t18:0/26:0)
SM(d18:1/26:0)
MG(16:0)
DG(16:0/18:2(9Z,12Z)/0:0)[iso2]
TG(16:0/18:0/18:2(9Z,12Z))[iso6]
TG(16:0/18:2/HETE)
Binary file modified doc/sample_data/input/LipidLynxX_test.xlsx
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion lynx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from lynx.utils.file_readers import get_table, create_output, create_equalizer_output
from lynx.utils.toolbox import keep_string_only

lynx_version = 0.4
lynx_version = "0.4.12"

app = Flask(__name__)
app.config.from_object(DevConfig)
Expand Down
2 changes: 1 addition & 1 deletion lynx/configurations/rules/input/LIPIDMAPS_LMSD.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"LIPIDMAPS",
"LMSD",
"Lipostar",
"Swisslipids"
"SwissLipids"
],
"SEPARATORS": {
"RESIDUE_SEPARATOR": "_|/",
Expand Down
238 changes: 238 additions & 0 deletions lynx/configurations/rules/input/LipidHome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
{
"_DATE": 20200303,
"_AUTHORS": [
"zhixu.ni@uni-leipzig.de"
],
"SOURCES": [
"LipidHome"
],
"SEPARATORS": {
"RESIDUE_SEPARATOR": "_|/",
"MOD_SEPARATOR": "-",
"SPACE": "\\s",
"COLON": ":",
"SEMICOLON": ";",
"BRACKET_LEFT": "\\[",
"BRACKET_RIGHT": "\\]",
"SEPARATOR_LEVELS": {
"B": "",
"D": "_",
"S": "/"
}
},
"MODS": {
"MOD": {
"ORDER": [
"MOD_SITE",
"MOD_SITE_INFO",
"MOD_SEPARATOR",
"MOD_TYPE"
],
"OPTIONAL": [
"MOD_SITE_INFO",
"MOD_SEPARATOR",
"MOD_TYPE"
],
"MOD_SITE": "(\\s?,)?([0-9]{1,2})",
"MOD_SITE_INFO": "([EZRS])?",
"MOD_SEPARATOR": "$.SEPARATORS.MOD_SEPARATOR.0",
"MOD_TYPE": "([a-zA-Z]*[-0-9a-zA-Z]*)",
"EXAMPLES": [
"9",
"9Z",
"9OH",
"9S-OH"
]
},
"SUM_MODS": {
"ORDER": [
"BRACKET_LEFT",
"MOD",
"BRACKET_RIGHT"
],
"REPEAT": {
"MOD": [
1,
10
]
},
"BRACKET_LEFT": "$.SEPARATORS.BRACKET_LEFT.0",
"MOD": "$.MODS.MOD.0",
"BRACKET_RIGHT": "$.SEPARATORS.BRACKET_RIGHT.0",
"EXAMPLES": [
"[9]",
"[9,12]"
]
}
},
"RESIDUES": {
"RESIDUE": {
"ORDER": [
"RESIDUE_SEPARATOR",
"LINK",
"NUM_C",
"DB_SEPARATOR",
"DB",
"O_SEPARATOR",
"NUM_O",
"SUM_MODS"
],
"OPTIONAL": [
"RESIDUE_SEPARATOR",
"LINK",
"DB",
"O_SEPARATOR",
"NUM_O",
"SUM_MODS"
],
"REPEAT": {
"SUM_MODS": [
0,
10
]
},
"RESIDUE_SEPARATOR": "$.SEPARATORS.RESIDUE_SEPARATOR.0",
"LINK": "[OP]-|C|[mdt]|h",
"NUM_C": "[0-9]{1,2}",
"DB_SEPARATOR": "$.SEPARATORS.COLON.0",
"DB": "[1,2]?[0-9]",
"O_SEPARATOR": "$.SEPARATORS.SEMICOLON.0",
"NUM_O": "[1-3]?O?",
"SUM_MODS": "$.MODS.SUM_MODS.0",
"EXAMPLES": [
"18:2",
"9:0",
"18:2[9Z,12Z]",
"/18:2[9Z,12Z]"
]
},
"RESIDUE_ALIAS": {
"ORDER": [
"RESIDUE_SEPARATOR",
"ALIAS"
],
"OPTIONAL": [
"RESIDUE_SEPARATOR"
],
"RESIDUE_SEPARATOR": "$.SEPARATORS.RESIDUE_SEPARATOR.0",
"ALIAS": "[-,0-9a-zA-Z\\s]{3,}",
"EXAMPLES": [
"HETE",
"/HDoTE"
]
},
"SUM_RESIDUES": {
"ORDER": [
"RESIDUE"
],
"REPEAT": {
"RESIDUE": [
1,
4
]
},
"RESIDUE": "($.RESIDUES.RESIDUE.0)|($.SEPARATORS.RESIDUE_ALIAS.0)",
"EXAMPLES": [
"18:2;3O",
"18:2;O",
"18:2",
"9:0",
"26:0;(2OH)",
"18:2;3O/18:2",
"18:2;O_18:2",
"18:0/20:4",
"18:0_20:4",
"18:0_9:0",
"18:0_26:0;(2OH)"
]
}
},
"LIPID_CLASSES": {
"GL": {
"LMSD_CLASSES": [
"GL01",
"GL02",
"GL03"
],
"ORDER": [
"CLASS",
"LIPID_CLASS_SEPARATOR",
"SUM_RESIDUES"
],
"OPTIONAL": [],
"MAX_RESIDUES": 3,
"CLASS": "TG|DG|MG",
"LIPID_CLASS_SEPARATOR": "$.SEPARATORS.SPACE.0",
"SUM_RESIDUES": "$.RESIDUES.SUM_RESIDUES.0",
"EXAMPLES": [
"MG 16:0",
"DG 34:2",
"DG 16:0_18:2_0:0",
"TG 52:2",
"TG 16:0/16:0/18:2[9,12]",
"TG P-16:0/16:0/18:2[9,12]"
]
},
"PL": {
"LMSD_CLASSES": [
"GP01",
"GP02",
"GP03",
"GP04",
"GP05",
"GP06",
"GP07",
"GP08",
"GP09",
"GP10",
"GP20"
],
"ORDER": [
"PREFIX",
"CLASS",
"SUFFIX",
"LIPID_CLASS_SEPARATOR",
"SUM_RESIDUES"
],
"OPTIONAL": [
"PREFIX",
"SUFFIX"
],
"MAX_RESIDUES": 2,
"PREFIX": "L",
"CLASS": "P[ACEDGSI]|PIP|PIP[2-6]",
"SUFFIX": "\\w*",
"LIPID_CLASS_SEPARATOR": "$.SEPARATORS.SPACE.0",
"SUM_RESIDUES": "$.RESIDUES.SUM_RESIDUES.0",
"EXAMPLES": [
"PC 16:0/18:2[9,12]"
]
},
"CL": {
"LMSD_CLASSES": [
"GP12"
],
"ORDER": [
"PREFIX",
"CLASS",
"LIPID_CLASS_SEPARATOR",
"SUM_RESIDUES"
],
"OPTIONAL": [
"PREFIX"
],
"MAX_RESIDUES": 4,
"PREFIX": "ML|DL",
"CLASS": "CL",
"LIPID_CLASS_SEPARATOR": "$.SEPARATORS.SPACE.0",
"SUM_RESIDUES": "$.RESIDUES.SUM_RESIDUES.0",
"EXAMPLES": [
"CL 72:7",
"CL 18:1/18:2/18:2/18:2",
"CL 36:3_36:4",
"MLCL 18:1_18:2_18:2",
"DLCL 18:1_18:2"
]
}
}
}
4 changes: 3 additions & 1 deletion lynx/controllers/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,9 @@ def export_levels(
# "PE O-18:1p/18:1",
# "PE-C16:0-C18:2",
# "HETE",
"TG(16:0/18:2/18:2[2xDB,1xOH])",
# "TG(16:0/18:2/18:2[2xDB,1xOH])",
"PC 16:0/18:2[9,12]",
"DG 16:2[9,12]_O-18:2_0:0"
]
lynx_gen = Encoder()
for t_in in t_in_lst:
Expand Down
Binary file added lynx/static/images/user_guide_converter_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lynx/static/images/user_guide_converter_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lynx/static/images/user_guide_converter_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lynx/static/images/user_guide_converter_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lynx/static/images/user_guide_converter_05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lynx/static/images/user_guide_equalizer_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lynx/static/images/user_guide_equalizer_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions lynx/templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ <h5>&nbsp;</h5>
<li><h5>LipidLynxX version: {{ lynx_version }}</h5></li>
<li><h5>API version: {{ api_version }}</h5></li>
</ul>
<a href="https://github.com/SysMedOs/LipidLynxX" class="text-dark" target="_blank">
Check latest version of LipidLynxX on GitHub &#128279;
</a>
<h4>&nbsp;</h4>
<h4>Developed by Team SysMedOs</h4>
<p>
Expand Down
6 changes: 6 additions & 0 deletions lynx/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@
<div class="col">
<h5><strong>LipidLynxX</strong></h5>
<p class="text-dark">Link lipid identifiers into an unified nomenclature</p>
<p class="text-dark"></p>
<p class="text-dark">
<a href="https://github.com/SysMedOs/LipidLynxX" class="text-dark" target="_blank">
Check latest version of LipidLynxX on GitHub &#128279;
</a>
</p>
</div>
<div class="col">
<h5><strong>About Us</strong></h5>
Expand Down
61 changes: 60 additions & 1 deletion lynx/templates/user_guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,64 @@ <h5>This user guide is designed for:</h5>
<li><h6>API version: {{ api_version }}</h6></li>
</ul>
<h5>Instructions:</h5>
<h5>......</h5>

<ul>
<li>Test input file: "LipidLynxX\doc\sample_data\input"</li>
<li>Test output file: "LipidLynxX\doc\sample_data\output"</li>
</ul>

<h5>Converter</h5>
<p>For Conversion, type/paste your lipid annotations or choose your .xlsx or .csv files. Press “convert
abbreviations” or “convert table”, wait for results. You will see the output on the right-hand side
or just download the table with converted IDs.</p>
<ul>
<li><p>Convert by text input</p>
<ul>
<li>Paste list of abbreviations in the text input field and press “convert abbreviations”.
<br>
<img src="..\static\images\user_guide_converter_01.png" alt="user_guide_converter_01" width="600">
</li>

<li>You will see the output on the right-hand side
or just download the table with converted IDs.<br>
<img src="..\static\images\user_guide_converter_02.png" alt="user_guide_converter_02" width="600">
</li>

</ul>
</li>
<li><p>Convert by table input</p>
<ul>
<li>Press "Choose file"<br>
<img src="..\static\images\user_guide_converter_03.png" alt="user_guide_converter_03" width="600">
</li>
<li>Select the input file in .xlsx or .csv format and press “Convert table”<br>
<img src="..\static\images\user_guide_converter_04.png" alt="user_guide_converter_04" width="600">
</li>
<li>You will see the output on the right-hand side or just download the table with converted IDs.<br>
<img src="..\static\images\user_guide_converter_05.png" alt="user_guide_converter_05" width="600">
</li>
</ul>
</li>
</ul>
<h5>Equalizer</h5>
<p>To Equalize, select LipidLynxX Equalizer tab from Home page. Select the level of annotations to which you would
like to cross-match your lipid annotations (you can select more than one). For details on annotation levels see
the tables on the right hand-side. Choose you datafile and press “Equalize”. Download your results as .xlsx
file. </p>
<ul>
<li><p>Convert by table input</p>
<ul>
<li>Press "Choose file" and select the input file in .xlsx or .csv format. Then select the level of
annotations to which you would like to cross-match your lipid annotations
(you can select more than one), in this case levels B0, D0 and D1 are chosen. Then you can press
“Equalize” to start processing.<br>
<img src="..\static\images\user_guide_equalizer_01.png" alt="user_guide_equalizer_01" width="600">
</li>
<li>You will see the output when the processing is finished and you can download the file in .xlsx
format.<br>
<img src="..\static\images\user_guide_equalizer_02.png" alt="user_guide_equalizer_02" width="600">
</li>
</ul>
</li>
</ul>
{% endblock %}

0 comments on commit 33e276b

Please sign in to comment.