mmexpand_network: Find connections of a subset of scaffolds in a larger set of...

Description Usage Arguments Value Author(s) Examples

View source: R/mmexpand_network.R

Description

Searches for all connections between the given set of scaffolds and the scaffolds in mm. The given set of scaffolds is often a subset of mm, but can also be a manually selected set of scaffolds from which to find connections in mm.

Usage

1
2
3
4
5
6
7
mmexpand_network(
  mm,
  scaffolds,
  network,
  min_connections = 2,
  include_connections = "direct"
)

Arguments

mm

(required) A dataframe loaded with mmload in which to find connections from scaffolds.

scaffolds

(required) The scaffolds from which to find connections in mm. Must be a vector of scaffold names or a dataframe with scaffold names in the first column.

network

(required) Paired-end or mate-pair connections between scaffolds in long format. The first and second columns must contain all connected scaffold pairs and the third column the number of connections.

min_connections

Filter all scaffold pairs with equal to or less than this number of connections before the extraction. (Default: 2)

include_connections

The connections to include. One of the following:

"direct"

Extract only scaffolds from mm that are directly connected to any of the scaffolds in scaffolds. (default)

"all"

Same as "direct", except that any further connections to connected scaffolds are also included, continuing until no further connections are found.

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
14
15
16
17
18
19
20
21
22
library(mmgenome2)
data(mmgenome2)
data(paired_ends)
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
mmgenome2_extraction_expanded <- mmexpand_network(
  mm = mmgenome2,
  scaffolds = mmgenome2_extraction,
  network = paired_ends,
  min_connections = 10,
  include_connections = "direct"
)
mmgenome2_extraction_expanded

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