diff init.py @ 4:dcd39bcc7481 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/maxquant commit da342a782ccc391b87fb4fead956b7b3cbd21258"
author galaxyp
date Sat, 11 Apr 2020 11:49:19 -0400
parents 175e062b6a17
children
line wrap: on
line diff
--- a/init.py	Thu Aug 15 08:09:00 2019 -0400
+++ b/init.py	Sat Apr 11 11:49:19 2020 -0400
@@ -5,9 +5,7 @@
 TODO: Append function: only add modifications that are not
 already present, add modification entries to conda maxquant
 
-Authors: Damian Glaetzer <d.glaetzer@mailbox.org>
-
-Usage: init.py [-a] [-m MODS_FILE] [-e ENZYMES_FILE]
+Usage: init.py [-m MODS_FILE] [-e ENZYMES_FILE]
 FILES are the modifications/enzymes.xml of MaxQuant, located at
 <ANACONDA_DIR>/pkgs/maxquant-<VERSION>/bin/conf/.
 (for conda installations)
@@ -40,19 +38,20 @@
 
 if args.modifications:
     mods_root = ET.parse(args.modifications).getroot()
-
     mods = mods_root.findall('modification')
     standard_mods = []
     label_mods = []
+    iso_labels = []
     for m in mods:
         if (m.findtext('type') == 'Standard' or m.findtext('type') == 'AaSubstitution'):
             standard_mods.append(m.get('title'))
         elif m.findtext('type') == 'Label':
             label_mods.append(m.get('title'))
+        elif m.findtext('type') == 'IsobaricLabel':
+            iso_labels.append(m.get('title'))
 
 if args.enzymes:
     enzymes_root = ET.parse(args.enzymes).getroot()
-
     enzymes = enzymes_root.findall('enzyme')
     enzymes_list = [e.get('title') for e in enzymes]
 
@@ -62,6 +61,8 @@
         build_list(child, 'modification', standard_mods)
     elif child.get('name') == 'label' and args.modifications:
         build_list(child, 'label', label_mods)
+    elif child.get('name') == 'iso_labels' and args.modifications:
+        build_list(child, 'iso_labels', iso_labels)
     elif child.get('name') == 'proteases' and args.enzymes:
         build_list(child, 'proteases', enzymes_list)