I am facing an issue when trying to align short reads against a region in human chr5. The two Sensory Motor Neuron genes, (SMN1 and SMN2) are almost 100% identical and this causes the aligner to fail to align reads correctly since each read matches perfectly to two separate regions of the reference, leading to very low alignment scores.
If I BLAT the SMN1 gene's full genomic sequence against the human genome (hg19) on UCSC, I get (only showing the 1st two lines):
QUERY SCORE START END QSIZE IDENTITY CHROM STRAND START END SPAN
--------------------------------------------------------------------------------------------------------------
NG_008691.1 35072 1 35072 35072 100.0% chr5 + 70215768 70250839 35072
NG_008691.1 34279 1 35072 35072 99.8% chr5 + 69340350 69375383 35034
And on the browser:
To get around this, I want to mask the SMN2 gene. However, the region of similarity extends beyond the annotated boundaries of the gene, so I would like to identify the full extent of this duplication.
So, given a large nucleotide sequence in fasta format, how can I compare it to itself and identify identical or near identical regions?