unite_NCBI_ac.nums {disprose} | R Documentation |
Assigns master record's id to all project records
Description
The function assigns the project master record's NCBI access number to all records that belong to the project.
Usage
unite_NCBI_ac.nums(
data,
ac.num.var,
title.var,
db.var,
type = "shotgun",
order = TRUE,
new.titles = FALSE
)
Arguments
data |
data frame; contains information about sequence records. |
ac.num.var |
character; data frame variable that contains sequence accession numbers. |
title.var |
character; data frame variable that contains sequence titles. |
db.var |
character; data frame variable that contains source data base names. |
type |
character; type of the project which records should be united with one accession number.
At the moment |
order |
logical; rearrange a data frame in alphabetical order of accession numbers (highly recommended). |
new.titles |
logical; add new titles according to new access numbers. |
Details
The function looks through all records in a data frame. If the record belongs to the project (for example, WGS-project), the function assigns the project master record's NCBI access number to this record. If the record is not related to any project, it retains its own accession number.
It is highly recommended to arrange the data in alphabetical order of accession numbers, since the first record among similar ones is determined as master record.
Value
If new.titles = FALSE
data frame with old and new access numbers is returned.
If new.titles = TRUE
data frame with old and new access numbers and new titles is returned.
Author(s)
Elena N. Filatova
Examples
# Example with sequences from WGS-project of Chlamydia pneumoniae genome
data (meta.target) #load metadata of target sequences with GenBank identificators
meta.target.new.ids <- unite_NCBI_ac.nums (data = meta.target,
ac.num.var = meta.target$GB_AcNum,
title.var = meta.target$title,
db.var = meta.target$source_db,
type = "shotgun", order = TRUE,
new.titles = TRUE)