Camille - The samtools command line looks fine except for the final 's1_sortcoords'. Not sure what's intended there. If this is meant to be the output file name, then either a redirection operator '>' is needed just before it, or it should be the value of '-o' and be moved earlier before the input '-'.
I'm not at all familiar with 'subread', but my first step in debugging would be to run 'samtools view -H' and see whether the .bam header lines are what you expect them to be. Are the individual reads longer than, say, 10 kb after assembly ? Does 'subread' expect an additional .bai file, created with 'samtools index' ? Might try adding that. Just guessing. - tom blackwell - On Sun, 26 Oct 2014, Camille A. Daniels wrote: > Hello, > > I have a bam file formatting issue. > > samtools-0.1.18 (Linux) shows the bam to contain 875 reads mapped. > > > [cid:c32e9022-0c2c-4630-85ab-c9d4ce1f4bf9] > > I've run featureCounts, a software module of Subread > (http://subread.sourceforge.net/) to count the number of read mapped per CDS > to a reference genome. > > The program only processes 116 reads for this bam (rather than the expected > 875), and suggests truncation or missing data. > > > [cid:5abca696-b95f-4911-a199-37a47ebf33db] > > > Can someone help debug the formatting issue? > > Workflow to create the bam file is as follows: > -De novo assembly of reads in CLC Workbench > -Bowtie2 to map reads against reference genome > -Pipe to samtools to generate bam and sort file by coordinate > -Run in featureCounts > > ./bowtie2 -x bact_contigs -f -a -t --no-unal -p 36 s1_assembly.fasta | > ~/samtools-0.1.18/samtools view -Shu - | ~/samtools-0.1.18/samtools sort -m > 5000000000 - s1_sortcoord > > I've re-generated the bam files with and without piping to samtools, and > versions of both software, but still get the same error. > > > Also, below is a file size comparison for the file and its index. > > > [cid:32f4bea4-956a-4a56-9b26-26c8ef290ecc] > > > > > > --- > Thanks, > Camille Daniels, Ph.D. > Post Doctoral Fellow > Red Sea Research Center > Al-Haytham West (Building 2), Room 2227-WS02 > Thuwal, Saudi Arabia 23599-6900 > > camille.dani...@kaust.edu.sa > Office: +966 02 808 2446 > --- > > ________________________________ > > This message and its contents including attachments are intended solely for > the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete this > message from your computer system. Any unauthorized use or distribution is > prohibited. Please consider the environment before printing this email. > ------------------------------------------------------------------------------ _______________________________________________ Samtools-help mailing list Samtools-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/samtools-help