When running sam-dump on an .sra file, using the options -u (--unaligned) or -g (--spot-group) in isolation is not problematic. The former creates a .sam with all aligned and unaligned reads, and the latter appends the spot-group (ReadGroup) to the QNAME for each read.
However, when both options are specified, the unaligned reads are printed without the SPOT_GROUP appended. This creates the potential for a QNAME conflict when combining .sam files from multiple SRR runs of the same sample. I do not believe this is the expected behavior from combining these options.
If the .sra file maintained the original QNAME of the read, this would not be a problem as these are generally universally unique. If there is a way to print this with either sam-dump or fastq-dump, I'm not aware of it.
Interestingly, using adding the --fastq option to sam-dump fixes this issue -- the SPOT_GROUP is appended. However, this is an inconvenient format for additional downstream steps, however (such as splitting by SPOT_GROUP).
When running sam-dump on an .sra file, using the options -u (--unaligned) or -g (--spot-group) in isolation is not problematic. The former creates a .sam with all aligned and unaligned reads, and the latter appends the spot-group (ReadGroup) to the QNAME for each read.
However, when both options are specified, the unaligned reads are printed without the SPOT_GROUP appended. This creates the potential for a QNAME conflict when combining .sam files from multiple SRR runs of the same sample. I do not believe this is the expected behavior from combining these options.
If the .sra file maintained the original QNAME of the read, this would not be a problem as these are generally universally unique. If there is a way to print this with either sam-dump or fastq-dump, I'm not aware of it.
Interestingly, using adding the --fastq option to sam-dump fixes this issue -- the SPOT_GROUP is appended. However, this is an inconvenient format for additional downstream steps, however (such as splitting by SPOT_GROUP).