feature_to_dataframe: Create a dataframe of protein features from JSON object

Description Usage Arguments Value Examples

View source: R/extract_from_api.R

Description

This function works on the object returned by the get_features() function. It creates a data.frame of features and includes the accession number AND an order number. It uses the extract_feat_acc function below.

Usage

1
feature_to_dataframe(features_in_lists_of_six)

Arguments

features_in_lists_of_six

A list of lists returned by get_features() The number of lists corresponds to the number of accession numbers queried using get_features. The list of 6 contains protein names and features.

Value

A dataframe with 9 variables including type, description, begin, end, length, accession, entryName, taxid and order for plotting.

Examples

1
2
3
4
5
6
7
data("rel_json")
rel_data <- feature_to_dataframe(rel_json)
head(rel_data)

data("five_rel_list")
prot_data <- feature_to_dataframe(five_rel_list)
head(prot_data)

drawProteins documentation built on Nov. 8, 2020, 5:25 p.m.