Process the output of meta.retrieval
by first
un-zipping downloaded files and renaming them for more convenient downstream data analysis.
clean.retrieval(x, gunzip = TRUE)
a vector containing file paths to the output files generated by meta.retrieval
.
a logical value indicating whether or not files should only be renamed (gunzip = FALSE
) or renamed AND unzipped (gunzip
).
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 folder
2) Automatically rename files from e.g. Saccharomyces_cerevisiae_cds_from_genomic_refseq.fna.gz
to Scerevisiae.fa
.
This allows more convenient downstream analyses and visualizations.
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()
}