Skip to content

Commit cb539c3

Browse files
committed
update readme
1 parent ebf2648 commit cb539c3

File tree

1 file changed

+45
-17
lines changed

1 file changed

+45
-17
lines changed

README.md

Lines changed: 45 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,35 @@ arrayify is a command-line tool for submitting and managing LSF job arrays using
99

1010
This is a Rust project with automated CI/CD using GitHub Actions.
1111

12-
## Installation
12+
## Usage
1313

14-
Ensure you have Rust installed, then build and install the tool:
14+
Submit Job Array:
15+
16+
First you need to decide on a command to run and produce a "template" for it
17+
18+
For example to submit spades with paired end reads
1519

1620
```
17-
cargo build --release
18-
```
19-
```
20-
cp target/release/arrayify /usr/local/bin/
21+
spades.py -1 read_1 -2 read_2 -o sample_out
2122
```
2223

23-
Alternatively, run directly with:
24+
In order to "convert" this into a format understood by arrayify you first need to replace the "wildcards" in the template
25+
26+
With -d (directory) options you are limted to ID,R1,R2 identifers however with the -s manifest any manifest header will be able to be used
2427

2528
```
26-
cargo run -- sub --csv jobs.csv --command "echo {ID} {R1} {R2}"
29+
"spades.py -1 {R1} -2 {R2} -o {ID}"
2730
```
2831

29-
## Usage
32+
!note this has to be quoted
3033

31-
Submit Job Array
34+
this can now be run and will create a array for each file pair in a directory or every row in a manifest
35+
36+
### example commands
37+
38+
```
39+
arrayify sub --dir <DIRECTORY> --command "<COMMAND_TEMPLATE>" [OPTIONS]
40+
```
3241

3342
```
3443
arrayify sub --csv <CSV_FILE> --command "<COMMAND_TEMPLATE>" [OPTIONS]
@@ -39,15 +48,17 @@ Required Arguments
3948
```
4049
-s, --csv <CSV_FILE>
4150
```
51+
OR
52+
```
53+
-d, --dir <DIRECTORY>
54+
```
4255

43-
Path to the CSV file containing job parameters.
56+
Template command containing "wildcard" replacement characters
4457

4558
```
4659
-c, --command <COMMAND_TEMPLATE>
4760
```
4861

49-
Command template with placeholders matching CSV headers.
50-
5162
Example: ```"echo {ID} {R1} {R2}"```
5263

5364
Optional Arguments
@@ -72,7 +83,7 @@ Default: 20% of total jobs (rounded up).
7283

7384
Set an explicit number to override auto-batching.
7485

75-
Example Submission
86+
### Example Submission
7687

7788
```
7889
arrayify sub --csv jobs.csv \
@@ -86,17 +97,17 @@ Check Job Status
8697
arrayify check <JOB_ID>
8798
```
8899

89-
Example
100+
### Example
90101

91102
```
92103
arrayify check 12345
93104
```
94105

95106
## How It Works
96107

97-
1. Parses the CSV file to extract job parameters.
108+
1. Parses the CSV file or directory to extract job parameters.
98109

99-
2. Replaces placeholders in the command template with CSV values.
110+
2. Replaces placeholders in the command template with CSV or directory values.
100111

101112
3. Generates and submits a job array using bsub.
102113

@@ -110,6 +121,23 @@ arrayify check 12345
110121

111122
6. Allows job status checking using bjobs.
112123

124+
## Installation
125+
126+
Ensure you have Rust installed, then build and install the tool:
127+
128+
```
129+
cargo build --release
130+
```
131+
```
132+
cp target/release/arrayify /usr/local/bin/
133+
```
134+
135+
Alternatively, run directly with:
136+
137+
```
138+
cargo run -- sub --csv jobs.csv --command "echo {ID} {R1} {R2}"
139+
```
140+
113141
## Troubleshooting
114142

115143
Jobs not running? Check LSF queue status with:

0 commit comments

Comments
 (0)