I would like to get the amplicon sequence from a indexed fna file. I do have the start/end coordinates for the amplicons and also the primer sequences. I've been reading about samtools faidx but it is not very clear to me how to do it. Does anyone here have any experience in this particular issue?
samtools faidxsimply fetches sequences using coordinates. It can't find sequences in a file that match a certain sequence. You will need to first align the data and get the coordinates you need before fetching them.
If I am mistaken then perhaps provide some additional detail about what you have.