Skip to content

Commit

Permalink
Merge pull request #15 from jiaan-yu/mRNA-exp
Browse files Browse the repository at this point in the history
Add tool LocaliseFolder
  • Loading branch information
rlupat authored May 4, 2022
2 parents cfc95de + 50b29b2 commit 53ad244
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions janis_unix/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
from .uncompressarchive import UncompressArchive
from .transposetsv import TransposeTsv
from .gatherfilestofolder import GatherFilesToFolder
from .localisefolder import LocaliseFolder
46 changes: 46 additions & 0 deletions janis_unix/tools/localisefolder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
from janis_core import (
Array,
File,
ToolInput,
ToolOutput,
Filename,
InputSelector,
ToolArgument,
Directory,
String,
)

from .unixtool import UnixTool


class LocaliseFolder(UnixTool):
def tool(self):
return "LocaliseFolder"

def friendly_name(self):
return "LocaliseFolder"

def base_command(self):
return None

def inputs(self):
return [
ToolInput(
"dir",
Directory,
position=3,
),
]

def outputs(self):
return [ToolOutput("out", Directory, selector=InputSelector("dir"))]

def arguments(self):
return [
ToolArgument("cp", position=1, shell_quote=False),
ToolArgument("-r", position=2, shell_quote=False),
ToolArgument(".", position=4, shell_quote=False),
]

def bind_metadata(self):
self.metadata.documentation = """localise folder"""

0 comments on commit 53ad244

Please sign in to comment.