This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Picard's AddOrReplaceReadGroups gives invalid argument error

I am trying to execute this command to replace read groups on a bam file using picard (2.20.8). However, I've been getting this error below. Can someone please help me figure out the problem here?

Error:

Invalid argument 'HS2000-1015_160'.
Command exited with non-zero status 1

command executed :

/usr/local/openjdk-8/bin/java -Xms2g -Xmx100g -XX:+UseSerialGC -Dpicard.useLegacyParser=false -jar /usr/bin/picard.jar AddOrReplaceReadGroups -I /ADNI_1380^LP6005117-DNA_G04^ADNI_WGS/LP6005117-DNA_G04.bam -O ADNI_WGS/ADNI_1380^LP6005117-DNA_G04^ADNI_WGS/ADNI_1380^LP6005117-DNA_G04^ADNI_WGS.bam -ID HS2000-1015_160 -LB LP6005117-DNA_G04 -PL -PU HS2000-1015_160 -SM ADNI_1380
picard addreplacereadgroups

1 answer

Not Sure about this error, but i used the below command and it's work.

    java -jar /home/bioinformatics/picard.jar AddOrReplaceReadGroups -I FileName.bam -O FileName_WithRG.bam -RGID 4 -LB lib1 -PL ILLUMINA -PU unit1 -SM SampleName -SO coordinate

Yours should be :

"PathToYourPicardsToolsInYourMachine".jar AddOrReplaceReadGroups -I LP6005117-DNA_G04.bam -O LP6005117-DNA_G04^ADNI_WGS.bam -RGID HS2000-1015_160 -LB LP6005117-DNA_G04 -PL ILLUMINA -PU unit1 -SM ADNI_1380 -SO coordinate

Hope it's help!

Log in to answer this question.