Get cBioPortal Variants

Script to subset record from cBioPortal format files

Table of Contents

get_cbioportal_variants

Requirement:

Example command

subset_cpt

subset_cst

subset_cna

subset_sv

subset_maf

Sub-modules

read_tsv

Read a tsv file

Arguments:

  • maf File - Input MAF/tsv like format file

Returns:

  • data_frame - Output a data frame containing the MAF/tsv

read_ids

make a list of ids

Arguments:

  • sid tuple - Multiple ids as tuple

  • ids File - File containing multiple ids

Returns:

  • list - List containing all ids

filter_by_columns

Filter data by columns

Arguments:

  • sid list - list of columns to subset over

  • tsv_df data_frame - data_frame to subset from

Returns:

  • data_frame - A copy of the subset of the data_frame

filter_by_rows

Filter the data by rows

Arguments:

  • sid list - list of row names to subset over

  • tsv_df data_frame - data_frame to subset from

  • col_name string - name of the column to filter using names in the sid

Returns:

  • data_frame - A copy of the subset of the data_frame

read_bed

Read BED file using bed_lookup

Arguments:

  • bed file - File ins BED format to read

Returns:

object : bed file object to use for filtering

check_if_covered

Function to check if a variant is covered in a given bed file

Arguments:

  • bedObj object - BED file object to check coverage

  • mafObj data_frame - data frame to check coverage against coordinates using column 'Chromosome' and position column is 'Start_Position'

Returns:

  • data_frame - description

get_row

Function to skip rows

Arguments:

  • tsv_file file - file to be read

Returns:

  • list - lines to be skipped

Last updated

Was this helpful?