Hello,
I am trying to create a .bam file for each chromosome from the single file "mutant.bam". I'm using the following script:
for f in {1..25} ; do echo $f ; samtools view -b mutant.bam chr"$f" -o mutant_chr"$f".bam
The script appears to run fine, 25 file new files are created, but they are the exact same size. From manual inspection in IGV, it appears that all files contain chromosome 1.
I have run samtools idxstats on the mutant.bam file, and the read counts for the various chromosomes are different (though similar). Any help or suggestions would be greatly appreciated.
Best regards
I am trying to create a .bam file for each chromosome from the single file "mutant.bam". I'm using the following script:
for f in {1..25} ; do echo $f ; samtools view -b mutant.bam chr"$f" -o mutant_chr"$f".bam
The script appears to run fine, 25 file new files are created, but they are the exact same size. From manual inspection in IGV, it appears that all files contain chromosome 1.
I have run samtools idxstats on the mutant.bam file, and the read counts for the various chromosomes are different (though similar). Any help or suggestions would be greatly appreciated.
Best regards
Comment