Hi,
I am new to bioinformatics and programming, so this might be too easy to tackle for some of you. I am working on a newly sequenced genome with thousands of contigs. I have Illumina sequence data that I have mapped using bowtie and BWA. When I try to import that file into my genome viewer, Geneious, it crashes. So, I want to split my BAM files into many, so the program can handle them easily. My question is if there is an easy way to split bam files by each of the contigs. So, in effect, it should split one BAM file into thousands of mini-files, each corresponding to a particular contig. I am familiar with samtools view (e.g. samtools view in.bam chr1 > chr1.bam) and have used it to make it for individual cases. Is there a better way to automate that?
Any help much appreciated.
I am new to bioinformatics and programming, so this might be too easy to tackle for some of you. I am working on a newly sequenced genome with thousands of contigs. I have Illumina sequence data that I have mapped using bowtie and BWA. When I try to import that file into my genome viewer, Geneious, it crashes. So, I want to split my BAM files into many, so the program can handle them easily. My question is if there is an easy way to split bam files by each of the contigs. So, in effect, it should split one BAM file into thousands of mini-files, each corresponding to a particular contig. I am familiar with samtools view (e.g. samtools view in.bam chr1 > chr1.bam) and have used it to make it for individual cases. Is there a better way to automate that?
Any help much appreciated.
Comment