I'm trying to do a reference-aided assembly of a new variety of rice genome. I have mapped my Illumina reads to the reference and replaced the uncovered bases with Ns. I have now used this masked genome fasta file as a reference to map my reads once again. I wish to pull out the variants by doing so and replacing them in the masked fasta file to generate my assembly. I have 96-97% of reads mapping to my reference. Is this a good strategy? I'm a bit in doubt, because I think that the Ns in the masked genome may cause errors in mapping.
Alternatively, shall I extract variants from the bam files that I got by mapping reads to the original (reference) genome file and have them replaced in the masked genome , only if the masked genome, does not have an N at that position?? If yes, then how should I go about this? I have made a bed file of the uncovered loci.