Skip to content

Commit

Permalink
Add tar support (see #5)
Browse files Browse the repository at this point in the history
  • Loading branch information
RJMW committed Jun 6, 2018
1 parent 8cfba52 commit e1428c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 6 additions & 0 deletions galaxy/mzml2isa/mzml2isa.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@
python $__tool_directory__/wrapper.py
#if $input.format == "zip_file"
-inputzip "$input.source"
#else if $input.format == "tar_file"
-inputzip "$input.source"
#else if $input.format == "data_collection"
-folder "temp"
#end if
Expand Down Expand Up @@ -206,13 +208,17 @@
<conditional name="input">
<param name="format" type="select" label="Choose the source for the dataset" >
<option value="zip_file" selected="true">Zip file from your History containing a folder of *.mzML files</option>
<option value="tar_file">TAR file from your history containing a folder of *.mzML files</option>
<option value="data_collection">Data collection (*.mzML files)</option>
</param>
<when value="zip_file">
<param name="source" type="data" format="zip" label="Zip file from your History containing *.mzml files">
<validator type="empty_field" />
</param>
</when>
<when value="tar_file">
<param format="tar" name="tar_input" type="data" label="TAR file from your History containing *.mzml files"/>
</when>
<when value="data_collection">
<param name="source" type="data_collection" format="mzml" label="Data collection of *.mzml" >
<validator type="empty_field" />
Expand Down
9 changes: 1 addition & 8 deletions galaxy/mzml2isa/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def main():
'''))


p.add_argument('-inputzip', dest='inputzip', required=False)
p.add_argument('-inputzip', dest='inputzip', required=False, help="Provide a Zip or TAR file")
p.add_argument('-folder', dest='folder', required=False)
p.add_argument('-out_dir', dest='out_dir', required=True)
p.add_argument('-html_file', dest='html_file', required=True)
Expand Down Expand Up @@ -228,13 +228,6 @@ def main():
inp = args.inputzip
else:
inp = args.folder
print inp
print os.listdir(inp)
print "====================================================="
print "====================================================="
print "====================================================="
print "====================================================="
print "====================================================="
os.system("mzml2isa -i %s -o %s -s %s -m %s" % (inp, args.out_dir, args.study_title, temp.name))
temp.close()

Expand Down

0 comments on commit e1428c0

Please sign in to comment.