Dear Mr.samtools,
    
    I'm Jiessie, a bioinformatic beginner from China, very sorry to disturb you!
    I've used the "samtools reheader " command to replace the header of my bam 
files, but the output file showed a small error as follows:

[my command] : samtools reheader new.header.sam s1_chr22.bam > 
reheader.s1_chr22.bam

[the original header of bam file]:
@HD VN:1.0 
@SQ SN:chr22 LN:51304566 
@PG ID:segemehl VN:0.1.7-$Rev: 411 $ ($Date: 2014-06-18 ... 

[the content of new.head.sam]:
@HD VN:1.0 
@SQ SN:chr1 LN:249250621 
@SQ SN:chr2 LN:243199373 
@SQ SN:chr3 LN:198022430 
@SQ SN:chr4 LN:191154276 
@SQ SN:chr22 LN:51304566
@PG ID:segemehl VN:0.1.7-$Rev: 411 $ ($Date: 2014-06-18 ...

[the original bam file (brief view)]:
HWI-ST1269:287:H9BA4ADXX:1:1101:3481:1993 1:N:0 99 chr22 22890685 255 99M = 
22890824 233 NGGGGG 
HWI-ST1269:287:H9BA4ADXX:1:1101:3481:1993 2:N:0 147 chr22 22890824 255 94M = 
22890685 -233 GGAGGG 
HWI-ST1269:287:H9BA4ADXX:1:1101:3516:1883 2:N:0 145 chr22 29695606 255 94M * 0 
0 GGTGGCCCTGGTGG 
HWI-ST1269:287:H9BA4ADXX:1:1101:3516:1883 1:N:0 321 chr22 29694857 255 29M * 0 
0 CGAGCTGGAGACTG 
HWI-ST1269:287:H9BA4ADXX:1:1101:3516:1883 1:N:0 321 chr22 29695224 255 69M * 0 
0 GGGTTGTGGAAACC 
HWI-ST1269:287:H9BA4ADXX:1:1101:3778:1975 1:N:0 83 chr22 29678425 255 99M = 
29674081 -4250

[bam file after replacing its header(brief view)]:
HWI-ST1269:287:H9BA4ADXX:1:1101:3481:1993 1:N:0 99 chr1 22890685 255 99M = 
22890824 233 NGGGGG 
HWI-ST1269:287:H9BA4ADXX:1:1101:3481:1993 2:N:0 147 chr1 22890824 255 94M = 
22890685 -233 GGAGGG 
HWI-ST1269:287:H9BA4ADXX:1:1101:3516:1883 2:N:0 145 chr1 29695606 255 94M * 0 0 
GGTGGCCCTGGTGG 
HWI-ST1269:287:H9BA4ADXX:1:1101:3516:1883 1:N:0 321 chr1 29694857 255 29M * 0 0 
CGAGCTGGAGACTG 
HWI-ST1269:287:H9BA4ADXX:1:1101:3516:1883 1:N:0 321 chr1 29695224 255 69M * 0 0 
GGGTTGTGGAAACC 
HWI-ST1269:287:H9BA4ADXX:1:1101:3778:1975 1:N:0 83 chr1 29678425 255 99M = 
29674081 -4250
   

The header of the output bam file has been changed successfully, but the column 
related to chrmosome_id has been converted into chr1, it's not the fruit I want.
Samtools-Version: 0.1.19-44428cd

I don't know why it comes and how to solve it.

Best regards,

Jessie



Jessie Yang
Bioinformatic Research
Annoroad Gene Technology, China
Building B2, Yizhuang Biomedical Park, Kechuang 6 Rd, 
Beijing Economic-Technologic al Development Area ,Beijing, China, 100176
Email:jiey...@annoroad.com
Tel: +86 15311439112
Website: www.annoroad.com
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to