Picard AddOrReplaceReadGroups for multiple BAM files
0
0
Entering edit mode
4.2 years ago
User000 ▴ 690

Hello,

I would like to do variant calling with freebayes, however it requires the read groups. I am in a difficulty how to add the read groups to each of my 200 bam files, so that I can process it further.

workdir: "/path/to/workdir"

(SAMPLES,) =glob_wildcards('path/to/{sample}.bam')

rule all:
    input: 
        expand("{sample}.mark.bam", sample=SAMPLES)

rule picard_markgroup:
    input:
        sortbam ="/path/to/{sample}.bam"
    output:
        dupbam = "{sample}.mark.bam"
    shell:
        """
        java -jar /Tools/picard/build/libs/picard.jar AddOrReplaceReadGroups I={input.sortbam} O={output.dupbam} SO=coordinate RGID=id RGLB=library RGPL=platform RGPU=machine RGSM=sample VALIDATION_STRINGENCY=SILENT
        """

This is giving me

@RG RGID=id RGLB=library RGPL=platform RGPU=machine RGSM=sample

Could you suggest how to modify this?

picard SNP • 1.4k views
ADD COMMENT

Login before adding your answer.

Traffic: 2073 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6