How do I figure out the percent of reads that went into each of the bins that mapped to ? In the beginning, I concatenated my .fa files for my index file to mapp against all of my paired fastq files. Now i just want to know the number of reads from the fastq files make up each one of the bins.
I am wanting to be able to view the percentage of reads from metagenomic bins to the paired fastq files. I have already completed making .bam files, and .sam files and sorted, and indexed the sam files with samtools.
I just need the percent of reads from my bins that are found in any of the seven paired end reads that I have. Assume that I have all of the correct files and am just looking to view the output.
Thanks for your help in advance.
1 answer
samtools idxstats <aln.bam>
Retrieve and print stats in the index file. The output is TAB-delimited with each line consisting of reference sequence name, sequence length, # mapped reads and # unmapped reads.
You have the number of reads mapped to each sequence, you can sum them up for each bin.
That previous command shows the reference sequence name (NODE_###_##...) and then all of the contig mapped numbers. How does adding up the reads mapped to each sequece show me the percent of reads from each bin when I don't know what contigs from each fastq went into which bin ?
Sorry, I lost you .
Log in to answer this question.