Hi,

Does ‘bedtool bamtofastq’ handle supplementary reads correctly (or the version 
you are using)?

Regards,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

[email protected]
Tel:+44 (0)1223 834244 Ext: 7703
Office: H104

> On 12 Feb 2016, at 16:49, Richard Corbett <[email protected]> wrote:
> 
> Hi Nitin,
> 
> I think I saw this error years ago when I was working with a bam that 
> had multiple reads with the same name.   How many times do you see
> 
> ST1023:220:H84P1ADXX:2:2115:7649:16177
> 
> in your starting bam file?  Are there multiple fragments (read pairs) 
> with the same ID?
> 
> I think I ran in to this issue when I merged the same file multiple 
> times ( that was a bad day :) )
> 
> Richard
> 
> 
> On 02/12/2016 08:43 AM, Nitin Bhardwaj wrote:
>> 
>> Hi,
>> 
>> I saw this error encountered by a few other users and I tried all that 
>> was suggested but nothing worked for me. I am still getting the error 
>> on Picard MarkDuplicates step:
>> 
>> Exception in thread "main" htsjdk.samtools.SAMException: Value was put into 
>> PairInfoMap more than once.  1: 
>> GIAB:HWI-ST1023:220:H84P1ADXX:2:2115:7649:16177
>> 
>> Here is what I did:
>> 
>> First sorted and converted bams to fastq as I did not have original 
>> fastqs:
>> 
>> samtools sort -n NIST-hg001-7001-b-ready.bam -o 
>> NIST-hg001-7001-b-ready.sorted.bam
>> 
>> bedtools bamtofastq -i NIST-hg001-7001-b-ready.sorted.bam -fq 
>> NIST-hg001-7001-b-ready_R1.fastq -fq2 NIST-hg001-7001-b-ready_R2.fastq
>> 
>> Then I aligned using BWA mem:
>> 
>> bwa mem -t 8 -M -R '@RG\tID:GIAB\tSM:NA12878\tPL:illumina\tLB:lib\tPU:7001' 
>> reference_genome/hg19 NIST-hg001-7001-ready_R1.fastq 
>> NIST-hg001-7001-ready_R2.fastq > NIST-hg001-7001.sam
>> 
>> Sort Sam using Picard:
>> 
>> java -jar picard-tools-1.119/SortSam.jar I=NIST-hg001-7001.sam 
>> O=NIST-hg001-7001_sorted.bam SO=coordinate CREATE_INDEX=true
>> 
>> And mark duplicates:
>> 
>> java -jar picard-tools-1.119/MarkDuplicates.jar I=NIST-hg001-7001_sorted.bam 
>> O=NIST-hg001-7001_dedup.bam M=NIST-hg001-7001.metric
>> 
>> When it gives the error:
>> 
>> Exception in thread "main" htsjdk.samtools.SAMException: Value was put into 
>> PairInfoMap more than once.  1: 
>> GIAB:HWI-ST1023:220:H84P1ADXX:2:2115:7649:16177
>> 
>> I tried to clean the bam using Samtools:
>> 
>> samtools view -h NIST-hg001-7001_sorted.bam | grep -v null | samtools view 
>> -bS - > cleaned.bam
>> 
>> And also used FixMateInformation using Picard:
>> 
>> java -jar 
>> /home/nitin/Bioinformatics/Toolbox/src/Misc/picard-tools-1.119/FixMateInformation.jar
>>  I=NIST-hg001-7001_sorted.bam O=NIST-hg001-7001_fixedMate.bam
>> 
>> But none of them worked. I still get the same error.
>> 
>> Does anybody have a solution. I have spent a lot of time on it without 
>> any use. Thank a lot in advance.
>> 
>> ~N
>> 
>> 
> 
> -- 
> The contents of this electronic mail transmission are intended to be 
> CONFIDENTIAL and for the sole use of the designated recipient. If this 
> message has been misdirected, please contact the sender as soon as possible.
> 
> 
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> Samtools-help mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/samtools-help

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Samtools-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to