Skip to content

Commit

Permalink
Changes to make the pipelines and tools pyth 2 and 3 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
markmcdowall committed May 9, 2017
1 parent bd5f1de commit ea1155e
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 24 deletions.
12 changes: 6 additions & 6 deletions process_bed.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
limitations under the License.
"""

import argparse, urllib2, gzip, shutil, shlex, subprocess, os.path, json
import argparse, gzip, shutil, shlex, subprocess, os.path, json
from functools import wraps


Expand All @@ -31,8 +31,8 @@
from pycompss.api.task import task
from pycompss.api.constraint import constraint
except ImportError :
print "[Warning] Cannot import \"pycompss\" API packages."
print " Using mock decorators."
print("[Warning] Cannot import \"pycompss\" API packages.")
print(" Using mock decorators.")

from dummy_pycompss import *

Expand Down Expand Up @@ -120,17 +120,17 @@ def run(self, file_ids, metadata):
#2. Register the data with the DMP
da = dmp()

print da.get_files_by_user("test")
print(da.get_files_by_user("test"))

cs_file = da.set_file("test", chrom_size_file, "tsv", "ChIP-seq", "", None)
b_file = da.set_file("test", bed_file, "bed", "Assembly", "", None)
h5_file = da.set_file("test", h5_file, "hdf5", "index", "", None)

print da.get_files_by_user("test")
print(da.get_files_by_user("test"))

# 3. Instantiate and launch the App
from basic_modules import WorkflowApp
app = WorkflowApp()
results = app.launch(process_bed, [b_file, cs_file, h5_file], {"assembly" : assembly})

print da.get_files_by_user("test")
print(da.get_files_by_user("test"))
6 changes: 3 additions & 3 deletions process_gff3.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
limitations under the License.
"""

import argparse, urllib2, gzip, shutil, shlex, subprocess, os.path, json
import argparse, gzip, shutil, shlex, subprocess, os.path, json
from functools import wraps


Expand All @@ -33,8 +33,8 @@
from pycompss.api.task import task
from pycompss.api.constraint import constraint
except ImportError :
print "[Warning] Cannot import \"pycompss\" API packages."
print " Using mock decorators."
print("[Warning] Cannot import \"pycompss\" API packages.")
print(" Using mock decorators.")

from dummy_pycompss import *

Expand Down
7 changes: 3 additions & 4 deletions process_json_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
limitations under the License.
"""

import argparse, urllib2, gzip, shutil, shlex, subprocess, os.path, json
import argparse, gzip, shutil, shlex, subprocess, os.path, json
from functools import wraps


from basic_modules import Tool, Workflow, Metadata
from dmp import dmp

Expand All @@ -31,8 +30,8 @@
from pycompss.api.task import task
from pycompss.api.constraint import constraint
except ImportError :
print "[Warning] Cannot import \"pycompss\" API packages."
print " Using mock decorators."
print("[Warning] Cannot import \"pycompss\" API packages.")
print(" Using mock decorators.")

from dummy_pycompss import *

Expand Down
6 changes: 3 additions & 3 deletions process_wig.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
limitations under the License.
"""

import argparse, urllib2, gzip, shutil, shlex, subprocess, os.path, json
import argparse, gzip, shutil, shlex, subprocess, os.path, json
from functools import wraps


Expand All @@ -31,8 +31,8 @@
from pycompss.api.task import task
from pycompss.api.constraint import constraint
except ImportError :
print "[Warning] Cannot import \"pycompss\" API packages."
print " Using mock decorators."
print("[Warning] Cannot import \"pycompss\" API packages.")
print(" Using mock decorators.")

from dummy_pycompss import *

Expand Down
4 changes: 2 additions & 2 deletions tool/bed_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
from pycompss.api.parameter import FILE_IN, FILE_OUT
from pycompss.api.task import task
except ImportError :
print "[Warning] Cannot import \"pycompss\" API packages."
print " Using mock decorators."
print("[Warning] Cannot import \"pycompss\" API packages.")
print(" Using mock decorators.")

from dummy_pycompss import *

Expand Down
4 changes: 2 additions & 2 deletions tool/gff3_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
from pycompss.api.parameter import FILE_IN, FILE_OUT
from pycompss.api.task import task
except ImportError :
print "[Warning] Cannot import \"pycompss\" API packages."
print " Using mock decorators."
print("[Warning] Cannot import \"pycompss\" API packages.")
print(" Using mock decorators.")

from dummy_pycompss import *

Expand Down
4 changes: 2 additions & 2 deletions tool/json_3d_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
from pycompss.api.parameter import FILE_IN, FILE_OUT
from pycompss.api.task import task
except ImportError :
print "[Warning] Cannot import \"pycompss\" API packages."
print " Using mock decorators."
print("[Warning] Cannot import \"pycompss\" API packages.")
print(" Using mock decorators.")

from dummy_pycompss import *

Expand Down
4 changes: 2 additions & 2 deletions tool/wig_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
from pycompss.api.parameter import FILE_IN, FILE_OUT
from pycompss.api.task import task
except ImportError :
print "[Warning] Cannot import \"pycompss\" API packages."
print " Using mock decorators."
print("[Warning] Cannot import \"pycompss\" API packages.")
print(" Using mock decorators.")

from dummy_pycompss import *

Expand Down

0 comments on commit ea1155e

Please sign in to comment.