We've moved!
This site is now read-only. You can find our new documentation site and support forum for posting questions here.
Be sure to read our welcome blog!

why UnifiedGenotyper treat multiple bam input as one sample

tennis_musictennis_music Member
edited February 2013 in Ask the GATK team

As suggested, I called variants for multiple samples all at once, but the output vcf doesn't tell who is who. I need genotype for each sample. Here is the command:

GenomeAnalysisTK.jar -T UnifiedGenotyper -R hg19.fasta -I 8071X1_110523_SN141_0354_BB0236ABXX_5.mate.dup.sort.realign.sort.rr.bam -I 8071X2_110523_SN141_0354_BB0236ABXX_6.mate.dup.sort.realign.sort.rr.bam -glm both --dbsnp hg19.dbsnp.vcf -o 8071X1X2.raw.vcf -stand_call_conf 50.0 -stand_emit_conf 10.0 -dcov 200

and the output:

#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT SAMPLE
chr1 12783 . G A 47.77 LowQual AC=1;AF=0.500;AN=2;BaseQRankSum=-1.449;DP=33;Dels=0.00;FS=0.000;HaplotypeScore=0.0000;MLEAC=1;MLEAF=0.500;MQ=10.82;MQ0=0;MQRankSum=1.113;QD=1.45;ReadPosRankSum=-0.273 GT:AD:DP:GQ:PL 0/1:25,8:32:63:76,0,63

The gatk was 2.3-0.

many thanks!

Answers

  • aeonsimaeonsim Member ✭✭✭
    edited February 2013

    Have you got separate @RG headers on each of your bams? If you don't variant callers will assume they all belong to one animal.
    Run:
    samtools view -H 8071X1_110523_SN141_0354_BB0236ABXX_5.mate.dup.sort.realign.sort.rr.bam
    &
    samtools view -H 8071X2_110523_SN141_0354_BB0236ABXX_6.mate.dup.sort.realign.sort.rr.bam

    and make sure they each have a different @RG line something like this:
    @RG\tID:Sample1_flowcell_id\tSM:Sample1
    @RG\tID:Sample2_flowcell_id\tSM:Sample2

    If they don't you'll need to use Picard tools AddOrReplaceReadGroups or samtools to add those headers. Then retry GATK and you should get separate var calls for each Bam.

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    What @aeonsim is the most likely explanation and solution for your problem. (thanks for jumping in, aeonsim)

Sign In or Register to comment.