campbio / musicatk Goto Github PK
View Code? Open in Web Editor NEWMutational Signature Comprehensive Analysis Toolkit
Mutational Signature Comprehensive Analysis Toolkit
It goes 1, 10, 11, 12, etc. rather than 1, 2, 3
There is currently no way to overwrite "SBS192" tables as annotate_transript_strand
does not take an overwrite parameter and build_standard_table fails trying to create an "SBS192" table.
This fails:
data(musica)
annotate_transcript_strand(musica, "19", build_table = F)
build_standard_table(musica, genome,
table_name = "SBS192",
strand_type = "Transcript_Strand")
The following succeeds in creating a table but cannot be overwritten:
data(musica)
annotate_transcript_strand(musica, "19", build_table = T)
More robust
Currently we have a switch to determine whether we should merge 2 adjacent SBS, is there a baseline ratio of these occurrences? Is there a way to gain evidence that a given variant should be treated as 2 or mutations or 1?
Indel plotting is a bit hard to read, upgrade with facets for each broad category of indel
Hi,
I run musicatk::create_musica() from a dataframe. This results in a count table with only NN as variant alleles.
I am not sure how I can get to the correct variant alleles in. It also leads to downstream errors in the signature detection step.
head(dbs.df)
chr start end ref alt sample
1 1 104017 104018 CC TT ONCOLEAD_CELL_CAPAN1
2 1 149875 149876 GC CG ONCOLEAD_CELL_CAPAN1
3 1 232961 232962 TG CA ONCOLEAD_CELL_CAPAN1
4 1 362904 362905 TT GG ONCOLEAD_CELL_CAPAN1
g=select_genome("hg19")
dbs_musica <- create_musica(x = dbs.df, genome = g)
build_standard_table(dbs_musica, g, "DBS78", overwrite = TRUE)
Building count table from DBS with DBS78 schema
head(dbs_musica@count_tables$DBS78@annotation)
motif mutation context
AC>NN_CA AC>NN_CA AC>NN CA
AC>NN_CG AC>NN_CG AC>NN CG
AC>NN_CT AC>NN_CT AC>NN CT
AC>NN_GA AC>NN_GA AC>NN GA
AC>NN_GG AC>NN_GG AC>NN GG
AC>NN_GT AC>NN_GT AC>NN GT
musica.result <- discover_signatures(musica = dbs_musica, table_name = "DBS78",
num_signatures = 3, algorithm = "lda",
nstart = 10, par_cores=8)
Error in colSums(counts_table) :
'x' must be an array of at least two dimensions
Hello,
I think there is a problem with encoding in plotting functions such as plot_signatures()
, plot_exposures()
, etc...
Every label/text in ggplot2 images is printed as blocks of four numbers.
I'm using musicatk
v1.0.0 with R 4.0.5 and Bioconductor v3.12 on a Ubuntu 20.04.2 machine.
I noticed the same issue in the package vignette.
Best regards,
Andrea
I'm comparing to Alexandrov tool and it's relatively close. I see errors in their calculations as well. It's going to take some time to figure out exactly what's going on and I'm not even sure exactly what scheme they're using for motifs (COSMIC shows conflicting information)
Hi,
I am working with pre-treatment and post-treatment data, and I was wondering if it would be possible to add a connectivity variable into the plot_umap function so that I could highlight where a pre-treatment and post-treatment samples fall in the umap amongst all the other samples in my umap. I have posted an example below
Can we add import functionality for .simple format files?
Here is an example of .simple files from PCAWG:
Originally posted by achevali October 22, 2021
Currently we have a switch to determine whether we should merge 2 adjacent SBS, is there a baseline ratio of these occurrences? Is there a way to gain evidence that a given variant should be treated as 2 or mutations or 1?
When running build_standard_tables and supplying a non-standard name that will be converted (e.g. a user says "SNV96", but the actual table name will be "SBS96"). We should just print a message saying the table name was changed to "SBS96" so the user doesn't try to use the other name.
Hi,
The function compare_cosmic_v3 can generate signature comparison plots for DBS mutations. Unfortunately, the colors are missing from the non-COSMIC results side (left side). The mutation type names display differently as well, but appear to be the same in my musicatk object for DBS and the signatures from musicatk::cosmic_v3_dbs_sigs@signatures. I've added an example to this post.
Let me know if you need any additional information to troubleshoot this issue.
bad-dbs-example.pdf
plot_umap(result = res, color_by = "annotation", annotation = "Tumor_Types", clust = clust)
Error: Continuous value supplied to discrete scale
There are many more in version 3.4 such as SBS99: Melphalan Exposure. Also, Experimental is missing.
Check that the SBS being combined aren't indels no "-" in ref or alt
COSMIC v2
COSMIC v3 - SBS, IND, DBS
Here is some example code for a result object with SBS96 schema:
# Get mutation types and variants from result object
f <- result@musica@count_tables$SBS96@features
v <- result@musica@variants
vs <- subset(v, Variant_Type == "SBS")
# check to make sure they have the same number of rows
nrow(f) == nrow(vs)
# Get mutation type probability per sample
expo <- exposures(result)
expo <- prop.table(expo, margin=2)
sig <- signatures(result)
# Calculate probability per mutation
mut.prop <- sig[f[,1],] * t(expo[,vs$sample])
final <- cbind(vs, Motif=f[,1], mut.prop)
Example:
chr start end ref alt
1: chr8 100821597 100821598 CTCCAGC TT
2: chrX 65486271 65486272 CTCCA TT
3: chrX 65486271 65486272 CTCCA TT
clust <- cluster_exposure(res, 4, iter.max = 1000)
Metric: 'euclidean'; comparing: 1963 vectors.
Warning message:
In cluster::fanny(x = diss, k = nclust, diss = TRUE, maxit = iter.max) :
FANNY algorithm has not converged in 'maxit' = 1000 iterations
What's going on with this?
@achevali
The "overwrite" parameter of the build_standard_table function does not work as expected. Instead of overwriting the existing table, it adds another table with the same name. Please note if you have an existing musica "View" tab (View(musica)) open before attempting to overwrite the table you will have to close it in order for it to update.
data(musica); build_standard_table(musica, g, "SBS96", overwrite = T); View(musica@count_tables)
Loop iterations are totally independent, we should be able to get a good speed-up
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.