freeseek / mocha

MOsaic CHromosomal Alterations (MoChA) caller
MIT License
79 stars 22 forks source link

imp5Converter Output file format is not supported #48

Open jiang53peng opened 5 months ago

jiang53peng commented 5 months ago

Hi there, I've recently encountered an issue while trying to download resources for GRCh37 while follow the installation steps. When running the imp5Converter command to convert BCF files. I encountered the following error message: "Output file format is not supported". Here is the command I used: "for chr in {{1..22},X}; do imp5Converter --h $pfx$chr$sfx.bcf --o $pfx$chr$sfx --r $chr; done". Could you offer any help or guidance on this matter? Thank you in advance for your time and assistance.

Yanranli007 commented 5 months ago

I have the same problem, pfx="ALL.chr" sfx=".phase3_integrated.20130502.genotypes"

for chr in {{1..22},X}; do $imp5Converter_PATH --h $WORK37/$pfx$chr$sfx.bcf --o $WORK37/$pfx$chr$sfx.imp5 --r $chr done

When I add the imp5, it works, I think you can have a try.

freeseek commented 5 months ago

I realized this is legacy code from version 1.1.5 of IMPUTE5. With the newer 1.2.0 version the imp5Converter bianry should be replaced by the xcftools binary and the code should be as follows:

for chr in {{1..22},X}; do xcftools view --input $pfx$chr$sfx.bcf --region $chr --maf .03125 --output $pfx$chr$sfx.xcf.bcf --format sh; done

This will be fixed in the documentation in the next update

jiang53peng commented 5 months ago

I have the same problem, pfx="ALL.chr" sfx=".phase3_integrated.20130502.genotypes"

for chr in {{1..22},X}; do $imp5Converter_PATH --h $WORK37/$pfx$chr$sfx.bcf --o $WORK37/$pfx$chr$sfx.imp5 --r $chr done

When I add the imp5, it works, I think you can have a try.

Thank you for your advice, it works after add .imp5 when i dealing with GRCh37, then i update IMPUTE5 to version 1.2.0 and use the code the freeseek provide while dealing with GRCh38, and it can also worked.

jiang53peng commented 5 months ago

I realized this is legacy code from version 1.1.5 of IMPUTE5. With the newer 1.2.0 version the imp5Converter bianry should be replaced by the xcftools binary and the code should be as follows:

for chr in {{1..22},X}; do xcftools view --input $pfx$chr$sfx.bcf --region $chr --maf .03125 --output $pfx$chr$sfx.xcf.bcf --format sh; done

This will be fixed in the documentation in the next update

Thank you for your help, the adjusted code works and helps me a lot.

Yanranli007 commented 5 months ago

I have the same problem, pfx="ALL.chr" sfx=".phase3_integrated.20130502.genotypes" for chr in {{1..22},X}; do $imp5Converter_PATH --h $WORK37/$pfx$chr$sfx.bcf --o $WORK37/$pfx$chr$sfx.imp5 --r $chr done When I add the imp5, it works, I think you can have a try.

Thank you for your advice, it works after add .imp5 when i dealing with GRCh37, then i update IMPUTE5 to version 1.2.0 and use the code the freeseek provide while dealing with GRCh38, and it can also worked.

Thanks for your response, I follow your freeseek and your suggestion, it worked

Yanranli007 commented 5 months ago

I realized this is legacy code from version 1.1.5 of IMPUTE5. With the newer 1.2.0 version the imp5Converter bianry should be replaced by the xcftools binary and the code should be as follows:

for chr in {{1..22},X}; do xcftools view --input $pfx$chr$sfx.bcf --region $chr --maf .03125 --output $pfx$chr$sfx.xcf.bcf --format sh; done

This will be fixed in the documentation in the next update

A quick question, why the maf is setting .03125? Thank you in advance.

freeseek commented 5 months ago

The value .03125 is simply 1/32 and it is what is advised in the IMPUTE5 v1.2.0 documentation