Skip to contents

Rename columns from API results to work with gnomeR functions

Usage

rename_columns(df_to_check)

Arguments

df_to_check

a data frame for which to check colums

Value

a renamed data frame

Examples


rename_columns(df_to_check = oncokbR::blca_mutation)
#> # A tibble: 1,595 × 33
#>    hugo_symbol entrez_gene_id uniqueSampleKey                   uniquePatientKey
#>    <chr>                <int> <chr>                             <chr>           
#>  1 ABL1                    25 UC0wMDA1NjkwLVQwMS1JTTU6YmxjYV9u… UC0wMDA1NjkwOmJ…
#>  2 ABL1                    25 UC0wMDAzNDMzLVQwMS1JTTU6YmxjYV9u… UC0wMDAzNDMzOmJ…
#>  3 ABL1                    25 UC0wMDAzNDMzLVQwMS1JTTU6YmxjYV9u… UC0wMDAzNDMzOmJ…
#>  4 ABL1                    25 UC0wMDAzMjYxLVQwMS1JTTU6YmxjYV9u… UC0wMDAzMjYxOmJ…
#>  5 ABL1                    25 UC0wMDAzNTY2LVQwMS1JTTU6YmxjYV9u… UC0wMDAzNTY2OmJ…
#>  6 ABL1                    25 UC0wMDAxNDUzLVQwMS1JTTM6YmxjYV9u… UC0wMDAxNDUzOmJ…
#>  7 ABL1                    25 UC0wMDA2MTI0LVQwMS1JTTU6YmxjYV9u… UC0wMDA2MTI0OmJ…
#>  8 PARP1                  142 UC0wMDAzMzYyLVQwMS1JTTU6YmxjYV9u… UC0wMDAzMzYyOmJ…
#>  9 PARP1                  142 UC0wMDAzNTY2LVQwMS1JTTU6YmxjYV9u… UC0wMDAzNTY2OmJ…
#> 10 AKT1                   207 UC0wMDA0NzU3LVQwMS1JTTU6YmxjYV9u… UC0wMDA0NzU3OmJ…
#> # ℹ 1,585 more rows
#> # ℹ 29 more variables: molecular_profile_id <chr>, sample_id <chr>,
#> #   patient_id <chr>, study_id <chr>, center <chr>, mutation_status <chr>,
#> #   validation_status <chr>, tumorAltCount <int>, tumorRefCount <int>,
#> #   normalAltCount <int>, normalRefCount <int>, start_position <int>,
#> #   end_position <int>, reference_allele <chr>, hgv_sp_short <chr>,
#> #   variant_classification <chr>, functionalImpactScore <chr>, …
rename_columns(df_to_check = oncokbR::blca_sv)
#> # A tibble: 13 × 44
#>    uniqueSampleKey    uniquePatientKey molecular_profile_id sample_id patient_id
#>    <chr>              <chr>            <chr>                <chr>     <chr>     
#>  1 UC0wMDAxNDUzLVQwM… UC0wMDAxNDUzOmJ… blca_nmibc_2017_str… P-000145… P-0001453 
#>  2 UC0wMDAzNDA4LVQwM… UC0wMDAzNDA4OmJ… blca_nmibc_2017_str… P-000340… P-0003408 
#>  3 UC0wMDAzNjc3LVQwM… UC0wMDAzNjc3OmJ… blca_nmibc_2017_str… P-000367… P-0003677 
#>  4 UC0wMDA0MjI0LVQwM… UC0wMDA0MjI0OmJ… blca_nmibc_2017_str… P-000422… P-0004224 
#>  5 UC0wMDA0NTY0LVQwM… UC0wMDA0NTY0OmJ… blca_nmibc_2017_str… P-000456… P-0004564 
#>  6 UC0wMDA0NTY0LVQwM… UC0wMDA0NTY0OmJ… blca_nmibc_2017_str… P-000456… P-0004564 
#>  7 UC0wMDA1OTY2LVQwM… UC0wMDA1OTY2OmJ… blca_nmibc_2017_str… P-000596… P-0005966 
#>  8 UC0wMDA2MTI0LVQwM… UC0wMDA2MTI0OmJ… blca_nmibc_2017_str… P-000612… P-0006124 
#>  9 UC0wMDA2MTI0LVQwM… UC0wMDA2MTI0OmJ… blca_nmibc_2017_str… P-000612… P-0006124 
#> 10 UC0wMDA2NDI5LVQwM… UC0wMDA2NDI5OmJ… blca_nmibc_2017_str… P-000642… P-0006429 
#> 11 UC0wMDA2NzE0LVQwM… UC0wMDA2NzE0OmJ… blca_nmibc_2017_str… P-000671… P-0006714 
#> 12 UC0wMDA3OTY2LVQwM… UC0wMDA3OTY2OmJ… blca_nmibc_2017_str… P-000796… P-0007966 
#> 13 UC0wMDEwMjcxLVQwM… UC0wMDEwMjcxOmJ… blca_nmibc_2017_str… P-001027… P-0010271 
#> # ℹ 39 more variables: study_id <chr>, site_1_entrez_gene_id <int>,
#> #   site_1_hugo_symbol <chr>, site_1_ensembl_transcript_id <chr>,
#> #   site_1_chromosome <chr>, site_1_position <int>, site_1_contig <chr>,
#> #   site_1_region <chr>, site_1_region_number <int>, site_1_description <chr>,
#> #   site_2_entrez_gene_id <int>, site_2_hugo_symbol <chr>,
#> #   site_2_ensembl_transcript_id <chr>, site_2_chromosome <chr>,
#> #   site_2_position <int>, site_2_contig <chr>, site_2_region <chr>, …