Process the output of meta.retrieval
by first
un-zipping downloaded files and renaming them for more convenient downstream data analysis.
Arguments
- x
a vector containing file paths to the output files generated by
meta.retrieval
.- gunzip
a logical value indicating whether or not files should only be renamed (
gunzip = FALSE
) or renamed AND unzipped (gunzip
).
Details
The output of meta.retrieval
usually contains compressed sequence files
and a naming convention based on the database the respective file was retrieved from (e.g. Saccharomyces_cerevisiae_cds_from_genomic_refseq.fna.gz
).
This function helps to format the meta.retrieval
output files by
1) Automatically uncompress all sequence files in the
meta.retrieval
output folder2) Automatically rename files from e.g.
Saccharomyces_cerevisiae_cds_from_genomic_refseq.fna.gz
toScerevisiae.fa
. This allows more convenient downstream analyses and visualizations.
Examples
if (FALSE) {
# The easiest way to use 'clean.retrieval()' in combination with
# 'meta.retrieval()' is to use the pipe operator from the 'magrittr' package
library(magrittr)
meta.retrieval(kingdom = "vertebrate_mammalian",
db = "refseq",
type = "genome") %>% clean.retrieval()
}