Skip to content

Commit

Permalink
Merge pull request #114 from bioinfodlsu/hot_fix
Browse files Browse the repository at this point in the history
Skip over contigs that assembler is unable to handle
  • Loading branch information
pbong authored Sep 8, 2023
2 parents f6f91e8 + eb2dda7 commit 43cb452
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions callbacks/lift_over/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,11 @@ def get_ogi_other_ref(ref, nb_intervals):
for intersection in gff_intersections:
ref_interval = to_genomic_interval(
intersection.attributes['Name'][0])

# Skip if assembler does not know what to do with contig
if is_error(ref_interval):
continue

genes_in_interval = list(db_annotation.region(region=(ref_interval.chrom, ref_interval.start, ref_interval.stop),
completely_within=False, featuretype='gene'))

Expand Down Expand Up @@ -544,6 +549,11 @@ def get_genes_in_other_ref(ref, nb_intervals):
for intersection in gff_intersections:
ref_interval = to_genomic_interval(
intersection.attributes['Name'][0])

# Skip if assembler does not know what to do with contig
if is_error(ref_interval):
continue

genes_in_interval = list(db_annotation.region(region=(ref_interval.chrom, ref_interval.start, ref_interval.stop),
completely_within=False, featuretype='gene'))

Expand Down

0 comments on commit 43cb452

Please sign in to comment.