Skip to content

Commit f1e9b9e

Browse files
committed
please let this work
1 parent c4e86d7 commit f1e9b9e

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

docs/side_quests/splitting_and_grouping.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,56 +1128,56 @@ Mastering these channel operations will enable you to build flexible, scalable p
11281128
11291129
3. **Joining matched samples:** We used `join` to recombine related samples based on `id` and `repeat` fields
11301130
1131-
- Join two channels by key (first element of tuple)
1131+
- Join two channels by key (first element of tuple)
11321132
1133-
```groovy
1134-
tumor_ch.join(normal_ch)
1135-
```
1133+
```groovy
1134+
tumor_ch.join(normal_ch)
1135+
```
11361136
1137-
- Extract joining key and join by this value
1137+
- Extract joining key and join by this value
11381138
1139-
```groovy
1140-
tumor_ch.map { meta, file -> [meta.id, meta, file] }
1141-
.join(
1142-
normal_ch.map { meta, file -> [meta.id, meta, file] }
1143-
)
1144-
```
1139+
```groovy
1140+
tumor_ch.map { meta, file -> [meta.id, meta, file] }
1141+
.join(
1142+
normal_ch.map { meta, file -> [meta.id, meta, file] }
1143+
)
1144+
```
11451145
1146-
- Join on multiple fields using subMap
1146+
- Join on multiple fields using subMap
11471147
1148-
```groovy
1149-
tumor_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] }
1150-
.join(
1151-
normal_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] }
1152-
)
1153-
```
1148+
```groovy
1149+
tumor_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] }
1150+
.join(
1151+
normal_ch.map { meta, file -> [meta.subMap(['id', 'repeat']), meta, file] }
1152+
)
1153+
```
11541154
11551155
4. **Distributing across intervals:** We used `combine` to create Cartesian products of samples with genomic intervals for parallel processing.
11561156
1157-
```groovy
1158-
samples_ch.combine(intervals_ch)
1159-
```
1157+
```groovy
1158+
samples_ch.combine(intervals_ch)
1159+
```
11601160
11611161
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
1163-
```groovy
1164-
channel.groupTuple()
1165-
```
1163+
```groovy
1164+
channel.groupTuple()
1165+
```
11661166
11671167
6. **Optimizing the data structure:** We used `subMap` to extract specific fields and created a named closure for making transformations reusable.
11681168
1169-
- Extract specific fields from a map
1169+
- Extract specific fields from a map
11701170
1171-
```groovy
1172-
meta.subMap(['id', 'repeat'])
1173-
```
1171+
```groovy
1172+
meta.subMap(['id', 'repeat'])
1173+
```
11741174
1175-
- Use named closure for reusable transformations
1175+
- Use named closure for reusable transformations
11761176
1177-
```groovy
1178-
getSampleIdAndReplicate = { meta, file -> [meta.subMap(['id', 'repeat']), file] }
1179-
channel.map(getSampleIdAndReplicate)
1180-
```
1177+
```groovy
1178+
getSampleIdAndReplicate = { meta, file -> [meta.subMap(['id', 'repeat']), file] }
1179+
channel.map(getSampleIdAndReplicate)
1180+
```
11811181
11821182
### Additional resources
11831183

0 commit comments

Comments
 (0)