Main Content

combine

Combine two objects

Description

example

combinedData = combine(data1,data2) combines sequence data from two objects of the same class (BioRead or BioMap) and returns the data combinedData in a new object. The combine function concatenates the properties of the two objects.

example

newObj = combine(data1,data2,'Name',objName) specifies the name objName for newObj.

Examples

collapse all

Load the first data set.

br1 = BioRead('ex1.sam')
br1 = 
  BioRead with properties:

     Quality: [1501x1 File indexed property]
    Sequence: [1501x1 File indexed property]
      Header: [1501x1 File indexed property]
       NSeqs: 1501
        Name: ''


Load the second data set.

br2 = BioRead('ex2.sam')
br2 = 
  BioRead with properties:

     Quality: [3307x1 File indexed property]
    Sequence: [3307x1 File indexed property]
      Header: [3307x1 File indexed property]
       NSeqs: 3307
        Name: ''


Combine the two data sets. Set the name of the new object to 'combinedData'.

br3 = combine(br1,br2,'Name','combinedData')
br3 = 
  BioRead with properties:

     Quality: {4808x1 cell}
    Sequence: {4808x1 cell}
      Header: {4808x1 cell}
       NSeqs: 4808
        Name: 'combinedData'

Input Arguments

collapse all

First sequence read data to be combined with the second sequence read data, specified as a BioRead or BioMap object.

Second sequence read data to be combined with the first sequence read data, specified as a BioRead or BioMap object.

Name of the combined object, specified as a character vector or string.

Version History

Introduced in R2010a