Coder Social home page Coder Social logo

ExtractSignatures Error about maftools HOT 5 CLOSED

poisonalien avatar poisonalien commented on July 17, 2024
ExtractSignatures Error

from maftools.

Comments (5)

PoisonAlien avatar PoisonAlien commented on July 17, 2024 4

Hi,

this is a known issue, for some reason nmf function loaded via namespace gives this error.

try manually loading NMF package before running extractSignatures. It should work fine.

library('NMF')
AP1.hg19.sign = extractSignatures(mat = AP1.hg19.tnm)

from maftools.

wjaratlerdsiri avatar wjaratlerdsiri commented on July 17, 2024

Thanks James

from maftools.

vyellapa avatar vyellapa commented on July 17, 2024

Im getting a similar error even after loading the NMF library. Is there is any other obvious fix to this?

Thanks,
Teja

library('NMF')
laml.sign = extractSignatures(mat = laml.tnm)
Warning : Found zero mutations for conversions T[T>G]C
Estimating best rank..
Error in (function (...) : All the runs produced an error:
-#1 [r=2] -> attempt to set 'rownames' on an object with no dimensions [in call to 'rownames<-']
-#2 [r=3] -> attempt to set 'rownames' on an object with no dimensions [in call to 'rownames<-']
-#3 [r=4] -> attempt to set 'rownames' on an object with no dimensions [in call to 'rownames<-']
-#4 [r=5] -> attempt to set 'rownames' on an object with no dimensions [in call to 'rownames<-']
-#5 [r=6] -> attempt to set 'rownames' on an object with no dimensions [in call to 'rownames<-']

from maftools.

wjaratlerdsiri avatar wjaratlerdsiri commented on July 17, 2024

I worked out on this by specifying exact values of n. I think because my mutation data were not large enough to run the default n parameter and find the best signature.

So I ran n=1 to n=5 separately and chose signature with the highest correlation as described in the manual. I noticed that the same error came up again when you used large n.

My command:
library('NMF')
install.extras('NMF')

A = trinucleotideMatrix(maf = AP, ref_genome = 'hg19_chromosome.fa', prefix = 'chr', add = TRUE, ignoreChr = 'chrM', useSyn = TRUE)

A2 = extractSignatures(mat = A, n = 1, plotBestFitRes = T)
A2 = extractSignatures(mat = A, n = 2, plotBestFitRes = T)
...
A2 = extractSignatures(mat = A, n = 6, plotBestFitRes = T)

plotSignatures(A2)

from maftools.

vyellapa avatar vyellapa commented on July 17, 2024

Thanks @wjaratlerdsiri. That worked!

from maftools.

Related Issues (20)

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.