error with picard AddOrReplaceReadgroup
0
0
Entering edit mode
5.8 years ago

hi it's been a while since i have this problem : when i try to readgroup my sorted bam file using the following command

java -jar picard.jar AddOrReplaceReadGroups \ 
I=alnERR776198rmvDupSortindex.bam \ 
O=alnERR776198rmvDupSortindexRG.bam \ 
RGID=4 \ 
RGLB=lib1 \ 
RGPL=illumina \ 
RGPU=unit1 \ 
RGSM=ER776198

i get an empty output file pliiz someone help me with this .

picard bam • 3.1k views
ADD COMMENT
1
Entering edit mode

Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time. Also, try to avoid colloquialisms and IM slang spelling - it makes the post look extremely unprofessional.
code_formatting

ADD REPLY
0
Entering edit mode

Try a non-numeric RGID and see if that fixes things.

ADD REPLY
0
Entering edit mode

thanks for the reply Devon Ryan i've tried BRCA for RGID but same output the file is empty

ADD REPLY
0
Entering edit mode

This is not an answer to your issue. Try this:

samtools addreplacerg -r 'ID:4' -r 'PL:Illumina' -r 'SM:ER776198' -r 'LB:lib1' -o alnERR776198rmvDupSortindexRG.bam alnERR776198rmvDupSortindex.bam
ADD REPLY
0
Entering edit mode

cpad0112 thnaks but when i apply your code i get this message [main] unrecognized command 'addreplacerg'

ADD REPLY
0
Entering edit mode

can you print the version of samtools ? version on my system:

$ samtools --version
samtools 1.8
Using htslib 1.8
Copyright (C) 2018 Genome Research Ltd.

then type samtools addreplacerg. This should throw all the options available for addreplacerg function. Make sure that you have recent/highest version of samtools available (via brew/conda/apt/dnf)

ADD REPLY
0
Entering edit mode

i have the following header in my fastq file :

@ERR776198.1 M00985:17:000000000-A5LVR:1:1101:17091:1478/1

what would be the RGID RGLB RGPL RGPU RGSM ?

ADD REPLY
0
Entering edit mode

i get an empty output file pliiz

what was your original command ? what was the message displayed on screen ?

ADD REPLY
0
Entering edit mode

Pierre Lindenbaum i get the following message :

    19:58:34.713 INFO  NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/home/soufiane/Bureau/picard.jar!/com/intel/gkl/native/libgkl_compression.so
[Sun Jul 08 19:58:34 WEST 2018] AddOrReplaceReadGroups INPUT=/home/soufiane/Bureau/alnERR776198rmvDupSortindex.bam OUTPUT=/home/soufiane/Bureau/alnERR776198rmvDupSortindexRG.bam RGID=BRCA RGLB=lib1 RGPL=illumina RGPU=unit1 RGSM=ERR    VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json USE_JDK_DEFLATER=false USE_JDK_INFLATER=false
[Sun Jul 08 19:58:34 WEST 2018] Executing as root@soufiane-Latitude-E7450 on Linux 4.13.0-45-generic amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_171-b11; Deflater: Intel; Inflater: Intel; Provider GCS is not available; Picard version: 2.18.5-SNAPSHOT
INFO    2018-07-08 19:58:34 AddOrReplaceReadGroups  Created read-group ID=BRCA PL=illumina LB=lib1 SM=ERR

[Sun Jul 08 19:58:34 WEST 2018] picard.sam.AddOrReplaceReadGroups done. Elapsed time: 0,00 minutes.
Runtime.totalMemory()=187170816
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" htsjdk.samtools.SAMFormatException: Error parsing text SAM file. Not enough fields; File /home/soufiane/Bureau/alnERR776198rmvDupSortindex.bam; Line 1
Line: BAI&
    at htsjdk.samtools.SAMLineParser.reportFatalErrorParsingLine(SAMLineParser.java:446)
    at htsjdk.samtools.SAMLineParser.parseLine(SAMLineParser.java:231)
    at htsjdk.samtools.SAMTextReader$RecordIterator.parseLine(SAMTextReader.java:268)
    at htsjdk.samtools.SAMTextReader$RecordIterator.next(SAMTextReader.java:255)
    at htsjdk.samtools.SAMTextReader$RecordIterator.next(SAMTextReader.java:228)
    at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:576)
    at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:548)
    at picard.sam.AddOrReplaceReadGroups.doWork(AddOrReplaceReadGroups.java:182)
    at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:282)
    at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:103)
    at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:113)
ADD REPLY
1
Entering edit mode

Exception in thread "main" htsjdk.samtools.SAMFormatException: Error parsing text SAM file. Not enough fields; File /home/soufiane/Bureau/alnERR776198rmvDupSortindex.bam

your alnERR776198rmvDupSortindex file is not a bam file. It's not a problem with picard but with the command that generated this bam file.

ADD REPLY
0
Entering edit mode

This message should have been part of your question. We cannot see your screen so you have to be as informative as possible when asking questions.

Which commands have you used to get to this bam?

ADD REPLY

Login before adding your answer.

Traffic: 1407 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