I have the following problem. I am trying to analyze bam files using GATK. The bam files I have do not have a header so this causes an error with GATK. I can add the header manually but I do not know what the read groups in the alignment section of the SAM file are to include in the header.
Is there any way to extract fields from the alignment section of the SAM file? I could then extract the RGIDs from the alignments and get the unique values so I could include them in the header.
Are there any other solutions to this problem that I am not thinking of? I can always go brute force and add RG lines to the header until I get no errors.
Is there any way to extract fields from the alignment section of the SAM file? I could then extract the RGIDs from the alignments and get the unique values so I could include them in the header.
Are there any other solutions to this problem that I am not thinking of? I can always go brute force and add RG lines to the header until I get no errors.
Comment