Hi,
I found samtools tview
quite amazing in that on the third line from the top, it produces a kind of consensus sequence using only what's available in the sorted .bam file. It does not require a reference sequence, and moreover, can identify regions with variation and mark these accordingly (e.g. with the appropriate nucleic acid notation such as Y, K, R, etc.). However, it's designed for interactive use and not so useful for batch queries.
Are there tools out there that can give me a consensus sequence for a particular region that is command-line friendly (i.e output to stdout)? I know samtools tview
has a -d T
option, but it only outputs 80 columns or so.
I have tried bcftools consensus and GATK FastaAlternateReferenceMaker but these tend to only give one consensus sequence masking the variation that may exist.
Many thanks for your help,
Tim
samtools apparently resets the COLUMNS variable to 110 every time I run it. Which version are you using? I tried both 1.3.1 and 1.6, and it's the same.
this is not my cmd-line: I redefine/override COLUMNS each time I run samtools:
Thanks! That worked.