Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtractSignatures Error #8

Closed
wjaratlerdsiri opened this issue Aug 17, 2016 · 5 comments
Closed

ExtractSignatures Error #8

wjaratlerdsiri opened this issue Aug 17, 2016 · 5 comments

Comments

@wjaratlerdsiri
Copy link

Dear Author,

I used MAF file from Oncotator. Every step was fine, including 'TrinucleotideMatrix'. But, when I try 'extractSignatures', I saw the following error. Could you help me with this? Thankyou

AP1.hg19.tnm = trinucleotideMatrix(maf = AP1, ref_genome = '/Users/hg19_chromosome.fa', prefix = 'chr', add = TRUE, ignoreChr = 'chrM', useSyn = TRUE)
AP1.hg19.sign = extractSignatures(mat = AP1.hg19.tnm)
Estimating best rank..
Timing stopped at: 0.002 0 0.002
Timing stopped at: 0.002 0 0.002
Timing stopped at: 0.001 0 0.001
Timing stopped at: 0.002 0 0.003
Timing stopped at: 0.002 0 0.003
Error in (function (...) : All the runs produced an error:
-#1 [r=2] -> none of the packages are loaded [in call to 'path.package']
-#2 [r=3] -> none of the packages are loaded [in call to 'path.package']
-#3 [r=4] -> none of the packages are loaded [in call to 'path.package']
-#4 [r=5] -> none of the packages are loaded [in call to 'path.package']
-#5 [r=6] -> none of the packages are loaded [in call to 'path.package']

Cheers,
James

@PoisonAlien
Copy link
Owner

PoisonAlien commented Aug 17, 2016

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)

@wjaratlerdsiri
Copy link
Author

Thanks James

@vyellapa
Copy link

vyellapa commented Oct 21, 2016

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

@wjaratlerdsiri
Copy link
Author

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)

@vyellapa
Copy link

Thanks @wjaratlerdsiri. That worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants