Skip to contents

List possible linking methods

Usage

link_what(from, to, ...)

# S4 method for Tool,Tool
link_what(from, to)

# S4 method for Tool,SBGWorkflow
link_what(from, to)

# S4 method for SBGWorkflow,Tool
link_what(from, to)

# S4 method for SBGWorkflow,SBGWorkflow
link_what(from, to)

Arguments

from

either Tool App or SBGWorkflow object

to

either Tool App or Workflow object

...

more auguments

Value

A Workflow object

Details

Given two object of Tool, Flow or App, list all possible input/output match.

Examples

t1 <- system.file("extdata/app", "tool_unpack_fastq.json", package = "sevenbridges")
t2 <- system.file("extdata/app", "tool_star.json", package = "sevenbridges")
t1 <- convert_app(t1)
t2 <- convert_app(t2)
# check possible link
link_what(t1, t2)
#> $File...
#> $File...$from
#>                    id              label    type fileTypes          full.name
#> 1 #output_fastq_files Output FASTQ files File...     FASTQ #SBG_Unpack_FASTQs
#> 
#> $File...$to
#>              id                label    type required prefix
#> 1        #reads        Read sequence File...     TRUE   <NA>
#> 95 #sjdbGTFfile Splice junction file File...    FALSE   <NA>
#>                                                   fileTypes full.name
#> 1  FASTA, FASTQ, FA, FQ, FASTQ.GZ, FQ.GZ, FASTQ.BZ2, FQ.BZ2     #STAR
#> 95                                            GTF, GFF, TXT     #STAR
#> 
#> 
tool.in <- system.file("extdata/app", "tool_unpack_fastq.json", package = "sevenbridges")
flow.in <- system.file("extdata/app", "flow_star.json", package = "sevenbridges")
t1 <- convert_app(tool.in)
f2 <- convert_app(flow.in)
link_what(t1, f2)
#> $File...
#> $File...$from
#>                    id              label    type fileTypes
#> 1 #output_fastq_files Output FASTQ files File...     FASTQ
#> 
#> $File...$to
#>             id       label    type required fileTypes
#> 1 #sjdbGTFfile sjdbGTFfile File...    FALSE      null
#> 2       #fastq       fastq File...     TRUE      null
#>                                                 link_to
#> 1 #STAR_Genome_Generate.sjdbGTFfile | #STAR.sjdbGTFfile
#> 2                     #SBG_FASTQ_Quality_Detector.fastq
#> 
#> 
tool.in <- system.file("extdata/app", "tool_unpack_fastq.json", package = "sevenbridges")
flow.in <- system.file("extdata/app", "flow_star.json", package = "sevenbridges")
t1 <- convert_app(tool.in)
f2 <- convert_app(flow.in)
link_what(f2, t1)
#> $File
#> $File$from
#>                              id                       label type required
#> 2  #transcriptome_aligned_reads transcriptome_aligned_reads File    FALSE
#> 3             #splice_junctions            splice_junctions File    FALSE
#> 4               #reads_per_gene              reads_per_gene File    FALSE
#> 6           #chimeric_junctions          chimeric_junctions File    FALSE
#> 7          #intermediate_genome         intermediate_genome File    FALSE
#> 8          #chimeric_alignments         chimeric_alignments File    FALSE
#> 9                   #sorted_bam                  sorted_bam File    FALSE
#> 10                      #result                      result File    FALSE
#>    fileTypes                            link_to
#> 2       null  #STAR.transcriptome_aligned_reads
#> 3       null             #STAR.splice_junctions
#> 4       null               #STAR.reads_per_gene
#> 6       null           #STAR.chimeric_junctions
#> 7       null          #STAR.intermediate_genome
#> 8       null          #STAR.chimeric_alignments
#> 9       null         #Picard_SortSam.sorted_bam
#> 10      null #SBG_FASTQ_Quality_Detector.result
#> 
#> $File$to
#>                    id              label type required               prefix
#> 1 #input_archive_file Input archive file File     TRUE --input_archive_file
#>                                        fileTypes
#> 1 TAR, TAR.GZ, TGZ, TAR.BZ2, TBZ2,  GZ, BZ2, ZIP
#> 
#>