Skip to content

Fix @RG tag in sam/bam file output #196

@syansanofi

Description

@syansanofi

Issue 1
Currently FONDA does not discriminate between lanes of a single sample. All lanes receive identical @RG ID: tags

Approach
Since alignment are done on a per lane basis for DNA based workflows (eg DNACapVar_Fastq), add lane number to read group. This would align more to standard practice (link)

Example
sample_manifest.txt

parameterType shortName Parameter1 Parameter2
fastqFile SampleA SampleA_S1_L001_R1_001.fastq.gz SampleA_S1_L001_R2_001.fastq.gz
fastqFile SampleA SampleA_S2_L002_R1_001.fastq.gz SampleA_S2_L002_R2_001.fastq.gz

The @RG ID: tag would be:

parameterType
fastqFile
fastqFile

I would rather the lane numbers are iterated and appended onto the sample name:

SampleA+L001

rather than pulled out of the longest common substring of the sample's reads. This will make the lane numbering consecutive and easier to enforce because there will be no dependency on sample name prefixes.

Please let me know if this is clear.

Issue 2
All workflows should get the LB tag instead of only amplicon seq. Rationale follows previous, to align with current best practice.

.equals(configuration.getGlobalConfig().getPipelineInfo().getWorkflow())
? String.format("\"@RG\\tID:%s\\tSM:%s\\tLB:%s\\tPL:Illumina\"", sampleName, sampleName, sampleName)
: String.format("\"@RG\\tID:%s\\tSM:%s\\tLB:DNA\\tPL:Illumina\"", sampleName, sampleName);

return isDnaAmpliconWorkflow(configuration)
? String.format("\'@RG\\tID:%s\\tSM:%s\\tLB:%s\\tPL:Illumina\'", sampleName, sampleName, sampleName)
: String.format("\'@RG\\tID:%s\\tSM:%s\\tLB:DNA\\tPL:Illumina\'", sampleName, sampleName);

Approach
Remove this check, use @RG\\tID:%s\\tSM:%s\\tLB:%s\\tPL:Illumina for all workflows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions