Skip to content

Lineage query from path#6015

Closed
jorgee wants to merge 2 commits intomasterfrom
lineage-query-from-Path
Closed

Lineage query from path#6015
jorgee wants to merge 2 commits intomasterfrom
lineage-query-from-Path

Conversation

@jorgee
Copy link
Contributor

@jorgee jorgee commented Apr 29, 2025

Support URI-like queries in fromPath factory

process ls {
        input:
                path('file')
        output:
                stdout
        script:
        """
        ls -l file
        """
}

workflow {
        paths = Channel.fromPath("lid:///?type=FileOutput&annotations.value=test")
        paths.view()
        ls(paths).view()

}

jorgee added 2 commits April 29, 2025 13:15
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
@jorgee jorgee requested a review from pditommaso April 29, 2025 11:46
@netlify
Copy link

netlify bot commented Apr 29, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit bf24f2f
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/6810bc163b9db9000975bf37

@pditommaso
Copy link
Member

It looks like it throws this error when the annotation is missing/not matching

ERROR ~ Invalid LID file system path URI - make sure the schema prefix does not container more than two slash characters - offending value: lid:///?type=FileOutput&annotations.value=test
pr-29 16:49:42.276 [PathVisitor-1] ERROR nextflow.Channel - Property 'foo' doesn't exist in the lineage model.
java.lang.IllegalArgumentException: Property 'foo' doesn't exist in the lineage model.
	at nextflow.lineage.LinPropertyValidator.validate(LinPropertyValidator.groovy:69)
	at nextflow.lineage.LinPropertyValidator.validateQueryParams(LinPropertyValidator.groovy:76)
	at nextflow.lineage.LinUtils.parseQuery(LinUtils.groovy:195)
	at nextflow.lineage.DefaultLinStore.search(DefaultLinStore.groovy:99)
	at nextflow.lineage.fs.LinPath.resolveQuery(LinPath.groovy:530)
	at nextflow.file.PathVisitor.applyQueryablePath0(PathVisitor.groovy:119)
	at nextflow.file.PathVisitor.applyPathPattern0(PathVisitor.groovy:108)
	at nextflow.file.PathVisitor.apply(PathVisitor.groovy:69)
	at nextflow.file.PathVisitor$_applyAsync_closure1.doCall(PathVisitor.groovy:78)
	at nextflow.file.PathVisitor$_applyAsync_closure1.call(PathVisitor.groovy)
	at groovy.lang.Closure.run(Closure.java:505)
	at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)

@jorgee jorgee closed this May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants