Skip to content

Commit

Permalink
Merge pull request #17 from Novartis/bugfix/issue_15
Browse files Browse the repository at this point in the history
Fix exon ordering for minus strand transcripts in #15
  • Loading branch information
mdshw5 authored Aug 6, 2021
2 parents f0a0f0f + 89aadee commit 98dc8cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pisces/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,16 @@ def features_to_string(features, fasta_in, masked=True, strand=True):
"""
"""
sequences = []
feature_strand = "."
for feature in features:
feature_strand = feature.strand
sequences.append(
feature.sequence(
fasta_in, use_strand=strand))
# if the transcript is on the reverse strand, reverse order of exons
# before concatenating
if feature_strand == "-":
sequences = sequences[::-1]
seq = ''.join(sequences)
mask_count = sum(seq.count(a) for a in soft_chars)
if masked:
Expand Down

0 comments on commit 98dc8cd

Please sign in to comment.