bcftools consensus --mark-ins

Open
#2,124 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

Start at the bcftools consensus command and trace how --mark-ins, --mark-del, and -H process the supplied VCF and reference sequence. Reproduce the current H=1 and H=2 outputs, then determine what must change so the H=1 result is A--CGCAT while preserving equal sequence lengths.

Written by the indexing model from the issue text.

Description

Hello,

I'm a researcher who has been using bcftools effectively. I was very grateful for the update you provided last time that allowed inserting characters into mark-del. This time, I'd like to discuss the functionality of mark-ins.

Here's an example of a VCF for a single sample:

chr1 786694 - A ATT . PASS AC=- GT 0|1

When running the following command:

samtools faidx Homo_sapiens_assembly38.fasta chr1:786694-786700 | 
bcftools consensus \
--mark-ins lc \ 
--mark-del d \
-H 1 \  # or 2
-s  sample1 \
test.vcf.gz

With H set to 1, the output is ACGCAT,
and with H set to 2, the output becomes AttCGCAT.

In this scenario, I would like the output to be A--CGCAT when H is set to 1. In situations of heterozygosity where one allele has an insertion, I'd like to fill in specific characters to ensure both sequences are of equal length.

Do you have plans to support this feature? If not, I would be very grateful if you could direct me to which part to refer to or modify so that I can implement this feature myself.

Dominant language
C
Stars
891
Forks
277
Avg merge
2d 23h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from samtools/bcftools

All issues in samtools/bcftools

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.