Please help, I have tried everything. So I have 200 unique samples, I have processed them accordingly [fastq groomer, trim, bwa]. I now have 100 bam files (the reads were paired end) and I would like to merge these bam files so that I can run FreeBayes (variant analysis). The only problem is I would like to avoid entering in unique read group data for each sample manually. Is there a tool or a script that can accomplish this? I have tried running samtools merge -r I was under the impression that this would attagen a RG tag to each alignment using a value inferred from the input file name, this did not work for me, still no RG info. In case anyone is wondering, the reason the RG group is important is ultimately I would like to have a VCF file that will list all variants found separated by unique sample. Any help is greatly appreciated.
If you do not wish to do this through the UI, then using the API for batch jobs is the solution. I believe that this info was shared with your for another tool, but I can let you know that the API works with all tools. More is in our wiki:
Best, Jen, Galaxy team