Minimac3 to plink using GCTA
1
1
Entering edit mode
8.8 years ago
njbernstein ▴ 40

Hi all,

I'm trying to convert minimal dosages into beds using gcta. Here's my code:

gcta64 --dosage-mach chr22.imputed.dose chr22.imputed.info --make-bed --out chr22.fdgsdf

My error is:

Reading dosage data failed. Please check the format of the map file.

Here's what my info file looks like:

SNP    REF    ALT    Major    Minor    MAF    AvgCall    Rsq    Genotyped    LooRsq    EmpR    EmpRsq    Dose1    Dose2
22:16050115    G    A    G    A    0.00639    0.99361    0.00000    -    -    -    -    -    -
22:16050213    C    T    C    T    0.00759    0.99241    0.00000    -    -    -    -    -    -
22:16050568    C    A    C    A    0.00040    0.99960    0.00005    -    -    -    -    -    -
22:16050607    G    A    G    A    0.00100    0.99900    0.00002    -    -    -    -    -    -
22:16050627    G    T    G    T    0.00040    0.99960    0.00005    -    -    -    -    -    -
22:16050654    A    <CN0>    A    <CN0>    0.00180    0.99820    0.00000    -    -    -    -    -    -
22:16050654    A    <CN2>    A    <CN2>    0.01737    0.98263    0.00000    -    -    -    -    -    -

Any ideas?

Best

gcta • 3.3k views
ADD COMMENT
1
Entering edit mode
8.8 years ago
njbernstein ▴ 40

Answer:

for chr in `seq 1 22`;
do
awk -v OFS='\t'  '!($4="") , !($5="")' chr$chr.imputed.info > chr$chr.imputed.info.reworked
sed -i 's/\t\t//' chr$chr.imputed.info.reworked 
awk '{t=$5; $5=$4; $4=t; print}' chr$chr.imputed.info.reworked  > t && mv t chr$chr.imputed.info.reworked
awk '{$6=.999 FS $6;}1' OFS='\t'  chr$chr.imputed.info.reworked > t && mv t chr$chr.imputed.info.reworked
awk '$1=$1"_"$2"_"$3"_"++i' chr$chr.imputed.info.reworked > t && mv t chr$chr.imputed.info.reworked
sed -i '1 s/^.*$/SNP\tAl1\tAl2\tFreq1\tMAF\tAvgCall\tRsq\tGenotyped\tLooRsq\tEmpR\tEmpRsq\tDose1\tDose2/g' chr$chr.imputed.info.reworked

gzip chr$chr.imputed.info.reworked
/labseq/tools/gcta_1.24.2/gcta64  --dosage-mach-gz chr$chr.imputed.dose.gz chr$chr.imputed.info.reworked.gz  --make-bed --out chr$chr.imputed
done
ADD COMMENT
0
Entering edit mode

Hi thanks for the answer. I'm using GCTA to convert Minimac3 output files as well. Just want to ask have you using filter option to filter out low rsqr genotypes? Using the --dosage-mach command, and adding the filter flag, I found that it actually filter out the wrong column--- the AvgCall rather than R2. Have you encountered a similar problem? Thanks

ADD REPLY

Login before adding your answer.

Traffic: 1923 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