mmextract: Extract all scaffolds within a selection polygon

Description Usage Arguments Value Author(s) Examples

View source: R/mmextract.R

Description

Finds all scaffolds that fall into a selection polygon highlighted in a plot generated by mmplot.

Usage

1
mmextract(mm, selection, min_length = 0, inverse = FALSE)

Arguments

mm

(required) A dataframe loaded with mmload.

selection

(required) A 2-column dataframe with the x and y coordinates of a selection of points in an mmplot. The column names of the provided dataframe must match column names in mm.

min_length

Filter all scaffolds with a length at or below this value before the extraction. (Default: 0)

inverse

(Logical) If TRUE, then the scaffolds within the selection are instead removed. (Default: FALSE)

Value

A dataframe (tibble) compatible with other mmgenome2 functions.

Author(s)

Kasper Skytte Andersen ksa@bio.aau.dk

Soren M. Karst smk@bio.aau.dk

Mads Albertsen MadsAlbertsen85@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(mmgenome2)
data(mmgenome2)
mmgenome2
selection <- data.frame(
  cov_C13.11.25 = c(7.2, 16.2, 25.2, 23.3, 10.1),
  cov_C14.01.09 = c(47, 77, 52.8, 29.5, 22.1)
)
mmgenome2_extraction <- mmextract(mmgenome2,
  min_length = 3000,
  selection = selection,
  inverse = FALSE
)
mmgenome2_extraction

KasperSkytte/mmgenome2 documentation built on Dec. 14, 2021, 12:11 a.m.