Hi all,
I'm trying to liftover a publicly available dataset at ENA (PRJEB62420) from CanFam4 (their reference) to CanFam3, to make it compatible with my current data. I need to stick to CanFam3, so this is the only option for me. The data I currenlty have is in plink files format (.bed, .bim, .fam) and I need to integrate both datasets using plink. I've currently tried two different softwares for the liftover: picard liftover and CrossMap, and I've run into different issues with each one. This is my first time doing this, so I'm not sure if I'm doing a silly mistake or it's something more complex.
The files I'm using are:
Below you can find the code for both approaches I've tried (Picard and CrossMap), the code I've used and the issues and errors I've run into. If you spot something I might be doing wrong, any advice about how to do this better, or have any other ideas about how to solve the issues, please let me know!
Picard Liftover
When trying to liftover with picard, all the variants get rejected. I'm aware this can be caused due to different chromosome coding, but both dataset's vcf and reference genome have 'chr1' cromosome coding style, so I guess that's not the issue.
The code I'm using is:
picard CreateSequenceDictionary R=CanFam3/canFam3.fa O=CanFam3/canFam3.dict
picard LiftoverVcf I=ENA/Dog10K_phase1_merged.vcf.gz O=picard_CanFam3/Dog10K_phase1_canFam3.vcf CHAIN=CanFam3/canFam4ToCanFam3.over.chain REJECT=picard_CanFam3/rejected_variants.vcf R=CanFam3/canFam3.fa
CrossMap
The issue with crossmap is that it ends the liftover process, but then I'm not able to transform the output into plink format as it raises the error 'ALT allele duplicates REF allele on line X of .vcf file' and it stops the process. I've tried the solution proposed here, but after executing the bcftools + plink code I'm only left with 100 variants (out of ~17M, clearly something has gone wrong). I'm also trying the first solution proposed here, but the vcf is so large it takes an eternity.
The code I'm using is:
CrossMap.py vcf CanFam3/canFam4ToCanFam3.over.chain ENA/Dog10K_phase1_merged.vcf.gz CanFam3/canFam3.fa 10K_CanFam3/Dog10K_phase1_canFam3.vcf.gz --compress
plink --vcf 10K_CanFam3/Dog10K_phase1_canFam3.vcf.gz --dog --allow-extra-chr --make-bed --out 10K_CanFam3/Dog10K_phase1_canFam3
The software versions are:
- CrossMap - v0.6.5 (bioconda::crossmap)
- Picard - v3.1.1 (bioconda::picard)
- Plink - v1.9
picard
liftover
crossmap
plink