morinlab / GAMBLR.viz

Collection of functions to make plots for Genomic Analysis of Mature B-cell Lymphomas in R
https://morinlab.github.io/GAMBLR.viz/
MIT License
0 stars 0 forks source link

Add ssm_to_proteinpaint function #21

Closed vladimirsouza closed 6 months ago

vladimirsouza commented 7 months ago

Previously, I wrote ssm_to_proteinpaint to create the maf table inside the function by using get_coding_ssm or get_ssm_by_regions internally. However, I decided to change it to always require an input maf table provided by the user. This may give more flexibility to its application.

Before converting the maf table to the ProteinPaint format, ssm_to_proteinpaint checks whether the input maf contains the needed columns. If not, error or warning messages are printed accordingly.

Extra columns are also taken from the metadata which is fetched internally in ssm_to_proteinpaint. To ensure compatibility with the user-provided maf, the metadata is internally created by get_gambl_metadata with parameter seq_type_filter = c("genome", "capture", "mrna")

Here is an example of running ssm_to_proteinpaint with the bundled data and saving its output to a file:

library(GAMBLR.viz)

# get maf
my_maf = get_coding_ssm(basic_columns = FALSE)

# convert maf to ProteinPaint format
pp_df = ssm_to_proteinpaint(my_maf)

# save ProteinPaint table to a file
write.table(pp_df, 
            "/gsc/www/bcgsc.ca/downloads/morinlab/vsouza/pp_df_bundled_data.txt", 
            quote = F, sep = "\t", row.names = F)

This file was successfully uploaded in https://proteinpaint.stjude.org/ by using this option: Screenshot from 2023-11-17 13-20-26

Unfortunately, I couldn't figure out how to use the dedicated lollipop plot option, this button: Screenshot from 2023-11-17 13-23-12

However, I learned how to get lollipop plots when using the Load mutations from text files option. We just have to click on a gene name — it could be from the gene table or the heatmap. Here is the lollipop plot for BLC2 using the ProteinPaint data frame that I created in my example above (bundled data): Screenshot from 2023-11-17 12-34-25

Kdreval commented 7 months ago

What is happening with this? Does this just need a review or there is something else in progress and it is not ready for review yet?

vladimirsouza commented 7 months ago

Waiting for reviewers.