Notice:
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra


Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.
Attention:
We will be out of the office on November 11th and 13th 2019, due to the U.S. holiday(Veteran's day) and due to a team event(Nov 13th). We will return to monitoring the GATK forum on November 12th and 14th respectively. Thank you for your patience.

AddOrReplaceReadGroups error even when all details are provided

[[email protected] S288C]$ java -jar $base_path/softwares/picard.jar AddOrReplaceReadGroups I=sortsam/$i_aligned_sorted_temp.bam O=sortsam/$i_aligned_sorted.bam RGID=$i RGLB=lib RGPL=illumina RGPU=unit1 RGSM=$i
INFO 2019-09-16 12:53:36 AddOrReplaceReadGroups

********** NOTE: Picard's command line syntax is changing.


********** For more information, please see:
********** https://github.com/broadinstitute/picard/wiki/Command-Line-Syntax-Transition-For-Users-(Pre-Transition)


********** The command line looks like this in the new syntax:


********** AddOrReplaceReadGroups -I sortsam/_aligned_sorted_temp.bam -O sortsam/_aligned_sorted.bam -RGID -RGLB lib -RGPL illumina -RGPU unit1 -RGSM


ERROR: Option 'RGLB' is required.

USAGE: AddOrReplaceReadGroups [options]

Documentation: http://broadinstitute.github.io/picard/command-line-overview.html#AddOrReplaceReadGroups

Assigns all the reads in a file to a single new read-group.

This tool accepts INPUT BAM and SAM files or URLs from the Global Alliance for Genomics and Health (GA4GH)
(http://ga4gh.org/#/documentation).

Usage example:

java -jar picard.jar AddOrReplaceReadGroups \
I=input.bam \
O=output.bam \
RGID=4 \
RGLB=lib1 \
RGPL=ILLUMINA \
RGPU=unit1 \
RGSM=20

I have already added RGLB but still its showing error that RGLB is required

Answers

  • SkyWarriorSkyWarrior TurkeyMember ✭✭✭
    sortsam/_aligned_sorted.bam -RGID -RGLB lib -RGPL illumina -RGPU unit1 -RGSM
    

    Your $i variable does not seem to contain anything that's why -RGLB goes into -RGID and -RGLB is left unassigned. Check your $i variable and see if anything is assigned to it during the BASH instance of the command that you use.

  • bhanuGandhambhanuGandham Cambridge MAMember, Administrator, Broadie, Moderator admin

    Thank you for your input @SkyWarrior. As always, GATK team appreciates your contributions.

Sign In or Register to comment.