Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #16 from moka-guys/v1.4
Browse files Browse the repository at this point in the history
 issues with running on workstation. specify path to ua
  • Loading branch information
andyb3 authored May 23, 2019
2 parents 62be5fb + 389a655 commit 81c7ec6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workstation Housekeeping v1.3
# Workstation Housekeeping v1.4
Scripts to manage data on the NGS workstation

---
Expand Down Expand Up @@ -36,4 +36,4 @@ $ findfastqs.sh RUNFOLDER
>>> RUNFOLDER has 156 demultiplexed fastq files with 2 undetermined. Total: 158
```

---
---
10 changes: 6 additions & 4 deletions backup_runfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import logging
from logging.config import dictConfig
import housekeeping_config as config

def log_setup(args):
"""Set up script logging object.
Expand Down Expand Up @@ -139,7 +140,8 @@ def __init__(self, runfolder, auth_token, project, ignore):
self.project = self.find_nexus_project(project)
# List of patterns to exclude files from upload
self.ignore = ignore

# set upload agent path
self.ua_path = config.ua_path

def read_auth_token(self, key_input):
"""Return the DNAnexus authentication toxen from the first line of an input file or an input string.
Expand Down Expand Up @@ -307,8 +309,8 @@ def call_upload_agent(self):
stop += 100

# Create DNAnexus upload command
nexus_upload_command = ('ua --auth-token {auth_token} --project {nexus_project} --folder {nexus_folder} --do-not-compress --upload-threads 10 --tries 100 {files}'.format(
auth_token=self.auth_token, nexus_project=self.project, nexus_folder=nexus_path, files=files_string))
nexus_upload_command = ('{ua_path} --auth-token {auth_token} --project {nexus_project} --folder {nexus_folder} --do-not-compress --upload-threads 10 --tries 100 {files}'.format(
ua_path=self.ua_path, auth_token=self.auth_token, nexus_project=self.project, nexus_folder=nexus_path, files=files_string))

# Mask the autentication key in the upload command and log
masked_nexus_upload_command = nexus_upload_command.replace(self.auth_token, "")
Expand Down Expand Up @@ -375,7 +377,7 @@ def main(args):

# Check DNAnexus utilities exist in system path.
logger.info('Searching for executables...')
find_executables(['ua', 'dx'])
find_executables([config.ua_path, 'dx'])

# Create an object to set up the upload agent command
logger.info('Creating UAcaller object with the following arguments: %s', vars(parsed_args))
Expand Down
2 changes: 2 additions & 0 deletions housekeeping_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ua_path="/usr/local/src/mokaguys/apps/dnanexus-upload-agent-1.5.17-linux/ua"

0 comments on commit 81c7ec6

Please sign in to comment.