TreeMix: ERROR: cannot open file treemix.freq.gz
1
0
Entering edit mode
4.4 years ago
k.prata ▴ 10

Hi,

I'm running Mac OS Mojave and I've encountered an error trying to run TreeMix.

ERROR: cannot open file treemix.freq.gz

Here are the steps I have used:

Convert .vcf file to plink format (ped):

vcftools --vcf data.vcf --plink --out data

Convert to binary format (bin bam bed):

plink --file data --noweb --make-bed --recode --missing-genotype 0 --out data

Make and stratified plink file Edit the .fam file and write the population names in the third column and save as cluster file

plink --bfile data --freq --missing --within data.clust --noweb

OR

plink --bfile data --write-cluster --family

Edit clust file and place population names in the third column

plink --bfile data --freq --missing --within data.clst --noweb

zip file

gzip plink.frq.strat

use python script to convert to treemix file

plink2treemix.py plink.frq.strat.gz treemix.frq.gz

TreeMix:

treemix -i treemix.freq.gz -o out_stem
# ERROR: cannot open file treemix.freq.gz

I feel like this might be an issue with zipping on Mac? As, all the datafiles appear to be fine.

treemix gzip error SNP plink • 1.5k views
ADD COMMENT
1
Entering edit mode
4.4 years ago
k.prata ▴ 10

Very simple solution here I just figured out. I changed my file name from treemix.frq.gz to treemix.gz and this worked!

ADD COMMENT

Login before adding your answer.

Traffic: 2076 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6