メインコンテンツ

bioinfo.pipeline.block.GenomicsViewer

Open Genomics Viewer

Since R2024a

  • GenomicsViewer block icon

Description

A GenomicsViewer block enables you to open the Genomics Viewer app from a bioinformatics pipeline and visualize NGS data. The Genomics Viewer app allows you to view and explore such data with an embedded version of the Integrative Genomics Viewer (IGV) [1][2].

Creation

Description

b = bioinfo.pipeline.block.GenomicsViewer creates a GenomicsViewer block.

example

Properties

expand all

Function to handle errors from the run method of the block, specified as a function handle. The handle specifies the function to call if the run method encounters an error within a pipeline. For the pipeline to continue after a block fails, ErrorHandler must return a structure that is compatible with the output ports of the block. The error handling function is called with the following two inputs:

  • Structure with these fields:

    FieldDescription
    identifierIdentifier of the error that occurred
    messageText of the error message
    indexLinear index indicating which block process failed in the parallel run. By default, the index is 1 because there is only one run per block. For details on how block inputs can be split across different dimensions for multiple run calls, see Bioinformatics Pipeline SplitDimension.

  • Input structure passed to the run method when it fails

Data Types: function_handle

This property is read-only.

Input ports of the block, specified as a structure. The field names of the structure are the names of the block input ports, and the field values are bioinfo.pipeline.Input objects. These objects describe the input port behaviors. The input port names are the expected field names of the input structure that you pass to the block run method.

The GenomicsViewer block Inputs structure has the following fields:

  • ReferenceFile — Name of a reference genome file. This input is a required input that must be satisfied. For details, see ReferenceFile.

  • ReferenceIndex — Name of an index file for the reference sequence file. This input is optional. For details, see ReferenceIndex. (since R2026a)

  • Cytoband — Cytoband ideogram file name. This input is an optional input. For details, see CytoBand.

  • Tracks — Alignment or genomics data file names. This input is optional. For details, see Tracks.

  • TrackIndexes — Names of index files for the genomic data files. This input is optional. For details, see TrackIndexes. (since R2026a)

The default value for each field is a bioinfo.pipeline.datatypes.Unset object, which means that the value property of the input is not set yet.

Data Types: struct

This property is read-only.

Output ports of the block, specified as a structure. The field names of the structure are the names of the block output ports, and the field values are bioinfo.pipeline.Output objects. These objects describe the output port behaviors. The field names of the output structure returned by the block run method are the same as the output port names.

The GenomicsViewer block Outputs structure has the field named GenomicsViewer, which is a genomicsViewer object.

Data Types: struct

Object Functions

compilePerform block-specific additional checks and validations
copyCopy array of handle objects
emptyInputsCreate input structure for use with run method
evalEvaluate block object
runRun block object

Examples

collapse all

Suppose you already have a bioinformatics pipeline P. Use the following steps to add the GenomicsViewer block to the pipeline and open the Genomics Viewer app.

Create a GenomicsViewer block.

gv = bioinfo.pipeline.block.GenomicsViewer;

Define the value of the required input ReferenceFile of the block. You can specify the name of a local file, a URL to a remote file, or connect to the output of an upstream FileChooser block that points to the reference sequence file.

gv.Inputs.ReferenceFile.Value = "refseq.fa";

Optionally, you can specify the corresponding reference index file, cytoband, genomic data files, or their index files. For instance, to specify an alignment file, enter:

gv.Inputs.Tracks.Value = "track1.bam";

To see all the available inputs of the block, enter:

gv.Inputs
ans = 

  struct with fields:

     ReferenceFile: [1×1 bioinfo.pipeline.Input]
    ReferenceIndex: [1×1 bioinfo.pipeline.Input]
          Cytoband: [1×1 bioinfo.pipeline.Input]
            Tracks: [1×1 bioinfo.pipeline.Input]
      TrackIndexes: [1×1 bioinfo.pipeline.Input]

Add the block to the pipeline and run the pipeline. Then the Genomics Viewer app opens.

addBlock(P,gv);
run(P);

References

[1] Robinson, J., H. Thorvaldsdóttir, W. Winckler, M. Guttman, E. Lander, G. Getz, J. Mesirov. 2011. Integrative Genomics Viewer. Nature Biotechnology. 29:24–26.

[2] Thorvaldsdóttir, H., J. Robinson, J. Mesirov. 2013. Integrative Genomics Viewer (IGV): High-performance genomics data visualization and exploration. Briefings in Bioinformatics. 14:178–192.

Version History

Introduced in R2024a

expand all