comparison run_skesa_collection.py @ 19:abb622c228c4 draft

planemo upload commit 1e3adef29c2d50fa89df02d0153e069c4328557e
author cstrittmatter
date Mon, 27 Aug 2018 08:59:02 -0400
parents
children
comparison
equal deleted inserted replaced
18:53d82924230b 19:abb622c228c4
1 import sys
2
3 from pathlib import Path
4
5 path1 = sys.argv[1]
6
7 cores = sys.argv[2]
8
9 memory = sys.argv[2]
10
11 print(path1)
12
13 #print(path2)
14
15 pathlist = Path(path1).glob('*fastq*')
16
17 i = 0
18 skcmd = []
19
20 skcmd.append("skesa ")
21
22 for path in pathlist:
23 # because path is object not string-wq
24 i += 1
25 path_in_str = str(path)
26 if i == 2:
27 skcmd.append("," + path_in_str)
28 #print("," + path_in_str)
29 i = 0
30 if i == 1:
31 skcmd.append(" --fastq " + path_in_str)
32 #print(" --fastq " + path_in_str)
33
34
35
36 if cores != 0:
37 skcmd.append(" --cores " + cores)
38
39
40 skcmd.append(" --memory " + memory)
41
42 skcmds = ''.join(skcmd)
43 print(skcmds)