Skip to content

Suggest 'related' workflows #163

Open
@stain

Description

For instance using this naive SPARQL that finds workflows using the same docker images:

PREFIX cwl: <https://w3id.org/cwl/cwl#>
PREFIX docker: <https://w3id.org/cwl/cwl#DockerRequirement/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT DISTINCT ?g2 (COUNT(?image2NoVersion) AS ?c)
WHERE {
  BIND(<http://sparql:3030/cwlviewer/github.com/genome/cancer-genomics-workflow/blob/202b43b7449485a317c857d62ca7d39196764e65/varscan/bgzip_and_index.cwl> AS ?g1)
  GRAPH ?g1 {
      [] docker:dockerPull ?image1 .
      BIND (REPLACE (?image1, ":.*", "") AS ?image1NoVersion)
  }
  
    GRAPH ?g2 {
      [] docker:dockerPull ?image2 .
    BIND (REPLACE (?image2, ":.*", "") AS ?image2NoVersion)
  }
  FILTER (?g1 != ?g2)  
  FILTER (?image1NoVersion = ?image2NoVersion)  
}

GROUP BY ?g2
ORDER BY DESC(?c)

Gives with ranking:

g2 ?c
http://sparql:3030/cwlviewer/github.com/genome/arvados_trial/blob/202b43b7449485a317c857d62ca7d39196764e65/detect_variants/detect_variants.cwl 42
http://sparql:3030/cwlviewer/github.com/genome/arvados_trial/blob/202b43b7449485a317c857d62ca7d39196764e65/pipeline.cwl 42
http://sparql:3030/cwlviewer/github.com/genome/cancer-genomics-workflow/blob/202b43b7449485a317c857d62ca7d39196764e65/detect_variants/detect_variants.cwl 42
http://sparql:3030/cwlviewer/github.com/genome/cancer-genomics-workflow/blob/202b43b7449485a317c857d62ca7d39196764e65/pipeline.cwl 42
http://sparql:3030/cwlviewer/github.com/genome/arvados_trial/blob/202b43b7449485a317c857d62ca7d39196764e65/varscan/workflow.cwl 22
http://sparql:3030/cwlviewer/github.com/genome/cancer-genomics-workflow/blob/202b43b7449485a317c857d62ca7d39196764e65/varscan/workflow.cwl 22
http://sparql:3030/cwlviewer/github.com/genome/arvados_trial/blob/202b43b7449485a317c857d62ca7d39196764e65/strelka/workflow.cwl 8
http://sparql:3030/cwlviewer/github.com/genome/cancer-genomics-workflow/blob/202b43b7449485a317c857d62ca7d39196764e65/strelka/workflow.cwl 8
http://sparql:3030/cwlviewer/github.com/genome/arvados_trial/blob/202b43b7449485a317c857d62ca7d39196764e65/pindel/workflow.cwl 6
http://sparql:3030/cwlviewer/github.com/genome/cancer-genomics-workflow/blob/202b43b7449485a317c857d62ca7d39196764e65/pindel/workflow.cwl 6
http://sparql:3030/cwlviewer/github.com/genome/arvados_trial/blob/202b43b7449485a317c857d62ca7d39196764e65/strelka/process_vcf.cwl 4
http://sparql:3030/cwlviewer/github.com/genome/arvados_trial/blob/202b43b7449485a317c857d62ca7d39196764e65/varscan/bgzip_and_index.cwl 4
http://sparql:3030/cwlviewer/github.com/genome/cancer-genomics-workflow/blob/202b43b7449485a317c857d62ca7d39196764e65/strelka/process_vcf.cwl 4
http://sparql:3030/cwlviewer/github.com/genome/arvados_trial/blob/202b43b7449485a317c857d62ca7d39196764e65/mutect/workflow.cwl 2
http://sparql:3030/cwlviewer/github.com/genome/cancer-genomics-workflow/blob/202b43b7449485a317c857d62ca7d39196764e65/mutect/workflow.cwl 2

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions