Hi,
re: input bam files, ideally in most bioinformatic pipelines, you'd add read groups at the start then do alignment, merging, sorting, indexing and duplicate read removal, I believe. In any case, STITCH should only really care about sample name, and I believe allows arbitrary read group combinations within a single bam file, where that single bam file is a single sample with a single SM tag. Whether you remove read duplicates depends on your precise library construction method, and isn't done (I think?) for GBS type approaches, but would be done most of the rest of the time
Are your bams sorted when you saw the error message below? The GenomicRegion constructor should be able to take negative values (for example I just confirmed on some test data that a (fake) chromosome named "rep_1.1:-589-668" works for GenomicRegion constructor). Also, weird that would happen on one bam, but not others? Is there anything different about the header of that file? Can you re-index it? Can you figure out exactly what BAM(s) through the process of elimination? (run STITCH on each bam for one iteration, see when it crashes)
For the other message, did you run out of temp space? Can you set the tempdir to somewhere with more storage and see if that message goes away?
Best,
Robbie