Skip to content

Commit

Permalink
simple steps for the transition to an operator
Browse files Browse the repository at this point in the history
  • Loading branch information
nvnieuwk committed Mar 20, 2024
1 parent 4e5472c commit 4970b54
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import groovy.json.JsonGenerator
import groovy.transform.CompileStatic
import groovy.util.logging.Slf4j
import groovyx.gpars.dataflow.DataflowWriteChannel
import groovyx.gpars.dataflow.DataflowReadChannel
import java.nio.file.Files
import java.nio.file.Path
import java.util.regex.Matcher
Expand All @@ -14,7 +15,7 @@ import nextflow.extension.CH
import nextflow.Channel
import nextflow.Global
import nextflow.Nextflow
import nextflow.plugin.extension.Factory
import nextflow.plugin.extension.Operator
import nextflow.plugin.extension.Function
import nextflow.plugin.extension.PluginExtensionPoint
import nextflow.script.WorkflowMetadata
Expand Down Expand Up @@ -133,10 +134,11 @@ class SchemaValidator extends PluginExtensionPoint {
m.findResult { k, v -> v instanceof Map ? findDeep(v, key) : null }
}

@Factory
@Operator
public DataflowWriteChannel fromSamplesheet(
Map options = null,
String samplesheetParam
final DataflowReadChannel source,
final Path schema,
final Map options = null,
) {
def Map params = session.params

Expand Down

0 comments on commit 4970b54

Please sign in to comment.