Generating neutral genome for two breeds using FastaAlternateReferenceMaker
I am trying to generate a neutral genome between two chicken breeds to reduce the alignment bias when I count the SNP count ratio between breeds.
I want to replace every SNP on the reference genome to N or IUPAC ambiguity codes if the SNP is different between two breeds.
(for example, use R if Breed1 has A and Breed2 has G on certain position).
I tried two different ways but both seems not working.
First, Use both bam files from each breed as input for HaplotypeCaller (or merged bam files then HaplotypeCaller), filtered SNPs and run FastaAlternateReferenceMaker giving --use_IUPAC_sample argument
-> --use_IUPAC_sample takes only one of the samples (Breed1 or Breed2)
java -jar /software/gatk/3.5/static/GenomeAnalysisTK.jar \
-T FastaAlternateReferenceMaker \
-R /share/zhoulab/Referencegenome/Wholegenomefasta/genome.fa \
--use_IUPAC_sample breed1 \
-o breed1_iupac.fa \
Second, Run HaplotypeCaller for each bamfile seprately, filtered SNPs and run FastaAlternateReferenceMaker two rounds (both with --use_IUPAC_sample argument) which first converts reference.fa with Breed1.vcf then add use output.fa to add Breed2 vcf info.
-> gave error for "Input files variant and reference have incompatible contigs." so wouldn't let me run the second round
So is there any way to do it? or is this even possible?
Thank you in advance!!