This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Generate count table using Samtools

Hello,

I need to generate a count table for my metagenomic data (10 samples), in an article which I referred it says. Count table can be generated using Samtools, can anyone validate me about this, and may I know whether I can find the command for the same in Samtools manual.

Thanks, Vishal

assembly alignment

Please include a link to the article you are talking about.

samtools stats or samtools idxstats ?

Count table of what? Reads mapped to each gene? contig?

You have included almost no information in your post so it is impossible to help you. Retry ? What did you align to ? Did you align data ?

Well sorry, I couldn't frame the question properly. The article which I am referring is

The Human Gut Virome Is Highly Diverse, Stable, and Individual Specific

it can be cited here, The question is that, I have similar work to the one done in this work, I too have 10 samples of metagenomic sequences. For the first sample I have done all the step (from pre-processing to aligning it with various database) for getting clean and bacterial free Viral Sequences and to reduce the work load in the next samples, those samples are pre-processed and aligned to the 1st clean sequence. Now with all the 10 sample they explained that a count table is generated using samtools v-0.1.19. I just want to ask, how.?

I might sound a bit lame with the concept, but till now I have only this much knowledge about bioinformatics, Sorry

Please if anyone can help now

Thanks, Vishal

Try a newer version of samtools like 1.7+

The you can do what @lieven.sterck recommended above, maybe idxstats will be most helpful.

Program: samtools (Tools for alignments in the SAM format)
Version: 1.7 (using htslib 1.7)

Usage:   samtools <command> [options]

Commands:

  -- Statistics
     bedcov         read depth per BED region
     depth          compute the depth
     flagstat       simple stats ************
     idxstats       BAM index stats *******************
     phase          phase heterozygotes
     stats          generate stats (former bamcheck) ******************

0 answers

No answers yet.

Log in to answer this question.