Problems with read group in GATK
0
2
Entering edit mode
7.7 years ago

Hi,

I am new in next generation sequencig. I want to analyze my sequences using GATK. But it gives me an error at the first step because my bam files doesn't have the read group. I have read about it in others posts, but I have some specific questions.

I have differents samples from differents platfforms. Also I have in the same fastq of one sample reads from differents lines. So, I have to create the read group manually to each different sample that I have? Is any different automatic way to do this? Is it necessary to have sam files from sequencing better than fastq?

Thanks,

sequencing GATK read group • 3.7k views
ADD COMMENT
0
Entering edit mode

Also I have in the same fastq of one sample reads from differents lines

I assume reads from different lanes?

Is it necessary to have sam files from sequencing better than fastq?

I don't understand what you mean by this. A sam/bam file is required for most steps in ngs analysis.

ADD REPLY
0
Entering edit mode

Yes of course, but in GATK best practice suggest to get unmaped sam files from Illumina sequencing instead of fastq because sam file can store metadata useful for read gruop

ADD REPLY
0
Entering edit mode

Please use ADD COMMENT/ADD REPLY when responding to existing posts to keep threads logically organized.

ADD REPLY
0
Entering edit mode

Hmmm.. What are you trying to do? Did you already map your fastq to produce a bam file? You can add RG tag at alignement/mapping step using the aligner options. Or if you start with a bam file, then picard tool can do that https://broadinstitute.github.io/picard/command-line-overview.html#AddOrReplaceReadGroups

ADD REPLY
0
Entering edit mode

Yes? Can I add read group from fastq file? I had fastq files but I don't know how to add read group head when I make the alignement/mapping.

Mi fastq files looks like this:

@NB501082:6:H5KG3AFXX:1:11101:6550:1056 1:N:0:ATAGCGAC

Thanks

ADD REPLY
1
Entering edit mode

Most probably, you are using BWA for mapping. You can add read group by giving this option to BWA

 -R @RG\tID:NULL\tSM:1305H\tLB:NULL\tPL:Illumina

Here SM = my-sample_id.. I've put NULL in the field I dont care about or dont have knowledge about. You can see the explanation of all fields here http://gatkforums.broadinstitute.org/gatk/discussion/6472/read-groups

ADD REPLY
0
Entering edit mode

Perfect, I understand the read group now. So I only going to do the alignment again adding -R @RG\tID:NULL\tSM:1305H\tLB:NULL\tPL:Illumina with the sample name. I hope that works!

ADD REPLY
1
Entering edit mode

So I only going to do the alignment again

You do not need to. That is the purpose of using Picard to add this information as linked by @Santosh above: C: Problems with read group in GATK

ADD REPLY
0
Entering edit mode

probably you might also need to double quote the whole string, like -R "@RG\tID:NULL\tSM:1305H\tLB:NULL\tPL:Illumina"

ADD REPLY
0
Entering edit mode

Fastq headers do not have any useful information that you could use in read groups. See GATK, SAM file doesn't have any read groups defined in the header for some ideas if you don't have real information available.

ADD REPLY
0
Entering edit mode

ok, thanks for the link! I am going to try some indications.

ADD REPLY

Login before adding your answer.

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