# HG changeset patch # User sanbi-uwc # Date 1456747075 18000 # Node ID c2002302e04574dc16c3814d16a034a8c0adab26 # Parent 0b64aa6d4214b4485c59ee6abd500a6ac365b7ae planemo upload for repository https://github.com/zipho/data_manager_novoalign_license_uploader commit be79b240ea4f15deeaa8dfaf1a221bfbb23cc5e7 diff -r 0b64aa6d4214 -r c2002302e045 data_manager/upload_novoalign_lic.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data_manager/upload_novoalign_lic.py Mon Feb 29 06:57:55 2016 -0500 @@ -0,0 +1,28 @@ +#!/usr/bin/env +# Zipho Masholoigu (SANBI-UWC) + +import os +import argparse + +import logging +log = logging.getLogger( __name__ ) + +LICENSE_TARGET_DIRECTORY = "novoalign" + +#Parse Command Line +parser = argparse.ArgumentParser(description="Upload the nonoalign license to the tool-data path") +parser.add_argument('--license_filename') +parser.add_argument('--license_dir') + +args = parser.parse_args() +filename = args.license_filename + +#create the license target directory +target_dir = args.license_dir + "/" + LICENSE_TARGET_DIRECTORY +license_file = target_dir+"/"+"license.lic" +if not os.path.isfile(license_file): + os.mkdir( target_dir ) + #move/copy license file to the tool-data path + os.rename( filename, target_dir+"/"+"license.lic") +else: + log.debug("License for novoalign seems to exists already") diff -r 0b64aa6d4214 -r c2002302e045 data_manager/upload_novoalign_lic.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data_manager/upload_novoalign_lic.xml Mon Feb 29 06:57:55 2016 -0500 @@ -0,0 +1,29 @@ + + + Upload a license file to Galaxy tool-data directory + + + + + + upload_novoalign_lic.py --license_filename "${in_file}" --license_dir ${GALAXY_DATA_INDEX_DIR} + + + + + + + + + Loading the license file for Novo-align program to the tool-data path. + + + + + + + + + + + diff -r 0b64aa6d4214 -r c2002302e045 data_manager_conf.xml --- a/data_manager_conf.xml Sun Feb 28 14:51:11 2016 -0500 +++ b/data_manager_conf.xml Mon Feb 29 06:57:55 2016 -0500 @@ -1,27 +1,7 @@ - - - Upload a license file to Galaxy tool-data directory - - - - - upload_novoalign_lic.py $in_file $out_file - - - - + + + - - - - - Loading the license file for Novo-align program to the tool-data path. - - - - - - + + \ No newline at end of file diff -r 0b64aa6d4214 -r c2002302e045 upload_novoalign_lic.py --- a/upload_novoalign_lic.py Sun Feb 28 14:51:11 2016 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -#!/usr/bin/env -# Zipho Masholoigu (SANBI-UWC) - -import sys -import os -import tempfile -import shutil -import optparse -import urllib2 -import subprocess - -import logging -log = logging.getLogger( __name__ ) - -LICENCE_TARGET_DIRECTORY = "tool-data/novoalign/" - -#Parse Command Line -parser = optparse.OptionParser() -args = parser.parse_args() - -filename = args[0] - -#read the contents of the license file -license_str = open( filename ).read() - -#create the licence target directory -os.mkdir( LICENCE_TARGET_DIRECTORY ) - -#save info to json file -open( filename, 'wb' ).write( license_str )