Giter VIP home page Giter VIP logo

bayesnmf's People

Contributors

jburos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jinn0208

bayesnmf's Issues

Error in running bayesNMF

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:
`

load BayesNMF functions

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)]

test bayesNMF method

as described here: https://www.broadinstitute.org/cancer/cga/msp

bayesNMF <- run_bayesNMF(mat = mat,tumor.type = gsub("[.][0-9]$","",colnames(mat)[1]), max_k = 40, n_runs = 30 )
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.