Drinchai / BloodGen3Module

This R package for performing module repertoire analyses and generating fingerprint representations
GNU General Public License v2.0
14 stars 5 forks source link

Error : Individualcomparison incorrect number of dimensions #5

Open bassanio opened 2 years ago

bassanio commented 2 years ago

Hi ,

I was able to run Groupcomparisonlimma on the data set using the command below but unable to run Individual Comparison as shown using the below commands

Data information

class(DATA)
[1] "data.frame"
dim(DATA)
[1] 11369   205

class(sample.info)
[1] "data.frame"

dim(sample.info)
[1] 205   1

Group_limma <- Groupcomparisonlimma(DATA,
                                    sample_info = sample.info,
                                    FC = 1.1,
                                    pval = 0.1 ,
                                    FDR = TRUE,
                                    Group_column = "group_names",
                                    Test_group = "Dur.inf",
                                    Ref_group = "Bef.inf")
Individual_df <-  Individualcomparison(DATA,
                                     sample_info = sample.info,
                                     FC = 1.5,
                                     DIFF = 2,
                                     Group_column = "group_names",
                                     Ref_group = "Bef.inf")

Error in sample_info[, Group_column] : incorrect number of dimensions

 sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS release 6.8 (Final)

Matrix products: default
BLAS/LAPACK: /data/SOFTWARES/Chaussabel/lib/libopenblasp-r0.3.18.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats4    stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] S4Vectors_0.32.3      BiocGenerics_0.40.0   tibble_3.1.6         
[4] BloodGen3Module_1.2.0
Drinchai commented 2 years ago

It is because your sample.info has only 1 column. You should try to have at least two columns of SampleID and condition (test, control). Then run individual analysis again.