markowetzlab / CNsignatures

This is data and code from our first paper on copy number signatures (Macintyre et al., Nat Gen, 2018).
https://www.nature.com/articles/s41588-018-0179-8?proof=trueInJun
MIT License
6 stars 2 forks source link

Signature generation blocked by wrong dimension #5

Closed bioinfo-dirty-jobs closed 1 year ago

bioinfo-dirty-jobs commented 1 year ago

I use this code:

I have imported from enrichment panel a copy number data sampleXX.txt

chromosome     start       end       segVal
1           1  40356095  40372764   -4.0000000
2           1 115245084 115261621   19.1428571
3           1 204485504 204526342 1731.4285714
4           2  16075982  16090656   -4.0000000
5           2  29416088  30143527   32.5714286
6           3  12626011  12704516   -5.7142857
7           3 138374229 138478187   -0.2857143
8           3 178866308 178952154    7.7142857

I use this code

CN_features<-extractCopynumberFeatures(segment_table)
all_components<-fitMixtureModels(CN_features) #(this step is optional)
sample_by_component<-generateSampleByComponentMatrix(CN_features)
chooseNumberSignatures(sample_by_component)
component_by_signature<-generateSignatures(sample_by_component,4)
results<-quantifySignatures(sample_by_component,component_by_signature

I have this error: Error in rowSums(t_df) : 'x' must be an array of at least two dimensions Could you please help me?

Phil9S commented 1 year ago

Many thanks for your issue. Please note that the code in this repository is not under active development.

If you wish to generate copy number signature activities / exposures you can do so using the CINSignatureQuantification R package which supports both the new pan-cancer copy number signatures and the ovarian copy number signatures (ones described in this repository).

If you continue to have issues using this package please open an issue on that repository and it can be resolved.