mmexport: Export DNA sequences of selected scaffolds

Description Usage Arguments Author(s) Examples

View source: R/mmexport.R

Description

Writes the DNA sequences of a given set of scaffolds from the assembly to a FASTA file.

Usage

1
2
3
4
5
mmexport(
  scaffolds,
  assembly = get("assembly", envir = .GlobalEnv),
  file = "exported_assembly.fa"
)

Arguments

scaffolds

(required) Either a vector of scaffold names or a dataframe loaded with mmload containing the scaffolds to extract from the assembly.

assembly

(required) The assembly to subset and export. Must be an object of class "DNAStringSet" as loaded with readDNAStringSet. By default any object named "assembly" in the global environment will be used.

file

The file path and file name of the file to write the sequences to. (Default: "exported_assembly.fa")

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
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
## Not run: 
mmexport(mmgenome2_extraction,
  assembly = assembly,
  file = "bins/exported_assembly.fa"
)

## End(Not run)

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