I have a BAM with the @SQ lines of the header in lexigraphical order instead
of numerical order:

***Have:
@HD     VN:1.0  SO:coordinate
@SQ     SN:chr1 LN:249250621
@SQ     SN:chr10        LN:135534747
@SQ     SN:chr11        LN:135006516
@SQ     SN:chr12        LN:133851895
|       |               |
@SQ     SN:chr19        LN:59128983
@SQ     SN:chr2 LN:243199373
@SQ     SN:chr20        LN:63025520
@SQ     SN:chr21        LN:48129895
@SQ     SN:chr22        LN:51304566
@SQ     SN:chr3 LN:198022430
|       |       |
@SQ     SN:chrM LN:16571
@SQ     SN:chrX LN:155270560
@SQ     SN:chrY LN:59373566
@PG     ID:TopHat       VN:2.0.0        

***Want:
@HD     VN:1.0  SO:coordinate
@SQ     SN:chr1 LN:249250621
@SQ     SN:chr2 LN:243199373
|       |       |
@SQ     SN:chr9 LN:141213431
@SQ     SN:chr10        LN:135534747
@SQ     SN:chr11        LN:135006516
|       |               |
@SQ     SN:chr22        LN:51304566
@SQ     SN:chrX LN:155270560
@SQ     SN:chrY LN:59373566
@SQ     SN:chrM LN:16571
@PG     ID:TopHat       VN:2.0.0        


I'm trying to use samtools reheader using this pipeline:

# extract header from BAM to SAM
$ samtools view -H accepted_hits.bam > header.sam

# manually edit header using vi, save as reheader.sam

# replace header in orginal BAM file
$ samtools reheader reheader.sam accepted_hits.bam

When I do this I get flickering symbols in the PuTTY terminal and no change
to the BAM. Any ideas?

Thanks
Josh


Joshua Theisen, MD-PhD
Pediatric Resident Physician, PGY-3
St. Louis Children's Hospital




------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to