Learn R Programming

restez (version 1.0.0)

extract_by_patterns: 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

Value

character or NULL

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.

See Also

Other private: add_rcrd_log, cat_line, char, check_connection, cleanup, connected, connection_get, custom_download2, custom_download, 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_build2, 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, print.status, quiet_connect, readme_log, restez_path_check, restez_rl, seshinfo_log, setup, slctn_get, slctn_log, sql_path_get, status_class, stat, testdatadir_get