Skip to content

Samtools consensus --min-depth option produces longer sequence #2167

Description

@sanschiffre

Are you using the latest version of samtools and [HTSlib]

samtools 1.21
Using htslib 1.21

Please describe your environment.

Linux 5.14.21-150500.55.36-default
x86_64
gcc (SUSE Linux) 7.5.0

Please specify the steps taken to generate the issue, the command you are running and the relevant output.

When i used samtools consensus BAM -r SC:1-100 i get a consensus of 100 bp
When i used samtools consensus BAM -r SC:1-100 -d 70 i get a consensus of 130 bp

If a check the PILEUP format result

Without -d

...
SC	28	0	53	G	157	...
SC	29	0	53	C	122	...
SC	30	0	53	G	154	...
...

With -d

...
SC	28	0	53	N	0	...
SC	29	0	53	N	0	...
SC	29	1	53	N	0	**************A*******###############################	...
SC	29	2	53	N	0	**************T*******###############################	...
SC	30	0	53	N	0	...
...

Low coverage insertion, ignored by default, seem to be taken into account with -d

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions