|
Post by njbern on Feb 11, 2016 16:55:51 GMT
Hi all,
I'm trying to convert minimac3 dosages into beds using gcta. I know this is most likely a trivial problem, but I can't figure it out 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,
|
|
|
Post by njbern on Feb 16, 2016 15:44:15 GMT
I still have not found a solution any help would be much appreciated. Please
|
|
|
Post by Jian Yang on Feb 17, 2016 5:34:06 GMT
I've added the required file formats for this option in gcta.freeforums.net/thread/270/input-outputThe --dosage-mach option was designed to read output files from an early version of MACH, which might not be compatible with output files from the latest version of MACH or Minimac. One possible solution is to re-format the *.mlinfo file using awk.
|
|
|
Post by njbern on Feb 17, 2016 18:38:17 GMT
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' > 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
This is janky but works
|
|