deepgenomics / deepgenomics/GenomeKit

`apply_variants` with `reference_alignment=True` raises a ValueError

Open
#130 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
63
Forks
11
Avg merge
1h 1m
Merged PRs (30d)
2

Description

This script captures a quick reprex:

```
import genome_kit as gk
from genome_kit._apply_variants import apply_variants

genome = gk.Genome('gencode.v41')

interval = gk.Interval("chr1", "-", 50000, 50005, reference_genome=genome)

variants = [gk.Variant.from_string('chr1:50002:A:C', genome)]

seq, _ = apply_variants(genome.dna, variants, interval, reference_alignment=True)

```

This script provides the following ValueError:

```
Traceback (most recent call last):
File "", line 12, in
seq, _ = apply_variants(genome.dna, variants, interval, reference_alignment=True)
File "/lib/python3.10/site-packages/genome_kit/_apply_variants.py", line 198, in apply_variants
raise ValueError("Reference alignment only work on forward strand.")
ValueError: Reference alignment only work on forward strand.
```

Is there a particular reason that this is only supported on the forward strand? We have a use case that would greatly benefit from being able to generate reference alignments on negative-stranded intervals as well.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.