Mercurial > repos > charles_s_test > seqsero2
diff run_seqsero.py @ 3:38ad1130d077 draft
planemo upload commit a4fb57231f274270afbfebd47f67df05babffa4a-dirty
author | charles_s_test |
---|---|
date | Mon, 27 Nov 2017 11:21:07 -0500 |
parents | 6895de35a263 |
children | 3d6680af0bec |
line wrap: on
line diff
--- a/run_seqsero.py Sun Nov 12 02:27:32 2017 -0500 +++ b/run_seqsero.py Mon Nov 27 11:21:07 2017 -0500 @@ -4,13 +4,23 @@ import subprocess from subprocess import Popen, PIPE -database = '/nfs/sw/apps/galaxy/database/universe.sqlite' -seqsero = '/nfs/sw/apps/galaxy/tools/seqsero/SeqSero.py' -test_out = open("/nfs/sw/apps/galaxy/tools/seqsero/test.txt", 'w') -out_path = '/nfs/sw/apps/galaxy/database/files/000' -test_out2 = open("/nfs/sw/apps/galaxy/tools/seqsero/test2.txt", 'w') + +# Declare Variables +# paths to files and scripts + +fileDir = os.path.dirname(os.path.realpath('__file__')) +print fileDir -path2sample = '/nfs/sw/apps/galaxy/tools/seqsero/fastq_tmp' +fq_list1 = [] +Tool_directory = sys.argv[2] +database = Tool_directory + '/universe.sqlite' +seqsero = Tool_directory + 'SeqSero.py' +test_out = open(Tool_directory + "/test.txt", 'w') +out_path = Tool_directory + '/files/000' +test_out2 = open(Tool_directory + "/test2.txt", 'w') + +path2sample = Tool_directory + 'fastq_tmp' + #test_out2.write(" Test test test"); @@ -18,8 +28,10 @@ #test_out.write(""); test_out.write("\t".join(sys.argv)+'\n') -fq_list1 = [] -fq_list2 = [] + + + +print Tool_directory + ' path printed ' test_out.write(str(len(sys.argv))+"\n") if len(sys.argv) >= 2: @@ -33,7 +45,7 @@ def print_time(): test_out.write(time.asctime( time.localtime(time.time()))) -tmp_path = "/nfs/sw/apps/galaxy/tools/seqsero/fastq_tmp" +tmp_path = "fastq_tmp" if not os.path.exists(tmp_path): os.system('mkdir '+tmp_path) @@ -188,6 +200,13 @@ html_out.write('</html>\n') html_out.close() + +def readFile(filename): + filehandle = open(filename) + print filehandle.read() + filehandle.close() + + run2fastqs = list_runs(fastq_files) outputs = run_seqsero(run2fastqs) fastq2serotype, fastq2comment = get_serotypes(outputs)