The sequences used for the CDS annotation (reference sequence or 's, depending on refpos) mustn't have sequencing-error indels within CDSs, as these will throw mlrgd out of frame and cause global problems. However indels are tolerated in the other sequences: mlrgd will get a local incorect codon identification, but there'll be no long-range problems. Bad alignments or local (paired) frameshifts (gaps not in threes) will mean that nucleotides within the `mis-aligned' region may have the wrong codon position identification - leading to wrong codon identifications - but the problems should be local. It is up to the user to check for alignment problems (see prefix.aln and prefix.errorlog files). In non-coding regions, of course, gaps not in threes are allowed and don't cause problems.
In general you should use refpos = 1 (just use the reference sequence CDS annotation) if you only have CDS annotation for one or a few of your sequences, or if you want to ensure that the CDS annotation is identical across the alignment, or if some sequences have less-than-perfect sequencing quality. However, supplying CDS files for all sequences may help code2aln (code2aln automatically finds long ORFs but may miss ORFs under 300 nt or ORFs without a start codon - e.g. at ribosomal frameshift sites, stop-codon read-through sites, or circular genomes).
For each sequence pair -, run_mlrgd runs the forward comparison and also the backward comparison so if, for example, there is a CDS annotated in but not in , each nucleotide in the CDS will get equal weighting as a non-coding nucleotide and as a coding nucleotide in the final output plots.
The software will handle circular genomes as follows. When calculating the mutation probability for coding nucleotides at the ends of the input alignment, it will take into account codons that span the break in the circular genome. Also the running mean plots will use windows that span the break. However, the alignment programme will not reposition the breaks in the input sequences, so you must make sure that the break is in the same place in all of your input sequences.