Atkinson-Lab / Tractor

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

RunTractor.py ERROR Phenotype ID must match with Hapdose file ID #25

Closed samreenzafer closed 9 months ago

samreenzafer commented 9 months ago

Hi After running RunTractor.py (version 0.0.1), I am getting an error but also an output summary stats file. I think my output summary stats is reasonable, and this could just be a minor bug but I'm not sure. Hence I'm raising an issue here.

python3.7 Tractor/RunTractor.py --hapdose MEG_phase2.chr22.phase \
--method logistic \
--phe summ_using_PCsAPOL/Phe.eskd2021_nicole.txt \
--out summ_using_PCsAPOL/MEG_phase2.chr22.eskd2021.summ.tsv &> summ_using_PCsAPOL/MEG_phase2.chr22.eskd2021.summ.tsv.log

cat summ_using_PCsAPOL/MEG_phase2.chr22.eskd2021.summ.tsv.log 
v 0.0.1
Reading files....
------
MEG_phase2.chr22.phase.anc0.hapcount.txt
------
MEG_phase2.chr22.phase.anc1.hapcount.txt
------
MEG_phase2.chr22.phase.anc0.dosage.txt
------
MEG_phase2.chr22.phase.anc1.dosage.txt
------
Notice:
Tractor drop one local ancestry term for regression. Therefore, MEG_phase2.chr22.phase.anc1.hapcount.txt will not be used.
------
ERROR: Phenotype ID must match with Hapdose file ID
END of calculation

wc -l summ_using_PCsAPOL/Phe.eskd2021_nicole.txt
     2775 summ_using_PCsAPOL/Phe.eskd2021_nicole.txt
head -1 summ_using_PCsAPOL/Phe.eskd2021_nicole.txt
IID y

head -1 MEG_phase2.chr22.phase.anc0.dosage.txt |wc -w
2779   (CHROM   POS ID  REF ALT 1000560 1000625 1000628 1000633 1000634 ..... )
head -1 MEG_phase2.chr22.phase.anc0.hapcount.txt |wc -w
2779   (CHROM   POS ID  REF ALT 1000560 1000625 1000628 1000633 1000634 ..... )

You can see the Error message. But as you can see the header of the pheno file, and the number of samples in the pheno file and hapdosage files are all tallying correctly.

I just want to make sure that everything is correct. Thank You.

gupta567varun commented 9 months ago

I am getting the same error, but the files are being generated. But since it's an error, I download the latest version from the github and just ran run_tractor.R script and as of writing this comment, it is running with no such errors and Warnings. Will inform you once it's finished. If you will be running run_tractor.R just remember to install "optparse" library before running the R script.

Varun

nirav572 commented 9 months ago

Yes, please use the most recent version.