jburos / bayesnmf Goto Github PK
View Code? Open in Web Editor NEWTesting bayesNMF code from the Broad
Testing bayesNMF code from the Broad
Hi there! When I ran the bayesNMF code provided in your directory using a simulated cancer mutational catalog to en, I have encountered the following problem after the 30X optimization has finnished:
Error in plot.activity.barplot(H.mid, H.norm, 1, tumor.type) :
could not find function "melt"
In addition: Warning messages:
1: In this["plot"] <- p :
number of items to replace is not a multiple of replacement length
2: In this["signatures"] = W.norm :
number of items to replace is not a multiple of replacement length
3: In this["signature_mutations"] = H.mid :
number of items to replace is not a multiple of replacement length
4: In this["normalized_mutations"] = H.norm :
number of items to replace is not a multiple of replacement length
My code looks like this:
`
if (!require(mutsigNMF))
devtools::install_github('jburos/mutsigNMF')
library(mutsigNMF)
library(tidyr)
library(ggplot2)
library(dplyr)
library(rstan)
library(httr)
library(purrr)
input_file <- '/home/e0240162/practice/3_Signature_Challenge/Synthetic_Data/PCAWG-synthetic-tumors/pcawg.j.tumors.1000.no.noise.synthetic.tumors.0.2.txt'
#Read data from input file
dat <- read.table(input_file, sep = "\t", header = T, as.is = T)
#Decide the format of the data, and do respective data conversion
mat <- as.matrix(dat[,-(1:4)])
typeof(mat) #"integer"
#rownames(mat) <- gsub(dat$Mutation.Type, pattern = "[[:punct:]]", replacement = '', fixed = F)
bases <- c("A","C","G","T")
pyrimidines <- c("C","T")
Before <- rep(bases,each = 4,rep = 6)
Ref <- rep(pyrimidines,each = 48)
After <- rep(bases, rep = 24)
Var <- c( rep(c("A","G","T"),each = 16) , rep(c("A","G","C"),each = 16) )
#Input the base context for BayesNMF_Jaegil program
#Under this context, 4 bases: Before Ref Alt After are linked together as the rowname
rownames(mat) <- paste0(Before,Ref,Var,After)
colnames(mat) <- colnames(dat)[-(1:4)]
bayesNMF <- run_bayesNMF(mat = mat,tumor.type = gsub("[.][0-9]$","",colnames(mat)[1]), max_k = 40, n_runs = 30 )
`
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.