Skip to content

Commit

Permalink
fix unknown var name
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwengers committed Jul 17, 2024
1 parent 3bb949a commit 77f001d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bakta/features/cds.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,18 +215,18 @@ def import_user_cdss(genome: dict, import_path: Path):
contig_id, tool, feature_type, start, stop, score, strand, phase, attributes = line.split('\t')
if(feature_type.lower() == 'cds'):
attributes = attributes.lower().split(';')
if('pseudo=' in attributes or bc.INSDC_FEATURE_PSEUDOGENE in attributes): # skip pseudo genes
log.debug(
'skip user-provided CDS: reason=pseudogene contig=%s, start=%i, stop=%i, strand=%s',
user_cds['contig'], user_cds['start'], user_cds['stop'], user_cds['strand']
)
continue
contig = contigs_by_id.get(contig_id, None)
if(contig is None):
log.error('user-provided CDS: No contig found for id=%s', contig_id)
raise Exception(f'user-provided CDS: No contig found for id={contig_id}')
user_cds = create_cds(contig, int(start), int(stop), strand, '', '')
user_cds['source'] = bc.CDS_SOURCE_USER
if('pseudo=' in attributes or bc.INSDC_FEATURE_PSEUDOGENE in attributes): # skip pseudo genes
log.debug(
'skip user-provided CDS: reason=pseudogene contig=%s, start=%i, stop=%i, strand=%s',
user_cds['contig'], user_cds['start'], user_cds['stop'], user_cds['strand']
)
continue
try:
nt = bu.extract_feature_sequence(user_cds, contig)
user_cds['nt'] = nt
Expand Down

0 comments on commit 77f001d

Please sign in to comment.