Skip to content

Commit

Permalink
fix PSMFeatureExtractor
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Feb 21, 2021
1 parent dee80f8 commit 7585813
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
22 changes: 11 additions & 11 deletions tools/openms/PSMFeatureExtractor.patch
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
--- PSMFeatureExtractor.xml.orig 2021-02-16 16:30:38.919393993 +0100
+++ PSMFeatureExtractor.xml 2021-02-16 16:32:34.862390198 +0100
@@ -17,6 +17,11 @@
--- PSMFeatureExtractor.xml.orig 2021-02-19 19:18:58.635157367 +0100
+++ PSMFeatureExtractor.xml 2021-02-19 19:23:28.943370062 +0100
@@ -17,8 +17,12 @@

## Preprocessing
mkdir in &&
+#if $in
+${ ' '.join(["ln -s '%s' 'in/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in if _]) }
mkdir ${' '.join(["'in/%s'" % (i) for i, f in enumerate($in) if f])} &&
${' '.join(["ln -s '%s' 'in/%s/%s.%s' && " % (f, i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($in) if f])}
+#else if $in_single
+ln -s '$in_single' 'in/${re.sub("[^\w\-_]", "_", $in_single.element_identifier)}.$gxy2omsext($in_single.ext)' &&
+#end if
mkdir ${' '.join(["'in/%s'" % (i) for i, f in enumerate($in) if f])} &&
${' '.join(["ln -s '%s' 'in/%s/%s.%s' && " % (f, i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($in) if f])}
mkdir out &&
@@ -28,7 +33,11 @@

## Main program call
@@ -28,6 +32,10 @@
python3 '$__tool_directory__/fill_ctd.py' '@[email protected]' '$args_json' '$hardcoded_json' &&
@EXECUTABLE@ -ini @[email protected]
-in
Expand All @@ -23,14 +24,13 @@
+#end if
-out
'out/output.${out_type}'

@@ -42,7 +51,8 @@
@@ -42,7 +50,8 @@
<configfile name="hardcoded_json"><![CDATA[{"log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile>
</configfiles>
<inputs>
- <param name="in" argument="-in" type="data" format="idxml,mzid" multiple="true" optional="false" label="Input file(s)" help=" select idxml,mzid data sets(s)"/>
+ <param name="in_single" argument="-in" type="data" format="idxml,mzid" multiple="false" optional="true" label="Input file for batch processing" help="(exactly one of -in or -in_list is required)"/>
+ <param name="in" argument="-in" type="data" format="idxml,mzid" multiple="true" optional="true" label="Input file(s) for joint processing" help="(exactly one of -in or -in_list is required)"/>
+ <param name="in_single" argument="-in" type="data" format="idxml,mzid" multiple="false" optional="true" label="Input file for batch processing" help="(exactly one of the two inputs required) select idxml,mzid data sets(s)"/>
+ <param name="in" argument="-in" type="data" format="idxml,mzid" multiple="true" optional="true" label="Input files for joint processing" help="(exactly one of the two inputs is required) select idxml,mzid data sets(s)"/>
<param name="out_type" argument="-out_type" display="checkboxes" type="select" optional="false" label="Output file type -- default: determined from file extension or content" help="">
<option value="idXML">idxml</option>
<option value="mzid">mzid</option>
9 changes: 4 additions & 5 deletions tools/openms/PSMFeatureExtractor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
## Preprocessing
mkdir in &&
#if $in
${ ' '.join(["ln -s '%s' 'in/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in if _]) }
mkdir ${' '.join(["'in/%s'" % (i) for i, f in enumerate($in) if f])} &&
${' '.join(["ln -s '%s' 'in/%s/%s.%s' && " % (f, i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($in) if f])}
#else if $in_single
ln -s '$in_single' 'in/${re.sub("[^\w\-_]", "_", $in_single.element_identifier)}.$gxy2omsext($in_single.ext)' &&
#end if
mkdir ${' '.join(["'in/%s'" % (i) for i, f in enumerate($in) if f])} &&
${' '.join(["ln -s '%s' 'in/%s/%s.%s' && " % (f, i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($in) if f])}
mkdir out &&
## Main program call
Expand Down Expand Up @@ -51,8 +50,8 @@ ${' '.join(["'in/%s/%s.%s'"%(i, re.sub('[^\w\-_]', '_', f.element_identifier), $
<configfile name="hardcoded_json"><![CDATA[{"log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile>
</configfiles>
<inputs>
<param name="in_single" argument="-in" type="data" format="idxml,mzid" multiple="false" optional="true" label="Input file for batch processing" help="(exactly one of -in or -in_list is required)"/>
<param name="in" argument="-in" type="data" format="idxml,mzid" multiple="true" optional="true" label="Input file(s) for joint processing" help="(exactly one of -in or -in_list is required)"/>
<param name="in_single" argument="-in" type="data" format="idxml,mzid" multiple="false" optional="true" label="Input file for batch processing" help="(exactly one of the two inputs required) select idxml,mzid data sets(s)"/>
<param name="in" argument="-in" type="data" format="idxml,mzid" multiple="true" optional="true" label="Input files for joint processing" help="(exactly one of the two inputs is required) select idxml,mzid data sets(s)"/>
<param name="out_type" argument="-out_type" display="checkboxes" type="select" optional="false" label="Output file type -- default: determined from file extension or content" help="">
<option value="idXML">idxml</option>
<option value="mzid">mzid</option>
Expand Down

0 comments on commit 7585813

Please sign in to comment.