Atkinson-Lab / Tractor

Scripts for implementing the Tractor pipeline
MIT License
44 stars 5 forks source link

Error while running run_tractor.R #30

Closed EfraMP closed 7 months ago

EfraMP commented 7 months ago

After running the script I got the next

Error in rep(NA, ncol(mat)) : invalid 'times' argument
Calls: RunTractor -> subset_mat_NA -> t -> sapply -> lapply -> FUN
Execution halted

The output was the next one:

CHR POS ID  REF ALT AF_anc0 AF_anc1 AF_anc2 AF_anc3 AF_anc4 AF_anc5 AF_anc6 AF_anc7 LAprop_anc0 LAprop_anc1 LAprop_anc2 LAprop_anc3 LAprop_anc4 LAprop_anc5 LAprop_anc6 LAprop_anc7 LAeff_anc0  LAeff_anc1  LAeff_anc2  LAeff_anc3  LAeff_anc4  LAeff_anc5  LAeff_anc6  LApval_anc0 LApval_anc1 LApval_anc2 LApval_anc3 LApval_anc4 LApval_anc5 LApval_anc6 Geff_anc0   Geff_anc1   Geff_anc2   Geff_ancGeff_anc4   Geff_anc5   Geff_anc6   Geff_anc7   Gpval_anc0  Gpval_anc1  Gpval_anc2  Gpval_anc3  Gpval_anc4  Gpval_anc5  Gpval_anc6  Gpval_anc7
chr1    662622  chr1:727242:G:A G   A   NA  NA  NA  NA  NA  0.025   NA  NA  0   0   NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  0.726245    NA  NA  NA  NA  NA  NA  NA  0.0792779608694168  NA  NA

I expect that R is not handling in a good way the NAs?

JasonTan-code commented 7 months ago

Hi,

This seems to be a bit unexpected to me. It seems the hapcount.txt and dosage.txt might have some issues. Would it be possible that you can send me a few lines from all 8 ancestries of hapcount.txt and dosage.txt files? You can do so with head -10 yourfile.anc*.dosage.txt and head -10 yourfile.anc*.hapcount.txt

Another comment is that I generally don't think applying Tractor on 8-way admixture is a good idea, as the risk alleles allocate to each ancestry is low. This could result in loss of statistical power.

EfraMP commented 7 months ago

Sure. How would you like me to send them?

JasonTan-code commented 7 months ago

Can you please send them to Taotao.Tan@bcm.edu? Thanks