corbinq / apex

Toolkit for QTL mapping and meta-analysis.
https://corbinq.github.io/apex/
16 stars 1 forks source link

Error running factor with covariates #18

Open jean997 opened 2 years ago

jean997 commented 2 years ago

I am able to run the factor command with no covariates. However, when I include covariates I get this output

Using 8 threads.
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 present in file.
Found 103 samples in covariate file ... 
Found 103 samples in expression bed file ... 
Processed data for 3 covariates across 102 samples.
Processed expression for 1305 genes across 103 samples.
Rank-normalizing expression traits ... 
Scaling expression traits ... 
Estimating latent factors ... 
Done.
apex: /mnt/c/Users/Admin/Desktop/eQTL_TOOL/apex_mod/src/eigen/Eigen/src/Core/DenseBase.h:262: void Eigen::DenseBase<Derived>::resize(Eigen::Index, Eigen::Index) [with Derived = Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>; Eigen::Index = long int]: Assertion `rows == this->rows() && cols == this->cols() && "DenseBase::resize() does not actually allow to resize."' failed.

Killed.

The covariate file and molecular file have the same samples in them, though it says "Processed data for 3 covariates across 102 samples" rather than 103. Neither file has any missing values.

jean997 commented 2 years ago

As a follow up - I can get it to run if I add an arbitrary extra column to the covariate file. Doesn't seem to matter where I put the extra column. However, in the output file, I see rows for each supplied covariate but they seem to be mislabeled. If I compare the covariates in the output file to the covariates in the input file, some of them have a correlation of 1 but the names don't match. Eg. the covariate with the id "age" in the output file will correspond to the provided covariate "sex". Additionally, one of the covariates in the output file is equal 1 for all samples and one of the covariates is not correlated with any of the input covariates. Seems like something is wrong in the covariate processing.