Split a column composed of nested lists into multiple columns.

extract_from_hmmer(data, column = "hits.domains")

Arguments

data

Dataframe whose column is going to be splitted.

column

Column to split.

Value

A DataFrame with columns column splitted into several columns.

Examples

data(phmmer_2abl)
extract_from_hmmer(
    data = phmmer_2abl,
    column = "hits.domains"
)
#> # A tibble: 35 × 85
#>    algor…¹ uuid  stats…² stats…³ stats…⁴ stats.Z stats…⁵ stats…⁶ stats…⁷ stats…⁸
#>    <chr>   <chr>   <dbl>   <int> <chr>     <dbl>   <int>   <int>   <int>   <int>
#>  1 phmmer  DCF1…       1     545 0.11     565928       0   14388     545  565928
#>  2 phmmer  DCF1…       1     545 0.11     565928       0   14388     545  565928
#>  3 phmmer  DCF1…       1     545 0.11     565928       0   14388     545  565928
#>  4 phmmer  DCF1…       1     545 0.11     565928       0   14388     545  565928
#>  5 phmmer  DCF1…       1     545 0.11     565928       0   14388     545  565928
#>  6 phmmer  DCF1…       1     545 0.11     565928       0   14388     545  565928
#>  7 phmmer  DCF1…       1     545 0.11     565928       0   14388     545  565928
#>  8 phmmer  DCF1…       1     545 0.11     565928       0   14388     545  565928
#>  9 phmmer  DCF1…       1     545 0.11     565928       0   14388     545  565928
#> 10 phmmer  DCF1…       1     545 0.11     565928       0   14388     545  565928
#> # … with 25 more rows, 75 more variables: stats.user <dbl>,
#> #   stats.domZ_setby <int>, stats.n_past_bias <int>, stats.sys <dbl>,
#> #   stats.n_past_fwd <int>, stats.total <dbl>, stats.nmodels <int>,
#> #   stats.nincluded <int>, stats.n_past_vit <int>, stats.nreported <int>,
#> #   stats.domZ <dbl>, hits.archScore <chr>, hits.ph <chr>, hits.arch <chr>,
#> #   hits.kg <chr>, hits.ndom <int>, hits.extlink <chr>, hits.acc2 <chr>,
#> #   hits.taxid <chr>, hits.acc <chr>, hits.taxlink <chr>, hits.desc <chr>, …