Question: TreeMix: ERROR: cannot open file treemix.freq.gz
0
gravatar for k.prata
5 months ago by
k.prata0
k.prata0 wrote:

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 snp plink gzip error • 163 views
ADD COMMENTlink modified 5 months ago • written 5 months ago by k.prata0
1
gravatar for k.prata
5 months ago by
k.prata0
k.prata0 wrote:

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

ADD COMMENTlink written 5 months ago by k.prata0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1279 users visited in the last hour