Skip to content

Commit 4415b5b

Browse files
committed
regex sequence now ensured to be uppercase
1 parent 4ea248e commit 4415b5b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/schemas/locus.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ def __init__(
3737
self.flank_length = flank_length
3838

3939
if sequence:
40-
self.sequence = sequence
40+
self.sequence = sequence.upper()
4141
self.noting = noting
4242

4343
else:
4444
seq, noting = self.prepare_sequence(main_config.reference_path)
4545
self.noting = noting
46-
self.sequence = seq
46+
self.sequence = seq.upper()
4747

4848
def prepare_sequence(self, reference_path: str):
4949
fa_seq: str = pysam.faidx(reference_path, self.coord)

src/squiggler/Squiggler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ def _save_all(self, output_path: str, sequences: Tuple[str, str, str, str, str,
7272
with open(fasta_path, 'w') as file:
7373
file.write('type,sequence\n')
7474
for idx, i in enumerate(tmpl.LOCUS_NAMES):
75-
file.write(i+','+sequences[idx]+'\n')
75+
file.write(i+','+sequences[idx].upper()+'\n')

0 commit comments

Comments
 (0)