You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/looper/advanced-guide/advanced-run-options.md
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,19 +18,19 @@ Let's introduce some of the more advanced capabilities of `looper run`.
18
18
19
19
## Grouping many jobs into one
20
20
21
-
By default, `looper` will translate each row in your `sample_table` into a single job. But perhaps you are running a project with tens of thousands of rows, and each job only takes mere minutes to run; in this case, you'd rather just submit a single job to process many samples. `Looper` makes this easy with the `--lump` and `--lumpn` command line arguments.
21
+
By default, `looper` will translate each row in your `sample_table` into a single job. But perhaps you are running a project with tens of thousands of rows, and each job only takes mere minutes to run; in this case, you'd rather just submit a single job to process many samples. `Looper` makes this easy with the `--lump` and `--lump-n` command line arguments.
22
22
23
-
### Lumping jobs by job count: `--lumpn`
23
+
### Lumping jobs by job count: `--lump-n`
24
24
25
-
It's quite simple: if you want to run 100 samples in a single job submission script, just tell looper `--lumpn 100`.
25
+
It's quite simple: if you want to run 100 samples in a single job submission script, just tell looper `--lump-n 100`.
26
26
27
27
### Lumping jobs by input file size: `--lump`
28
28
29
-
But what if your samples are quite different in terms of input file size? For example, your project may include many small samples, which you'd like to lump together with 10 jobs to 1, but you also have a few control samples that are very large and should have their own dedicated job. If you just use `--lumpn` with 10 samples per job, you could end up lumping your control samples together, which would be terrible. To alleviate this problem, `looper` provides the `--lump` argument, which uses input file size to group samples together. By default, you specify an argument in number of gigabytes. Looper will go through your samples and accumulate them until the total input file size reaches your limit, at which point it finalizes and submits the job. This will keep larger files in independent runs and smaller files grouped together.
29
+
But what if your samples are quite different in terms of input file size? For example, your project may include many small samples, which you'd like to lump together with 10 jobs to 1, but you also have a few control samples that are very large and should have their own dedicated job. If you just use `--lump-n` with 10 samples per job, you could end up lumping your control samples together, which would be terrible. To alleviate this problem, `looper` provides the `--lump` argument, which uses input file size to group samples together. By default, you specify an argument in number of gigabytes. Looper will go through your samples and accumulate them until the total input file size reaches your limit, at which point it finalizes and submits the job. This will keep larger files in independent runs and smaller files grouped together.
30
30
31
-
### Lumping jobs by input file size: `--lumpj`
31
+
### Lumping jobs by job count: `--lump-j`
32
32
33
-
Or you can lump samples into number of jobs.
33
+
If you want to split your samples across a specific number of jobs, use `--lump-j`. For example, `--lump-j 10` will distribute all your samples evenly across 10 jobs.
34
34
35
35
36
36
## Running project-level pipelines
@@ -251,22 +251,28 @@ For example, to choose only samples where the `species` attribute is `human`, `m
251
251
252
252
```console
253
253
looper run \
254
-
--sel-attr species
254
+
--sel-attr species \
255
255
--sel-incl human mouse fly
256
256
```
257
257
258
258
Similarly, to submit only one sample, with `sample_name` as `sample`, you could use:
259
259
260
260
```console
261
261
looper run \
262
-
--sel-attr sample_name
262
+
--sel-attr sample_name \
263
263
--sel-incl sample1
264
264
```
265
265
266
266
### Sample selection by exclusion
267
267
268
-
If more convenient to *exclude* samples by filter, you can use the analogous arguments `--sel-attr` with `--sel-excl`.
269
-
This will
268
+
If it's more convenient to *exclude* samples by filter, you can use the analogous arguments `--sel-attr` with `--sel-excl`.
269
+
This will exclude any samples matching the specified values. For example, to run all samples *except* those where `species` is `rat`:
Copy file name to clipboardExpand all lines: docs/looper/user-tutorial/initialize.md
+87-37Lines changed: 87 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,36 +87,56 @@ Chiapas
87
87
88
88
## Step 3: Create a metadata table
89
89
90
-
Looper needs a list of samples in the form of a sample metadata table, which names each sample and includes paths to the data files. Looper will accept a PEP, which we'll discuss more later, or just a simple CSV file, which is where we'll start. Create a new file called `metadata/sample_table.csv`and paste this content in it:
90
+
Looper needs a list of samples in the form of a sample metadata table, which names each sample and includes paths to the data files. Looper will accept a PEP, which we'll discuss more later, or just a simple CSV file, which is where we'll start. Create a new file called `metadata/sample_table.csv`with this content:
Each row corresponds to a sample, with a unique identifier under `sample_name`, a pointer to its corresponding file in `file_path`, and any other information you want to include about the sample (in this case, `area_type`). These will be the different values available to pass to your pipeline.
100
113
101
114
## Step 4: Create the pipeline
102
115
103
-
Our example pipeline is a shell script that counts the lines in an input file. Since our data has one line per province, this script will tell us how many provinces there are in each country. Create a file under`pipeline/count_lines.sh` with this content:
116
+
Our example pipeline is a shell script that counts the lines in an input file. Since our data has one line per province, this script will tell us how many provinces there are in each country. Create a file at`pipeline/count_lines.sh` with this content:
104
117
105
-
```sh title="pipeline/count_lines.sh"
106
-
#!/bin/bash
107
-
linecount=`wc -l $1| sed -E 's/^[[:space:]]+//'| cut -f1 -d''`
0 commit comments