Get the CWL workflow graph as a list of two data frames: a data frame of nodes and a data frame of edges.
get_graph(inputs, outputs, steps)
Parsed inputs
Parsed outputs
Parsed steps
List of two data frames containing node and edge information
# sbg:draft2
flow <- system.file("cwl/sbg/workflow/gatk4-wgs.json", package = "tidycwl") %>% read_cwl_json()
get_graph(
flow %>% parse_inputs(),
flow %>% parse_outputs(),
flow %>% parse_steps()
) %>% str()
#> List of 2
#> $ nodes:'data.frame': 36 obs. of 3 variables:
#> ..$ id : chr [1:36] "intervals_file" "dbsnp" "mills" "fastq" ...
#> ..$ label: chr [1:36] "Target BED" "dbsnp" "Mills" "Fastq" ...
#> ..$ group: chr [1:36] "input" "input" "input" "input" ...
#> $ edges:'data.frame': 43 obs. of 5 variables:
#> ..$ from : chr [1:43] "SBG_FASTA_Indices" "Sambamba_Merge" "reference" "BWA_MEM_Bundle_0_7_17" ...
#> ..$ to : chr [1:43] "SBG_Genome_Coverage" "SBG_Genome_Coverage" "SBG_Untar_fasta" "Sambamba_Merge" ...
#> ..$ port_from: chr [1:43] "fasta_reference" "merged_bam" NA "aligned_reads" ...
#> ..$ port_to : chr [1:43] "fasta" "bam" "input_tar_with_reference" "bams" ...
#> ..$ type : chr [1:43] "step_to_step" "step_to_step" "input_to_step" "step_to_step" ...
# v1.0
flow <- system.file("cwl/sbg/workflow/rnaseq-salmon.json", package = "tidycwl") %>% read_cwl_json()
get_graph(
flow %>% parse_inputs(),
flow %>% parse_outputs(),
flow %>% parse_steps()
) %>% str()
#> List of 2
#> $ nodes:'data.frame': 62 obs. of 3 variables:
#> ..$ id : chr [1:62] "transcriptome_fasta_or_salmon_index_archive" "reads" "gtf" "max_number_of_parallel_jobs" ...
#> ..$ label: chr [1:62] "Transcriptome FASTA or Salmon index archive" "FASTQ Read Files" "Gene map or GTF file" "Maximum number of parallel jobs" ...
#> ..$ group: chr [1:62] "input" "input" "input" "input" ...
#> $ edges:'data.frame': 62 obs. of 5 variables:
#> ..$ from : chr [1:62] "Salmon_Quant___Reads" "Salmon_Quant___Reads" "reads" "max_number_of_parallel_jobs" ...
#> ..$ to : chr [1:62] "SBG_Create_Expression_Matrix___Transcripts" "SBG_Create_Expression_Matrix___Genes" "SBG_Pair_FASTQs_by_Metadata_1" "SBG_Pair_FASTQs_by_Metadata_1" ...
#> ..$ port_from: chr [1:62] "quant_sf" "quant_genes_sf" NA NA ...
#> ..$ port_to : chr [1:62] NA NA NA NA ...
#> ..$ type : chr [1:62] "step_to_step" "step_to_step" "input_to_step" "input_to_step" ...