maxLocation {GeneStructureTools} | R Documentation

## Find the largest distance between two vectors of numbers Helper function for get_orfs

### Description

Find the largest distance between two vectors of numbers Helper function for get_orfs

### Usage

    maxLocation(startSite, stopSite, longest = 1)

### Arguments

`startSite` | vector of start sites - i.e Met amino acid positions
`stopSite` | vector of stop sites - i.e Stop (*) amino acid positions
`longest` | which pair to return (1 = longest pair, 2= 2nd longest pair etc.)

### Value

sequential start site and end site with the greatest difference

### Author(s)

Beth Signal

### See Also

Other ORF annotation: `getOrfs`, `getUOrfs`, `orfSimilarity`

### Examples

    starts <- c(1,10,15,25)
    stops <- c(4,16,50,55)
    # longest start site = 25, longest stop site = 50
    maxLocation(starts, stops, longest = 1)
    starts <- c(1,10,15,25)
    stops <- c(4,14,50,55)
    # longest start site = 15, longest stop site = 50
    maxLocation(starts, stops, longest = 1)
    # 2nd longest start site = 10, 2nd longest stop site = 14
    maxLocation(starts, stops, longest = 2)

[Package GeneStructureTools version 1.2.1 Index]