Skip to content

Commit 7740bd7

Browse files
committed
The auto-style-correct keeps borking my spacing goddammit
1 parent e991638 commit 7740bd7

File tree

2 files changed

+42
-42
lines changed

2 files changed

+42
-42
lines changed

docs/side_quests/metadata.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -870,53 +870,53 @@ Applying this pattern in your own work will enable you to build robust, maintain
870870

871871
### Key patterns
872872

873-
1. **Reading and Structuring Metadata:** Reading CSV files and creating organized metadata maps that stay associated with your data files.
873+
1. **Reading and Structuring Metadata:** Reading CSV files and creating organized metadata maps that stay associated with your data files.
874874

875-
```groovy
876-
channel.fromPath('samplesheet.csv')
877-
.splitCsv(header: true)
878-
.map { row ->
879-
[ [id:row.id, character:row.character], row.recording ]
880-
}
881-
```
875+
```groovy
876+
channel.fromPath('samplesheet.csv')
877+
.splitCsv(header: true)
878+
.map { row ->
879+
[ [id:row.id, character:row.character], row.recording ]
880+
}
881+
```
882882

883-
2. **Expanding Metadata During Workflow** Adding new information to your metadata as your pipeline progresses by adding process outputs and deriving values through conditional logic
883+
2. **Expanding Metadata During Workflow** Adding new information to your metadata as your pipeline progresses by adding process outputs and deriving values through conditional logic.
884884

885-
- Adding new keys based on process output
885+
- Adding new keys based on process output
886886

887-
```groovy
888-
.map { meta, file, lang ->
889-
[ meta + [lang:lang], file ]
890-
}
891-
```
892-
893-
- Adding new keys using a conditional clause
894-
895-
```groovy
896-
.map{ meta, file ->
897-
if ( meta.lang.equals("de") || meta.lang.equals('en') ){
898-
lang_group = "germanic"
899-
} else if ( meta.lang in ["fr", "es", "it"] ) {
900-
lang_group = "romance"
901-
} else {
902-
lang_group = "unknown"
903-
}
904-
}
905-
```
887+
```groovy
888+
.map { meta, file, lang ->
889+
[ meta + [lang:lang], file ]
890+
}
891+
```
892+
893+
- Adding new keys using a conditional clause
894+
895+
```groovy
896+
.map{ meta, file ->
897+
if ( meta.lang.equals("de") || meta.lang.equals('en') ){
898+
lang_group = "germanic"
899+
} else if ( meta.lang in ["fr", "es", "it"] ) {
900+
lang_group = "romance"
901+
} else {
902+
lang_group = "unknown"
903+
}
904+
}
905+
```
906906

907-
3. **Customizing Process Behavior:** Using metadata to adapt how processes handle different files
907+
3. **Customizing Process Behavior:** Using metadata to adapt how processes handle different files.
908908

909-
- Using meta values in Process Directives
909+
- Using meta values in Process Directives
910910

911-
```groovy
912-
publishDir "results/${meta.lang_group}", mode: 'copy'
913-
```
911+
```groovy
912+
publishDir "results/${meta.lang_group}", mode: 'copy'
913+
```
914914
915-
- Adapting tool parameters for individual files
915+
- Adapting tool parameters for individual files
916916
917-
```groovy
918-
cat $input_file | cowpy -c ${meta.character} > cowpy-${input_file}
919-
```
917+
```groovy
918+
cat $input_file | cowpy -c ${meta.character} > cowpy-${input_file}
919+
```
920920
921921
### Additional resources
922922

docs/side_quests/splitting_and_grouping.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,27 +1152,27 @@ Mastering these channel operations will enable you to build flexible, scalable p
11521152
)
11531153
```
11541154

1155-
4. **Distributing across intervals:** We used `combine` to create Cartesian products of samples with genomic intervals for parallel processing
1155+
4. **Distributing across intervals:** We used `combine` to create Cartesian products of samples with genomic intervals for parallel processing.
11561156

11571157
```groovy
11581158
samples_ch.combine(intervals_ch)
11591159
```
11601160

1161-
5. **Aggregating by grouping keys:** We used `groupTuple` to group by the first element in each tuple, thereby collecting samples sharing `id` and `interval` fields and merging technical replicates
1161+
5. **Aggregating by grouping keys:** We used `groupTuple` to group by the first element in each tuple, thereby collecting samples sharing `id` and `interval` fields and merging technical replicates.
11621162

11631163
```groovy
11641164
channel.groupTuple()
11651165
```
11661166

1167-
6. **Optimizing the data structure:** We used `subMap` to extract specific fields and created a named closure for making transformations reusable
1167+
6. **Optimizing the data structure:** We used `subMap` to extract specific fields and created a named closure for making transformations reusable.
11681168

11691169
- Extract specific fields from a map
11701170

11711171
```groovy
11721172
meta.subMap(['id', 'repeat'])
11731173
```
11741174

1175-
- Named closure for reusable transformations
1175+
- Use named closure for reusable transformations
11761176

11771177
```groovy
11781178
getSampleIdAndReplicate = { meta, file -> [meta.subMap(['id', 'repeat']), file] }

0 commit comments

Comments
 (0)