Question: Picard AddOrReplaceReadGroups for multiple BAM files
0
gravatar for User000
3 months ago by
User000370
User000370 wrote:

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?

snp picard • 117 views
ADD COMMENTlink modified 3 months ago • written 3 months ago by User000370
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1894 users visited in the last hour