extract_by_patterns: Extract by keyword

View source: R/extract-tools.R

extract_by_patternsR Documentation

Extract by keyword

Description

Search through GenBank record for a keyword and return text up to the end_pattern.

Usage

extract_by_patterns(record, start_pattern, end_pattern = "\n")

Arguments

record

GenBank record in text format, character

start_pattern

REGEX pattern indicating the point to start extraction, character

end_pattern

REGEX pattern indicating the point to stop extraction, character

Details

The start_pattern should be any of the capitalized elements in a GenBank record (e.g. LOCUS, DESCRIPTION, ACCESSION). The end_pattern depends on how much of the selected element a user wants returned. By default, the extraction will stop at the next newline. If keyword or end pattern not found, returns NULL.

Value

character or NULL

See Also

Other private: add_rcrd_log(), cat_line(), char(), check_connection(), cleanup(), connected(), connection_get(), db_download_intern(), db_sqlngths_get(), db_sqlngths_log(), dir_size(), dwnld_path_get(), dwnld_rcrd_log(), entrez_fasta_get(), entrez_gb_get(), extract_accession(), extract_clean_sequence(), extract_definition(), extract_features(), extract_inforecpart(), extract_keywords(), extract_locus(), extract_organism(), extract_seqrecpart(), extract_sequence(), extract_version(), file_download(), filename_log(), flatfile_read(), gb_build(), gb_df_create(), gb_df_generate(), gb_sql_add(), gb_sql_query(), gbrelease_check(), gbrelease_get(), gbrelease_log(), has_data(), identify_downloadable_files(), last_add_get(), last_dwnld_get(), last_entry_get(), latest_genbank_release_notes(), latest_genbank_release(), message_missing(), mock_def(), mock_gb_df_generate(), mock_org(), mock_rec(), mock_seq(), predict_datasizes(), readme_log(), restez_connect(), restez_disconnect(), restez_path_check(), restez_rl(), search_gz(), seshinfo_log(), setup(), slctn_get(), slctn_log(), sql_path_get(), status_class(), stat(), testdatadir_get()


restez documentation built on Oct. 25, 2023, 5:06 p.m.