Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

combine

Class: BioRead

Combine two objects

Syntax

NewObj = combine(BioObj1, BioObj2)
NewObj = combine(BioObj1, BioObj2, Name,Value)

Description

NewObj = combine(BioObj1, BioObj2) combines data from two objects of the same class and returns a new object. The combine method concatenates the properties of the two objects.

NewObj = combine(BioObj1, BioObj2, Name,Value) combines data from two objects of the same class with additional options specified by one or more Name,Value pair arguments.

Input Arguments

BioObj#

Object of the BioRead or BioMap class.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'Name'

Character vector describing NewObj. This character vector populates the Name property of NewObj.

Output Arguments

NewObj

Object of the BioRead or BioMap class.

Examples

Construct two BioRead objects, and then combine them:

% Create two structures with data from a FASTQ file
struct1 = fastqread('SRR005164_1_50.fastq', 'blockread', [1 10],...
                    'trimheaders', true);
struct2 = fastqread('SRR005164_1_50.fastq', 'blockread', [11 20],...
                    'trimheaders', true);
% Construct two BioRead objects from the two structures
BRObj1 = BioRead(struct1);
BRObj2 = BioRead(struct2);
% Combine the two BioRead objects and set the Name property
% of the new object
NewBRObj = combine(BRObj1, BRObj2, 'Name', 'BRObj1 + BRObj2')
NewBRObj = 

  BioRead with properties:

     Quality: {20x1 cell}
    Sequence: {20x1 cell}
      Header: {20x1 cell}
       NSeqs: 20
        Name: 'BRObj1 + BRObj2'
Was this topic helpful?