sids_check: Check if sids exist

View source: R/tools-cache.R

sids_checkR Documentation

Check if sids exist

Description

Check if sids are already downloaded for a txid.

Usage

sids_check(wd, txid)

Arguments

wd

Working directory

txid

Taxonomic ID, numeric

Details

#' @name sqs_load #' @title Load sequences from cache #' @description Load sequences downloaded by dwnld function. #' @param wd Working directory #' @param txid Taxonomic ID, numeric #' @family run-private #' @return SeqArc sqs_load <- function(wd, txid) d <- file.path(wd, 'cache') if (!file.exists(d)) stop('Cache does not exist.') d <- file.path(d, 'sqs') if (!file.exists(d)) stop('‘sqs' not in cache. Have you run the download stage?’) fl <- file.path(d, paste0(txid, '.RData')) if (!file.exists(fl)) stop(paste0('[', txid, '] not in ‘sqs' of cache.’)) sqs <- try(readRDS(file = fl), silent = TRUE) if (inherits(sqs, 'try-error')) file.remove(fl) sqs

Value

T/F

See Also

Other run-private: batcher(), blast_clstr(), blast_filter(), blast_setup(), blast_sqs(), blastcache_load(), blastcache_save(), blastdb_gen(), blastn_run(), cache_rm(), cache_setup(), clade_select(), clstr2_calc(), clstr_all(), clstr_direct(), clstr_sqs(), clstr_subtree(), clstrarc_gen(), clstrarc_join(), clstrrec_gen(), clstrs_calc(), clstrs_join(), clstrs_merge(), clstrs_renumber(), clstrs_save(), cmdln(), descendants_get(), download_obj_check(), error(), gb_extract(), hierarchic_download(), info(), ncbicache_load(), ncbicache_save(), obj_check(), obj_load(), obj_save(), outfmt_get(), parameters_load(), parameters_setup(), parent_get(), progress_init(), progress_read(), progress_reset(), progress_save(), rank_get(), rawseqrec_breakdown(), safely_connect(), search_and_cache(), searchterm_gen(), seeds_blast(), seq_download(), seqarc_gen(), seqrec_augment(), seqrec_convert(), seqrec_gen(), seqrec_get(), sids_get(), sids_load(), sids_save(), sqs_count(), sqs_save(), stage_args_check(), stages_run(), tax_download(), taxdict_gen(), taxtree_gen(), txids_get(), txnds_count(), warn()


ropensci/phylotaR documentation built on July 9, 2023, 3:17 p.m.