I am now making a script with bowtie and samtools, and
troubled in merging bam files from bowtie.
1) bowtie with every chromosome ewbt; output is sam file
2) sam to bam (every chromosome sam file)
3)* merge all bams
4) bam sort
5) bam index
#!/bin/sh
date=`date +"%Y%m%d_%H%M"`
samtools merge ${date}.bam ${date}_bam_chr1.bam, ${date}_bam_chr2.bam,... ,${date}_bam_chrY.bam
error massage was
[bam_merge_core] different target sequence name : 'chr1' != 'chr2' in file 20110115_0050_bam_chr2.bam
In this case, date was 20110115_0050.
What was wrong??
troubled in merging bam files from bowtie.
1) bowtie with every chromosome ewbt; output is sam file
2) sam to bam (every chromosome sam file)
3)* merge all bams
4) bam sort
5) bam index
#!/bin/sh
date=`date +"%Y%m%d_%H%M"`
samtools merge ${date}.bam ${date}_bam_chr1.bam, ${date}_bam_chr2.bam,... ,${date}_bam_chrY.bam
error massage was
[bam_merge_core] different target sequence name : 'chr1' != 'chr2' in file 20110115_0050_bam_chr2.bam
In this case, date was 20110115_0050.
What was wrong??
Comment